Main menu looking almost good
This commit is contained in:
@@ -2,10 +2,55 @@
|
||||
|
||||
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_ekxnf"]
|
||||
[ext_resource type="AudioStream" uid="uid://b7dgmblbcm0cj" path="res://assets/music/menu_theme.OGG" id="1_yqeox"]
|
||||
[ext_resource type="Texture2D" uid="uid://b47b6tt142b25" path="res://assets/sprites/main_menu.BMP" id="3_bqqt6"]
|
||||
[ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_wu84c"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wu84c"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(0, 0, 800, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8ln24"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(0, 600, 800, 348)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bqqt6"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(-1, 995, 800, 43)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rtw2f"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(0, 950, 800, 45)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oa1go"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(800, 744, 515, 210)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_hover"]
|
||||
resource_name = "ButtonHoverSFX"
|
||||
script/source = "extends VBoxContainer
|
||||
|
||||
@onready var hover_sfx: AudioStreamPlayer = $HoverSFX
|
||||
|
||||
func _ready() -> void:
|
||||
for child in get_children():
|
||||
if child is TextureButton:
|
||||
child.mouse_entered.connect(_on_button_hovered)
|
||||
|
||||
func _on_button_hovered() -> void:
|
||||
hover_sfx.play()
|
||||
"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tbmy8"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 0, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jk1qb"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 300, 330, 50)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_bqqt6"]
|
||||
resource_name = "StartButton"
|
||||
script/source = "extends Button
|
||||
script/source = "extends TextureButton
|
||||
|
||||
const COMBAT_SCENE = preload(\"res://scenes/strategy_phase.tscn\")
|
||||
const UNIT_SCENE = preload(\"res://prefabs/unit.tscn\")
|
||||
@@ -48,11 +93,43 @@ func _pressed() -> void:
|
||||
tree.current_scene = combat_instance
|
||||
"
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_ekxnf"]
|
||||
resource_name = "ExitButton"
|
||||
script/source = "extends Button
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5dd4i"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 60, 330, 50)
|
||||
|
||||
func _pressed() -> void:
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lgwnu"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 360, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_flqon"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 120, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rcqid"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 420, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1ajci"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 180, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7b55j"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 480, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5pajh"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 240, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j7ex8"]
|
||||
atlas = ExtResource("3_bqqt6")
|
||||
region = Rect2(1550, 540, 330, 50)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_wu84c"]
|
||||
resource_name = "ExitButton"
|
||||
script/source = "extends TextureButton
|
||||
|
||||
func _pressed():
|
||||
get_tree().quit(0)
|
||||
"
|
||||
|
||||
@@ -68,28 +145,110 @@ theme = ExtResource("1_ekxnf")
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1976575731]
|
||||
stream = ExtResource("1_yqeox")
|
||||
autoplay = true
|
||||
parameters/looping = true
|
||||
|
||||
[node name="Buttons" type="VBoxContainer" parent="." unique_id=1869378860]
|
||||
[node name="Background" type="Control" parent="." unique_id=801579001]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="StartButton" type="Button" parent="Buttons" unique_id=734401781]
|
||||
[node name="Top" type="TextureRect" parent="Background" unique_id=2030397311]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 400.0
|
||||
grow_horizontal = 2
|
||||
texture = SubResource("AtlasTexture_wu84c")
|
||||
|
||||
[node name="Bottom" type="TextureRect" parent="Background" unique_id=736979824]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -348.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
texture = SubResource("AtlasTexture_8ln24")
|
||||
|
||||
[node name="BottomBorder" type="TextureRect" parent="Background" unique_id=2048064934]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -45.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
texture = SubResource("AtlasTexture_bqqt6")
|
||||
|
||||
[node name="TopBorder" type="TextureRect" parent="Background" unique_id=812827884]
|
||||
layout_mode = 0
|
||||
offset_right = 800.0
|
||||
offset_bottom = 45.0
|
||||
texture = SubResource("AtlasTexture_rtw2f")
|
||||
|
||||
[node name="Logo" type="TextureRect" parent="Background" unique_id=815631332]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -257.5
|
||||
offset_top = 50.0
|
||||
offset_right = 257.5
|
||||
offset_bottom = 210.0
|
||||
grow_horizontal = 2
|
||||
texture = SubResource("AtlasTexture_oa1go")
|
||||
|
||||
[node name="Buttons" type="VBoxContainer" parent="." unique_id=1869378860]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.29375
|
||||
anchor_top = 0.5566667
|
||||
anchor_right = 0.70625
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 1.5258789e-05
|
||||
offset_bottom = -55.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
alignment = 1
|
||||
script = SubResource("GDScript_hover")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="HoverSFX" type="AudioStreamPlayer" parent="Buttons" unique_id=256435189]
|
||||
stream = ExtResource("4_wu84c")
|
||||
|
||||
[node name="StartButton" type="TextureButton" parent="Buttons" unique_id=973041905]
|
||||
layout_mode = 2
|
||||
text = "Start"
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_tbmy8")
|
||||
texture_hover = SubResource("AtlasTexture_jk1qb")
|
||||
script = SubResource("GDScript_bqqt6")
|
||||
|
||||
[node name="Options" type="Button" parent="Buttons" unique_id=1037030570]
|
||||
[node name="LoadButton" type="TextureButton" parent="Buttons" unique_id=2075751086]
|
||||
layout_mode = 2
|
||||
text = "Options"
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_5dd4i")
|
||||
texture_hover = SubResource("AtlasTexture_lgwnu")
|
||||
|
||||
[node name="ExitButton" type="Button" parent="Buttons" unique_id=1205095617]
|
||||
[node name="EushullyButton" type="TextureButton" parent="Buttons" unique_id=412756984]
|
||||
layout_mode = 2
|
||||
text = "Exit"
|
||||
script = SubResource("GDScript_ekxnf")
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_flqon")
|
||||
texture_hover = SubResource("AtlasTexture_rcqid")
|
||||
|
||||
[connection signal="pressed" from="Buttons/Options" to="Buttons/Options" method="_on_pressed"]
|
||||
[node name="OptionsButton" type="TextureButton" parent="Buttons" unique_id=1002907774]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_1ajci")
|
||||
texture_hover = SubResource("AtlasTexture_7b55j")
|
||||
|
||||
[node name="ExitButton" type="TextureButton" parent="Buttons" unique_id=286651369]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_5pajh")
|
||||
texture_hover = SubResource("AtlasTexture_j7ex8")
|
||||
script = SubResource("GDScript_wu84c")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[ext_resource type="Script" uid="uid://csdcbi2gtwrly" path="res://scripts/camera_controller.gd" id="4_ww3c6"]
|
||||
[ext_resource type="AudioStream" uid="uid://dsikulned64qt" path="res://assets/music/combat_bgm_01.OGG" id="5_ficdm"]
|
||||
[ext_resource type="Script" uid="uid://cf4ivrcbky0s3" path="res://nodes/combat_system.gd" id="6_combat"]
|
||||
[ext_resource type="Script" path="res://nodes/strategy_phase.gd" id="7_strat"]
|
||||
[ext_resource type="Script" uid="uid://dnsqtsx4u2hx4" path="res://nodes/strategy_phase.gd" id="7_strat"]
|
||||
|
||||
[node name="CombatTest" type="Node2D" unique_id=855645983]
|
||||
script = ExtResource("7_strat")
|
||||
@@ -23,6 +23,7 @@ dl_map = NodePath("../CombatMap")
|
||||
script = ExtResource("6_combat")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=1739569732]
|
||||
position = Vector2(384, 216)
|
||||
zoom = Vector2(1.5, 1.5)
|
||||
script = ExtResource("4_ww3c6")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user