feat: menu overhaul

This commit is contained in:
Gerard Gascón 2025-04-17 00:05:40 +02:00
parent b17c7280ea
commit f379dff516
16 changed files with 273 additions and 181 deletions

View file

@ -6,10 +6,6 @@ var save_load: SaveLoad
@onready var name_edit: LineEdit = $Name
func _ready() -> void:
pass
func set_save_load(save_load: SaveLoad) -> void:
self.save_load = save_load

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://cdlipr8l1k38a"]
[gd_scene load_steps=8 format=3 uid="uid://cdlipr8l1k38a"]
[ext_resource type="Script" uid="uid://drulv5ptupx2w" path="res://scenes/name_setter/name_setter.gd" id="1_f3gk5"]
[ext_resource type="Texture2D" uid="uid://d27vpp71fe4de" path="res://assets/sprites/ui/DP_UI_CharList_Frame.png" id="2_wkl5f"]
[ext_resource type="Texture2D" uid="uid://bgpbbkmwt8ysq" path="res://assets/sprites/ui/DP_UI_Button_Text.png" id="3_1ipfa"]
[ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="3_fjxtl"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="3_rlhj7"]
[ext_resource type="StyleBox" uid="uid://bhe580k04w6ve" path="res://assets/styles/style_box_empty.tres" id="4_fjxtl"]
@ -13,7 +14,7 @@ region = Rect2(0, 0, 62, 24)
[node name="NameSetter" type="Window"]
transparent_bg = true
position = Vector2i(0, 36)
size = Vector2i(500, 250)
size = Vector2i(700, 300)
unresizable = true
borderless = true
always_on_top = true
@ -23,13 +24,13 @@ script = ExtResource("1_f3gk5")
[node name="Background" type="ColorRect" parent="."]
offset_left = 4.0
offset_top = 4.0
offset_right = 496.0
offset_bottom = 244.0
offset_right = 697.0
offset_bottom = 294.0
color = Color(0.176471, 0.227451, 0.239216, 1)
[node name="Border" type="NinePatchRect" parent="."]
offset_right = 500.0
offset_bottom = 250.0
offset_right = 700.0
offset_bottom = 300.0
texture = ExtResource("2_wkl5f")
patch_margin_left = 32
patch_margin_top = 32
@ -38,9 +39,11 @@ patch_margin_bottom = 32
[node name="Instructions" type="Label" parent="."]
offset_left = 6.0
offset_top = 8.0
offset_right = 494.0
offset_bottom = 161.0
offset_top = 12.0
offset_right = 694.0
offset_bottom = 223.0
theme_override_fonts/font = ExtResource("3_fjxtl")
theme_override_font_sizes/font_size = 28
text = "En aquesta torreta, present a la cantonada del teu escriptori, hi viuran uns dracs que tacompanyaran en el teu dia a dia. Fins i tot et vindran a visitar dracs d'altres torretes!
Per començar, posa un nom a la torreta.
@ -49,19 +52,21 @@ horizontal_alignment = 1
autowrap_mode = 2
[node name="NameLabelBG" type="NinePatchRect" parent="."]
offset_left = 104.0
offset_top = 167.0
offset_right = 396.0
offset_bottom = 215.0
offset_left = 204.0
offset_top = 214.0
offset_right = 496.0
offset_bottom = 262.0
texture = ExtResource("3_rlhj7")
patch_margin_left = 74
patch_margin_right = 74
[node name="Name" type="LineEdit" parent="."]
offset_left = 84.0
offset_top = 167.0
offset_right = 423.0
offset_bottom = 215.0
offset_left = 180.0
offset_top = 214.0
offset_right = 520.0
offset_bottom = 262.0
theme_override_fonts/font = ExtResource("3_fjxtl")
theme_override_font_sizes/font_size = 28
theme_override_styles/focus = ExtResource("4_fjxtl")
placeholder_text = "Nom"
alignment = 1
@ -70,10 +75,10 @@ flat = true
caret_blink = true
[node name="create" type="Button" parent="."]
offset_left = 426.0
offset_top = 212.0
offset_right = 496.0
offset_bottom = 244.0
offset_left = 626.0
offset_top = 262.0
offset_right = 696.0
offset_bottom = 294.0
focus_mode = 0
icon = SubResource("AtlasTexture_27shg")
flat = true