Improve settings theme and add intro scroller
This commit is contained in:
@@ -43,13 +43,13 @@ distance = -432.0
|
|||||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_48dqy"]
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_48dqy"]
|
||||||
distance = -360.0
|
distance = -360.0
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_kyxd5"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b73wn"]
|
||||||
shader = ExtResource("12_ljnes")
|
shader = ExtResource("12_ljnes")
|
||||||
shader_parameter/rect_global_position = Vector2(0, 0.233687)
|
shader_parameter/rect_global_position = Vector2(0, 0)
|
||||||
shader_parameter/rect_size = Vector2(448, 25)
|
shader_parameter/rect_size = Vector2(150, 25)
|
||||||
shader_parameter/ColourTexture = ExtResource("13_u52d1")
|
shader_parameter/ColourTexture = ExtResource("13_u52d1")
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_48a5y"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_15g3x"]
|
||||||
shader = ExtResource("12_ljnes")
|
shader = ExtResource("12_ljnes")
|
||||||
shader_parameter/rect_global_position = Vector2(0, 0)
|
shader_parameter/rect_global_position = Vector2(0, 0)
|
||||||
shader_parameter/rect_size = Vector2(89, 25)
|
shader_parameter/rect_size = Vector2(89, 25)
|
||||||
@@ -324,7 +324,7 @@ theme_type_variation = &"RoundStart"
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="Start/VBoxContainer/PanelContainer/VBoxContainer"]
|
[node name="Title" type="Label" parent="Start/VBoxContainer/PanelContainer/VBoxContainer"]
|
||||||
material = SubResource("ShaderMaterial_kyxd5")
|
material = SubResource("ShaderMaterial_b73wn")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("8_wcf7g")
|
theme = ExtResource("8_wcf7g")
|
||||||
theme_type_variation = &"Arkanoid"
|
theme_type_variation = &"Arkanoid"
|
||||||
@@ -372,7 +372,7 @@ size_flags_vertical = 3
|
|||||||
theme = ExtResource("8_wcf7g")
|
theme = ExtResource("8_wcf7g")
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Paused/VBoxContainer"]
|
[node name="Label" type="Label" parent="Paused/VBoxContainer"]
|
||||||
material = SubResource("ShaderMaterial_48a5y")
|
material = SubResource("ShaderMaterial_15g3x")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("8_wcf7g")
|
theme = ExtResource("8_wcf7g")
|
||||||
theme_type_variation = &"Arkanoid"
|
theme_type_variation = &"Arkanoid"
|
||||||
|
|||||||
@@ -9,16 +9,16 @@
|
|||||||
[ext_resource type="Script" path="res://ScrollText.gd" id="6_y6ajf"]
|
[ext_resource type="Script" path="res://ScrollText.gd" id="6_y6ajf"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c6nwmsoi1gjvv" path="res://FadeTex.png" id="7_wpqjt"]
|
[ext_resource type="Texture2D" uid="uid://c6nwmsoi1gjvv" path="res://FadeTex.png" id="7_wpqjt"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0d7e6"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_u467p"]
|
||||||
shader = ExtResource("3_u76hk")
|
shader = ExtResource("3_u76hk")
|
||||||
shader_parameter/rect_global_position = Vector2(0, 37.5)
|
shader_parameter/rect_global_position = Vector2(0, 0.0998668)
|
||||||
shader_parameter/rect_size = Vector2(640, 25)
|
shader_parameter/rect_size = Vector2(640, 25)
|
||||||
shader_parameter/ColourTexture = ExtResource("4_lxs2b")
|
shader_parameter/ColourTexture = ExtResource("4_lxs2b")
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fxm16"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fxm16"]
|
||||||
shader = ExtResource("6_t71ub")
|
shader = ExtResource("6_t71ub")
|
||||||
shader_parameter/rect_global_position = Vector2(107, 107)
|
shader_parameter/rect_global_position = Vector2(nan, nan)
|
||||||
shader_parameter/rect_size = Vector2(2532, 852)
|
shader_parameter/rect_size = Vector2(nan, nan)
|
||||||
shader_parameter/ColourTexture = ExtResource("7_wpqjt")
|
shader_parameter/ColourTexture = ExtResource("7_wpqjt")
|
||||||
|
|
||||||
[node name="GameOver" type="Node2D"]
|
[node name="GameOver" type="Node2D"]
|
||||||
@@ -35,7 +35,7 @@ size_flags_vertical = 3
|
|||||||
theme = ExtResource("3_km2fx")
|
theme = ExtResource("3_km2fx")
|
||||||
|
|
||||||
[node name="GameOver" type="Label" parent="VBoxContainer"]
|
[node name="GameOver" type="Label" parent="VBoxContainer"]
|
||||||
material = SubResource("ShaderMaterial_0d7e6")
|
material = SubResource("ShaderMaterial_u467p")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("3_km2fx")
|
theme = ExtResource("3_km2fx")
|
||||||
theme_type_variation = &"Arkanoid"
|
theme_type_variation = &"Arkanoid"
|
||||||
|
|||||||
90
Intro.tscn
90
Intro.tscn
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=15 format=3 uid="uid://c2oboya05agti"]
|
[gd_scene load_steps=19 format=3 uid="uid://c2oboya05agti"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Intro.gd" id="1_1hnh1"]
|
[ext_resource type="Script" path="res://Intro.gd" id="1_1hnh1"]
|
||||||
[ext_resource type="Theme" uid="uid://cfvww0geatnnk" path="res://MainTheme.tres" id="3_8d2ix"]
|
[ext_resource type="Theme" uid="uid://cfvww0geatnnk" path="res://MainTheme.tres" id="3_8d2ix"]
|
||||||
@@ -10,6 +10,9 @@
|
|||||||
[ext_resource type="Script" path="res://Level.gd" id="6_hw2gq"]
|
[ext_resource type="Script" path="res://Level.gd" id="6_hw2gq"]
|
||||||
[ext_resource type="SpriteFrames" uid="uid://c6wwkgmwfpdu7" path="res://Coin/Coin.tres" id="7_2tpc7"]
|
[ext_resource type="SpriteFrames" uid="uid://c6wwkgmwfpdu7" path="res://Coin/Coin.tres" id="7_2tpc7"]
|
||||||
[ext_resource type="Script" path="res://Preview.gd" id="9_x2ejj"]
|
[ext_resource type="Script" path="res://Preview.gd" id="9_x2ejj"]
|
||||||
|
[ext_resource type="Shader" path="res://ScrollText.gdshader" id="11_p7bee"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c6nwmsoi1gjvv" path="res://FadeTex.png" id="12_8ixec"]
|
||||||
|
[ext_resource type="Script" path="res://IntroScroller.tres.gd" id="13_q2pbx"]
|
||||||
|
|
||||||
[sub_resource type="Curve" id="Curve_jhhjd"]
|
[sub_resource type="Curve" id="Curve_jhhjd"]
|
||||||
min_value = -200.0
|
min_value = -200.0
|
||||||
@@ -20,18 +23,24 @@ point_count = 2
|
|||||||
[sub_resource type="Gradient" id="Gradient_431mb"]
|
[sub_resource type="Gradient" id="Gradient_431mb"]
|
||||||
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1)
|
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1)
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dkeyh"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2oo2w"]
|
||||||
shader = ExtResource("3_eo4f3")
|
shader = ExtResource("3_eo4f3")
|
||||||
shader_parameter/rect_global_position = Vector2(0, 0)
|
shader_parameter/rect_global_position = Vector2(0.19822, 0.0732357)
|
||||||
shader_parameter/rect_size = Vector2(150, 25)
|
shader_parameter/rect_size = Vector2(150, 25)
|
||||||
shader_parameter/ColourTexture = ExtResource("4_v8i0c")
|
shader_parameter/ColourTexture = ExtResource("4_v8i0c")
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_le8eo"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fb3e4"]
|
||||||
shader = ExtResource("3_eo4f3")
|
shader = ExtResource("3_eo4f3")
|
||||||
shader_parameter/rect_global_position = Vector2(0, 0)
|
shader_parameter/rect_global_position = Vector2(0.161003, 0.111851)
|
||||||
shader_parameter/rect_size = Vector2(242, 25)
|
shader_parameter/rect_size = Vector2(242, 25)
|
||||||
shader_parameter/ColourTexture = ExtResource("4_v8i0c")
|
shader_parameter/ColourTexture = ExtResource("4_v8i0c")
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_s1jgx"]
|
||||||
|
shader = ExtResource("11_p7bee")
|
||||||
|
shader_parameter/rect_global_position = Vector2(0.332524, 0.210386)
|
||||||
|
shader_parameter/rect_size = Vector2(2.369, 3.688)
|
||||||
|
shader_parameter/ColourTexture = ExtResource("12_8ixec")
|
||||||
|
|
||||||
[node name="Intro" type="Node2D"]
|
[node name="Intro" type="Node2D"]
|
||||||
script = ExtResource("1_1hnh1")
|
script = ExtResource("1_1hnh1")
|
||||||
|
|
||||||
@@ -70,7 +79,7 @@ size_flags_horizontal = 3
|
|||||||
theme = ExtResource("3_8d2ix")
|
theme = ExtResource("3_8d2ix")
|
||||||
|
|
||||||
[node name="ArkaLabel" type="Label" parent="VBoxContainer/HBoxContainer"]
|
[node name="ArkaLabel" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||||
material = SubResource("ShaderMaterial_dkeyh")
|
material = SubResource("ShaderMaterial_2oo2w")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("3_8d2ix")
|
theme = ExtResource("3_8d2ix")
|
||||||
theme_type_variation = &"Arkanoid"
|
theme_type_variation = &"Arkanoid"
|
||||||
@@ -91,7 +100,7 @@ size_flags_horizontal = 3
|
|||||||
theme = ExtResource("3_8d2ix")
|
theme = ExtResource("3_8d2ix")
|
||||||
|
|
||||||
[node name="Revenge" type="Label" parent="VBoxContainer/HBoxContainer2"]
|
[node name="Revenge" type="Label" parent="VBoxContainer/HBoxContainer2"]
|
||||||
material = SubResource("ShaderMaterial_le8eo")
|
material = SubResource("ShaderMaterial_fb3e4")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("3_8d2ix")
|
theme = ExtResource("3_8d2ix")
|
||||||
theme_type_variation = &"Arkanoid"
|
theme_type_variation = &"Arkanoid"
|
||||||
@@ -295,7 +304,74 @@ text = "00:00.00"
|
|||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
||||||
|
material = SubResource("ShaderMaterial_s1jgx")
|
||||||
|
clip_contents = true
|
||||||
|
custom_minimum_size = Vector2(160, 96)
|
||||||
|
offset_left = 411.0
|
||||||
|
offset_top = 158.0
|
||||||
|
offset_right = 571.0
|
||||||
|
offset_bottom = 254.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
stretch = true
|
||||||
|
script = ExtResource("13_q2pbx")
|
||||||
|
|
||||||
|
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||||
|
disable_3d = true
|
||||||
|
transparent_bg = true
|
||||||
|
handle_input_locally = false
|
||||||
|
size = Vector2i(160, 96)
|
||||||
|
render_target_update_mode = 4
|
||||||
|
|
||||||
|
[node name="ScrollContainer" type="ScrollContainer" parent="SubViewportContainer/SubViewport"]
|
||||||
|
custom_minimum_size = Vector2(160, 96)
|
||||||
|
offset_right = 40.0
|
||||||
|
offset_bottom = 40.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
horizontal_scroll_mode = 0
|
||||||
|
vertical_scroll_mode = 3
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="SubViewportContainer/SubViewport/ScrollContainer"]
|
||||||
|
custom_minimum_size = Vector2(160, 96)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme = ExtResource("3_8d2ix")
|
||||||
|
text = "
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For centuries the battle has raged. Since the first invasion of 2398, when the Xorqzees entered our dimension through a rift in space, humanity has bravely defended their territories with every ounce of strength they can muster.
|
||||||
|
|
||||||
|
Until today.
|
||||||
|
|
||||||
|
Today the full might of the Xorqzean war machine has been turned upon humanity in a final attempt to destroy what resistance is left.
|
||||||
|
|
||||||
|
But there is hope. A new generation of warship, the Dunkanoid, has finally been completed, and you have been chosen as its commander.
|
||||||
|
|
||||||
|
It is up to you to save humanity.
|
||||||
|
|
||||||
|
Are you up to the task? Or will humanity crumble?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
autowrap_mode = 3
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
offset_right = 640.0
|
offset_right = 640.0
|
||||||
offset_bottom = 360.0
|
offset_bottom = 360.0
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
|||||||
27
IntroScroller.tres.gd
Normal file
27
IntroScroller.tres.gd
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@tool
|
||||||
|
extends SubViewportContainer
|
||||||
|
|
||||||
|
var count : float = 0
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
$SubViewport/ScrollContainer.scroll_vertical = 0
|
||||||
|
set_notify_transform(true)
|
||||||
|
material.set_shader_parameter("rect_global_position", global_position / get_viewport_rect().size)
|
||||||
|
# material.set_shader_parameter("rect_size", get_rect().size/2)
|
||||||
|
|
||||||
|
func _process(delta : float) -> void:
|
||||||
|
if Engine.is_editor_hint() == false:
|
||||||
|
count += delta
|
||||||
|
if count >= 0.2:
|
||||||
|
count -= 0.2
|
||||||
|
$SubViewport/ScrollContainer.scroll_vertical += 1
|
||||||
|
var vbar = $SubViewport/ScrollContainer.get_v_scroll_bar()
|
||||||
|
if vbar.value >= vbar.max_value - $SubViewport/ScrollContainer.size.y:
|
||||||
|
vbar.value = 0
|
||||||
|
|
||||||
|
func _notification(what: int) -> void:
|
||||||
|
if what == NOTIFICATION_TRANSFORM_CHANGED:
|
||||||
|
var pos = global_position / get_viewport_rect().size
|
||||||
|
material.set_shader_parameter("rect_global_position", pos)
|
||||||
|
# material.set_shader_parameter("rect_size", get_rect().size / get_viewport_rect().size * 24)
|
||||||
|
|
||||||
5
Level.gd
5
Level.gd
@@ -64,8 +64,9 @@ func load_from_file(filename : String) -> void:
|
|||||||
func load_from_data(data : Dictionary) -> void:
|
func load_from_data(data : Dictionary) -> void:
|
||||||
purge_bricks()
|
purge_bricks()
|
||||||
level_data = data
|
level_data = data
|
||||||
Background.texture = Global.Backgrounds.get(level_data.background, null)
|
if not Engine.is_editor_hint():
|
||||||
Background.modulate = Color("#%s" % level_data.get("tint", "FFFFFF"))
|
Background.texture = Global.Backgrounds.get(level_data.background, null)
|
||||||
|
Background.modulate = Color("#%s" % level_data.get("tint", "FFFFFF"))
|
||||||
for y in level_data.data.size():
|
for y in level_data.data.size():
|
||||||
var line : String = level_data.data[y]
|
var line : String = level_data.data[y]
|
||||||
for x in line.length():
|
for x in line.length():
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
[gd_resource type="Theme" load_steps=19 format=3 uid="uid://cfvww0geatnnk"]
|
[gd_resource type="Theme" load_steps=27 format=3 uid="uid://cfvww0geatnnk"]
|
||||||
|
|
||||||
[ext_resource type="FontFile" uid="uid://dfkm2dibf0c3b" path="res://Fonts/fonts-DSEG_v046/DSEG7-Classic-MINI/DSEG7ClassicMini-Italic.ttf" id="1_17to7"]
|
[ext_resource type="FontFile" uid="uid://dfkm2dibf0c3b" path="res://Fonts/fonts-DSEG_v046/DSEG7-Classic-MINI/DSEG7ClassicMini-Italic.ttf" id="1_17to7"]
|
||||||
[ext_resource type="FontFile" uid="uid://bx41ej4o03nbx" path="res://Fonts/arkanoid/Arka_solid.ttf" id="1_s07ae"]
|
[ext_resource type="FontFile" uid="uid://bx41ej4o03nbx" path="res://Fonts/arkanoid/Arka_solid.ttf" id="1_s07ae"]
|
||||||
[ext_resource type="FontFile" uid="uid://c3gxkerjb3w7q" path="res://Fonts/charmap-oldschool_white.png" id="2_04xve"]
|
[ext_resource type="FontFile" uid="uid://c3gxkerjb3w7q" path="res://Fonts/charmap-oldschool_white.png" id="2_04xve"]
|
||||||
[ext_resource type="FontFile" uid="uid://0a8bjrb4tfqn" path="res://Fonts/charmap-oldschool_white_glow.png" id="3_fjg1d"]
|
[ext_resource type="FontFile" uid="uid://0a8bjrb4tfqn" path="res://Fonts/charmap-oldschool_white_glow.png" id="3_fjg1d"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cs1pg5j0t3kv2" path="res://Sprites/SwitchRight.png" id="4_08roa"]
|
||||||
[ext_resource type="FontFile" uid="uid://bfue7ekap54wi" path="res://Fonts/Chunky.png" id="5_dx8ei"]
|
[ext_resource type="FontFile" uid="uid://bfue7ekap54wi" path="res://Fonts/Chunky.png" id="5_dx8ei"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ehln08gxfdcr" path="res://Sprites/SwitchLeft.png" id="5_mmdho"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_naqov"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_naqov"]
|
||||||
|
|
||||||
@@ -14,6 +16,18 @@
|
|||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vivnf"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vivnf"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_lrlwe"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_smvbm"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4kjnm"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nu12h"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xv2fk"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xq6cm"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_y3y82"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_y3y82"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_knet6"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_knet6"]
|
||||||
@@ -96,6 +110,20 @@ Button/styles/normal = SubResource("StyleBoxEmpty_1ebxu")
|
|||||||
Button/styles/pressed = SubResource("StyleBoxEmpty_vivnf")
|
Button/styles/pressed = SubResource("StyleBoxEmpty_vivnf")
|
||||||
ButtonHover/base_type = &"Button"
|
ButtonHover/base_type = &"Button"
|
||||||
ButtonHover/fonts/font = ExtResource("3_fjg1d")
|
ButtonHover/fonts/font = ExtResource("3_fjg1d")
|
||||||
|
CheckButton/icons/checked = ExtResource("4_08roa")
|
||||||
|
CheckButton/icons/checked_disabled = ExtResource("4_08roa")
|
||||||
|
CheckButton/icons/checked_disabled_mirrored = ExtResource("5_mmdho")
|
||||||
|
CheckButton/icons/checked_mirrored = ExtResource("5_mmdho")
|
||||||
|
CheckButton/icons/unchecked = ExtResource("5_mmdho")
|
||||||
|
CheckButton/icons/unchecked_disabled = ExtResource("5_mmdho")
|
||||||
|
CheckButton/icons/unchecked_disabled_mirrored = ExtResource("4_08roa")
|
||||||
|
CheckButton/icons/unchecked_mirrored = ExtResource("4_08roa")
|
||||||
|
CheckButton/styles/disabled = SubResource("StyleBoxEmpty_lrlwe")
|
||||||
|
CheckButton/styles/focus = SubResource("StyleBoxEmpty_smvbm")
|
||||||
|
CheckButton/styles/hover = SubResource("StyleBoxEmpty_4kjnm")
|
||||||
|
CheckButton/styles/hover_pressed = SubResource("StyleBoxEmpty_nu12h")
|
||||||
|
CheckButton/styles/normal = SubResource("StyleBoxEmpty_xv2fk")
|
||||||
|
CheckButton/styles/pressed = SubResource("StyleBoxEmpty_xq6cm")
|
||||||
GlowLabel/base_type = &"Label"
|
GlowLabel/base_type = &"Label"
|
||||||
GlowLabel/fonts/font = ExtResource("3_fjg1d")
|
GlowLabel/fonts/font = ExtResource("3_fjg1d")
|
||||||
HSeparator/styles/separator = SubResource("StyleBoxEmpty_y3y82")
|
HSeparator/styles/separator = SubResource("StyleBoxEmpty_y3y82")
|
||||||
|
|||||||
45
Settings.gd
45
Settings.gd
@@ -1,29 +1,50 @@
|
|||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
|
@onready var ToggleNode = $VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer/Toggle
|
||||||
|
@onready var RelativeNode = $VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer/Relative
|
||||||
|
@onready var AbsoluteNode = $VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer/Absolute
|
||||||
|
@onready var MusicNode = $VBoxContainer/HBoxContainer/RightPanel/Music
|
||||||
|
@onready var EffectsNode = $VBoxContainer/HBoxContainer/RightPanel/Effects
|
||||||
|
@onready var VersionNode = $VBoxContainer/Version
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$VBoxContainer/Version.text = "Version %s" % ProjectSettings.get_setting("application/config/version")
|
VersionNode.text = "Version %s" % ProjectSettings.get_setting("application/config/version")
|
||||||
$VBoxContainer/HBoxContainer/LeftPanel/Relative.button_pressed = Global.relative_mouse
|
ToggleNode.button_pressed = Global.relative_mouse
|
||||||
$VBoxContainer/HBoxContainer/LeftPanel/Absolute.button_pressed = !Global.relative_mouse
|
AbsoluteNode.theme_type_variation = "" if Global.relative_mouse else "GlowLabel"
|
||||||
$VBoxContainer/HBoxContainer/RightPanel/Music.set_value_no_signal(Global.music_volume)
|
RelativeNode.theme_type_variation = "GlowLabel" if Global.relative_mouse else ""
|
||||||
$VBoxContainer/HBoxContainer/RightPanel/Effects.set_value_no_signal(Global.effects_volume)
|
MusicNode.set_value_no_signal(Global.music_volume)
|
||||||
|
EffectsNode.set_value_no_signal(Global.effects_volume)
|
||||||
|
|
||||||
func _on_relative_pressed() -> void:
|
|
||||||
Global.relative_mouse = true
|
|
||||||
|
|
||||||
func _on_absolute_pressed() -> void:
|
|
||||||
Global.relative_mouse = false
|
|
||||||
|
|
||||||
func _on_exit_pressed() -> void:
|
func _on_exit_pressed() -> void:
|
||||||
get_tree().change_scene_to_file("res://Intro.tscn")
|
get_tree().change_scene_to_file("res://Intro.tscn")
|
||||||
|
|
||||||
func _on_music_volume_drag_ended(value_changed: bool) -> void:
|
func _on_music_volume_drag_ended(value_changed: bool) -> void:
|
||||||
Global.music_volume = $VBoxContainer/HBoxContainer/RightPanel/Music.value
|
Global.music_volume = MusicNode.value
|
||||||
|
|
||||||
func _on_effects_volume_drag_ended(value_changed: bool) -> void:
|
func _on_effects_volume_drag_ended(value_changed: bool) -> void:
|
||||||
Global.effects_volume = $VBoxContainer/HBoxContainer/RightPanel/Effects.value
|
Global.effects_volume = EffectsNode.value
|
||||||
$Boink.play()
|
$Boink.play()
|
||||||
|
|
||||||
|
|
||||||
func _on_reset_times_pressed() -> void:
|
func _on_reset_times_pressed() -> void:
|
||||||
Global.reset_best_times()
|
Global.reset_best_times()
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func _on_toggle_pressed() -> void:
|
||||||
|
Global.relative_mouse = ToggleNode.button_pressed
|
||||||
|
AbsoluteNode.theme_type_variation = "" if Global.relative_mouse else "GlowLabel"
|
||||||
|
RelativeNode.theme_type_variation = "GlowLabel" if Global.relative_mouse else ""
|
||||||
|
|
||||||
|
func _on_absolute_pressed() -> void:
|
||||||
|
Global.relative_mouse = false
|
||||||
|
ToggleNode.button_pressed = false
|
||||||
|
AbsoluteNode.theme_type_variation = "" if Global.relative_mouse else "GlowLabel"
|
||||||
|
RelativeNode.theme_type_variation = "GlowLabel" if Global.relative_mouse else ""
|
||||||
|
|
||||||
|
func _on_relative_pressed() -> void:
|
||||||
|
Global.relative_mouse = true
|
||||||
|
ToggleNode.button_pressed = true
|
||||||
|
AbsoluteNode.theme_type_variation = "" if Global.relative_mouse else "GlowLabel"
|
||||||
|
RelativeNode.theme_type_variation = "GlowLabel" if Global.relative_mouse else ""
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://dm61ni80p8hll"]
|
[gd_scene load_steps=4 format=3 uid="uid://dm61ni80p8hll"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Settings.gd" id="1_a8wdi"]
|
[ext_resource type="Script" path="res://Settings.gd" id="1_a8wdi"]
|
||||||
[ext_resource type="Theme" uid="uid://cfvww0geatnnk" path="res://MainTheme.tres" id="1_lirja"]
|
[ext_resource type="Theme" uid="uid://cfvww0geatnnk" path="res://MainTheme.tres" id="1_lirja"]
|
||||||
[ext_resource type="ButtonGroup" uid="uid://6t0fev6x6qyf" path="res://MouseMode.tres" id="2_5uw4g"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://d3g30x1n2ncjj" path="res://Sounds/PaddleHit.wav" id="4_hgwvx"]
|
[ext_resource type="AudioStream" uid="uid://d3g30x1n2ncjj" path="res://Sounds/PaddleHit.wav" id="4_hgwvx"]
|
||||||
|
|
||||||
[node name="Settings" type="Node2D"]
|
[node name="Settings" type="Node2D"]
|
||||||
|
texture_filter = 1
|
||||||
script = ExtResource("1_a8wdi")
|
script = ExtResource("1_a8wdi")
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
@@ -37,22 +37,34 @@ size_flags_horizontal = 3
|
|||||||
[node name="MouseModeLabel" type="Label" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
[node name="MouseModeLabel" type="Label" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("1_lirja")
|
theme = ExtResource("1_lirja")
|
||||||
|
theme_type_variation = &"GlowLabel"
|
||||||
text = "Mouse Mode"
|
text = "Mouse Mode"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Relative" type="CheckButton" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
||||||
|
custom_minimum_size = Vector2(0, 8)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("1_lirja")
|
theme = ExtResource("1_lirja")
|
||||||
button_group = ExtResource("2_5uw4g")
|
|
||||||
text = "Relative"
|
|
||||||
|
|
||||||
[node name="Absolute" type="CheckButton" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/LeftPanel"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Absolute" type="Button" parent="VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("1_lirja")
|
theme = ExtResource("1_lirja")
|
||||||
button_group = ExtResource("2_5uw4g")
|
|
||||||
text = "Absolute"
|
text = "Absolute"
|
||||||
|
|
||||||
|
[node name="Toggle" type="CheckButton" parent="VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("1_lirja")
|
||||||
|
|
||||||
|
[node name="Relative" type="Button" parent="VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("1_lirja")
|
||||||
|
text = "Relative
|
||||||
|
"
|
||||||
|
|
||||||
[node name="CenterGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
[node name="CenterGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
||||||
custom_minimum_size = Vector2(32, 0)
|
custom_minimum_size = Vector2(32, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -62,6 +74,20 @@ theme = ExtResource("1_lirja")
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Volume" type="Label" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("1_lirja")
|
||||||
|
theme_type_variation = &"GlowLabel"
|
||||||
|
text = "Volume
|
||||||
|
"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="VSeparator3" type="VSeparator" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
|
custom_minimum_size = Vector2(0, 8)
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("1_lirja")
|
||||||
|
|
||||||
[node name="MusicLabel" type="Label" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
[node name="MusicLabel" type="Label" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("1_lirja")
|
theme = ExtResource("1_lirja")
|
||||||
@@ -72,9 +98,14 @@ vertical_alignment = 1
|
|||||||
[node name="Music" type="HSlider" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
[node name="Music" type="HSlider" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
min_value = -80.0
|
min_value = -80.0
|
||||||
max_value = 6.0
|
max_value = 0.0
|
||||||
tick_count = 10
|
tick_count = 10
|
||||||
|
|
||||||
|
[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
|
custom_minimum_size = Vector2(0, 8)
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("1_lirja")
|
||||||
|
|
||||||
[node name="EffectsLabel" type="Label" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
[node name="EffectsLabel" type="Label" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = ExtResource("1_lirja")
|
theme = ExtResource("1_lirja")
|
||||||
@@ -85,7 +116,7 @@ vertical_alignment = 1
|
|||||||
[node name="Effects" type="HSlider" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
[node name="Effects" type="HSlider" parent="VBoxContainer/HBoxContainer/RightPanel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
min_value = -80.0
|
min_value = -80.0
|
||||||
max_value = 6.0
|
max_value = 0.0
|
||||||
tick_count = 10
|
tick_count = 10
|
||||||
|
|
||||||
[node name="RightGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
[node name="RightGutter" type="HSeparator" parent="VBoxContainer/HBoxContainer"]
|
||||||
@@ -116,8 +147,9 @@ text = "Exit"
|
|||||||
stream = ExtResource("4_hgwvx")
|
stream = ExtResource("4_hgwvx")
|
||||||
bus = &"Effects"
|
bus = &"Effects"
|
||||||
|
|
||||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/Relative" to="." method="_on_relative_pressed"]
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer/Absolute" to="." method="_on_absolute_pressed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/Absolute" to="." method="_on_absolute_pressed"]
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer/Toggle" to="." method="_on_toggle_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/LeftPanel/HBoxContainer/Relative" to="." method="_on_relative_pressed"]
|
||||||
[connection signal="drag_ended" from="VBoxContainer/HBoxContainer/RightPanel/Music" to="." method="_on_music_volume_drag_ended"]
|
[connection signal="drag_ended" from="VBoxContainer/HBoxContainer/RightPanel/Music" to="." method="_on_music_volume_drag_ended"]
|
||||||
[connection signal="drag_ended" from="VBoxContainer/HBoxContainer/RightPanel/Effects" to="." method="_on_effects_volume_drag_ended"]
|
[connection signal="drag_ended" from="VBoxContainer/HBoxContainer/RightPanel/Effects" to="." method="_on_effects_volume_drag_ended"]
|
||||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/ResetTimes" to="." method="_on_reset_times_pressed"]
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/ResetTimes" to="." method="_on_reset_times_pressed"]
|
||||||
|
|||||||
BIN
Sprites/SwitchLeft.png
Normal file
BIN
Sprites/SwitchLeft.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 618 B |
34
Sprites/SwitchLeft.png.import
Normal file
34
Sprites/SwitchLeft.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ehln08gxfdcr"
|
||||||
|
path="res://.godot/imported/SwitchLeft.png-40dfbb2f582b9099fc53ce071c5bdd7c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/SwitchLeft.png"
|
||||||
|
dest_files=["res://.godot/imported/SwitchLeft.png-40dfbb2f582b9099fc53ce071c5bdd7c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
Sprites/SwitchRight.png
Normal file
BIN
Sprites/SwitchRight.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 616 B |
34
Sprites/SwitchRight.png.import
Normal file
34
Sprites/SwitchRight.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cs1pg5j0t3kv2"
|
||||||
|
path="res://.godot/imported/SwitchRight.png-842d0d1fb440bac6ccc11b2cf5220da0.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/SwitchRight.png"
|
||||||
|
dest_files=["res://.godot/imported/SwitchRight.png-842d0d1fb440bac6ccc11b2cf5220da0.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -11,7 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Dunkanoid"
|
config/name="Dunkanoid"
|
||||||
config/version="1.0.2"
|
config/version="1.0.3"
|
||||||
run/main_scene="res://Intro.tscn"
|
run/main_scene="res://Intro.tscn"
|
||||||
config/features=PackedStringArray("4.2", "Forward Plus")
|
config/features=PackedStringArray("4.2", "Forward Plus")
|
||||||
run/max_fps=30
|
run/max_fps=30
|
||||||
|
|||||||
Reference in New Issue
Block a user