feat: new dragon list view

This commit is contained in:
Gerard Gascón 2025-04-22 15:18:07 +02:00
parent 922b326a66
commit 9093c5a988
4 changed files with 28 additions and 29 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

@ -8,7 +8,7 @@
[ext_resource type="Resource" uid="uid://c03ejnvavmcj5" path="res://assets/outfits/dragons.tres" id="5_1ivi1"]
[ext_resource type="SpriteFrames" uid="uid://c5rqqy7b5ihi5" path="res://assets/animations/decor/rosa.tres" id="6_c4sli"]
[ext_resource type="Texture2D" uid="uid://dceoy4417v83e" path="res://assets/sprites/ui/DP_UI_CharCreation_BG.png" id="6_udwtk"]
[ext_resource type="Script" path="res://src/draggable.gd" id="7_1vw8k"]
[ext_resource type="Script" uid="uid://dxl7onk7x6h8b" path="res://src/draggable.gd" id="7_1vw8k"]
[ext_resource type="Texture2D" uid="uid://bu5xa7tgfk3h3" path="res://assets/sprites/ui/DP_UI_Buttons01.png" id="7_qppok"]
[ext_resource type="Texture2D" uid="uid://bgpbbkmwt8ysq" path="res://assets/sprites/ui/DP_UI_Button_Text.png" id="8_ofxsr"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="12_qppok"]

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=10 format=3 uid="uid://tubxrqxjic6r"]
[gd_scene load_steps=11 format=3 uid="uid://tubxrqxjic6r"]
[ext_resource type="Script" uid="uid://dm8d0ikf1n8qa" path="res://scenes/dragon_list/dragon_list_view.gd" id="1_q7g8i"]
[ext_resource type="PackedScene" uid="uid://cq3orf2ktmel0" path="res://scenes/dragon_list/dragon/dragon.tscn" id="2_h4iwm"]
[ext_resource type="Texture2D" uid="uid://cup2lrb8lou72" path="res://assets/sprites/ui/DP_UI_CharList_BG.png" id="4_f227k"]
[ext_resource type="Texture2D" uid="uid://d27vpp71fe4de" path="res://assets/sprites/ui/DP_UI_CharList_Frame.png" id="6_74fyi"]
[ext_resource type="FontFile" uid="uid://u1pey2ilx31c" path="res://assets/fonts/Montjuic.ttf" id="8_74fyi"]
[ext_resource type="Script" path="res://src/draggable.gd" id="8_b7eir"]
[ext_resource type="Script" uid="uid://dxl7onk7x6h8b" path="res://src/draggable.gd" id="8_b7eir"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="9_cv2ce"]
[ext_resource type="Texture2D" uid="uid://bu5xa7tgfk3h3" path="res://assets/sprites/ui/DP_UI_Buttons01.png" id="9_k4ppc"]
@ -18,7 +19,7 @@ region = Rect2(0, 160, 38, 40)
[node name="DragonList" type="Window" node_paths=PackedStringArray("dragon_list_pivot", "origin_name_label", "dragon_name_label")]
transparent_bg = true
size = Vector2i(300, 332)
size = Vector2i(344, 332)
unresizable = true
borderless = true
always_on_top = true
@ -31,13 +32,6 @@ dragon_name_label = NodePath("CanvasLayer/NameLabel/Label")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
offset_left = 22.0
offset_top = 38.0
offset_right = 296.0
offset_bottom = 308.0
color = Color(0.176471, 0.227451, 0.239216, 1)
[node name="Background" type="NinePatchRect" parent="CanvasLayer"]
offset_left = 18.0
offset_top = 32.0
@ -49,11 +43,16 @@ patch_margin_top = 32
patch_margin_right = 32
patch_margin_bottom = 32
[node name="TextureRect" type="TextureRect" parent="CanvasLayer"]
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("4_f227k")
[node name="TowerNameLabel" type="NinePatchRect" parent="CanvasLayer"]
offset_left = 34.0
offset_top = 50.0
offset_right = 284.0
offset_bottom = 98.0
offset_left = 40.0
offset_top = 51.0
offset_right = 290.0
offset_bottom = 99.0
texture = ExtResource("9_cv2ce")
patch_margin_left = 74
patch_margin_right = 74
@ -71,9 +70,9 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="NameLabel" type="TextureRect" parent="CanvasLayer"]
offset_left = 89.0
offset_left = 94.0
offset_top = 228.0
offset_right = 237.0
offset_right = 242.0
offset_bottom = 276.0
texture = ExtResource("9_cv2ce")
@ -100,22 +99,22 @@ script = ExtResource("8_b7eir")
[node name="SubViewportContainer" type="SubViewportContainer" parent="CanvasLayer"]
offset_left = 24.0
offset_top = 105.0
offset_right = 224.0
offset_right = 306.0
offset_bottom = 213.0
[node name="SubViewport" type="SubViewport" parent="CanvasLayer/SubViewportContainer"]
transparent_bg = true
handle_input_locally = false
size = Vector2i(270, 108)
size = Vector2i(282, 108)
render_target_update_mode = 4
[node name="Pivot" type="Node2D" parent="CanvasLayer/SubViewportContainer/SubViewport"]
position = Vector2(135, 54)
position = Vector2(143, 54)
[node name="dragon_previous" type="Button" parent="CanvasLayer"]
offset_left = 127.0
offset_left = 136.0
offset_top = 136.0
offset_right = 173.0
offset_right = 182.0
offset_bottom = 184.0
scale = Vector2(-1, 1)
focus_mode = 0
@ -123,19 +122,19 @@ icon = SubResource("AtlasTexture_1n46k")
flat = true
[node name="dragon_next" type="Button" parent="CanvasLayer"]
offset_left = 185.0
offset_left = 194.0
offset_top = 136.0
offset_right = 231.0
offset_right = 240.0
offset_bottom = 184.0
focus_mode = 0
icon = SubResource("AtlasTexture_1n46k")
flat = true
[node name="close" type="Button" parent="CanvasLayer"]
offset_left = 264.0
offset_top = 12.0
offset_right = 310.0
offset_bottom = 60.0
offset_left = 292.0
offset_top = 6.0
offset_right = 338.0
offset_bottom = 54.0
focus_mode = 0
icon = SubResource("AtlasTexture_u20w8")
flat = true

View file

@ -11,7 +11,7 @@
[ext_resource type="Texture2D" uid="uid://bc2lykc3gwykh" path="res://assets/sprites/environment/castle/DP_castle_back.png" id="15_muem4"]
[ext_resource type="Texture2D" uid="uid://o1e8lge2vuqu" path="res://assets/sprites/environment/castle/DP_castle_mid.png" id="16_dp3eg"]
[ext_resource type="Texture2D" uid="uid://b1w6y1qvetsaw" path="res://assets/sprites/environment/castle/DP_castle_front.png" id="17_0ld40"]
[ext_resource type="Script" path="res://scenes/dragon_sharing.gd" id="17_muem4"]
[ext_resource type="Script" uid="uid://bg58e3dobon4j" path="res://scenes/dragon_sharing.gd" id="17_muem4"]
[node name="Base" type="Node2D" node_paths=PackedStringArray("dragon_spots", "dragon_start_spots")]
script = ExtResource("1_sugp2")