feat: ui buttons
BIN
assets/sprites/ui/buttons/add-dragon-highlight.png
Normal file
After Width: | Height: | Size: 554 B |
34
assets/sprites/ui/buttons/add-dragon-highlight.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://75txlqcp2ucn"
|
||||
path="res://.godot/imported/add-dragon-highlight.png-41898f9ae3ddfd659db8c4c2156b7366.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/add-dragon-highlight.png"
|
||||
dest_files=["res://.godot/imported/add-dragon-highlight.png-41898f9ae3ddfd659db8c4c2156b7366.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
assets/sprites/ui/buttons/add-dragon-press.png
Normal file
After Width: | Height: | Size: 532 B |
34
assets/sprites/ui/buttons/add-dragon-press.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d1k808702cbcw"
|
||||
path="res://.godot/imported/add-dragon-press.png-c99d82582f293aaa68e11e2fb02f49e4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/add-dragon-press.png"
|
||||
dest_files=["res://.godot/imported/add-dragon-press.png-c99d82582f293aaa68e11e2fb02f49e4.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
assets/sprites/ui/buttons/add-dragon.png
Normal file
After Width: | Height: | Size: 534 B |
34
assets/sprites/ui/buttons/add-dragon.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bbd3p787bmg3m"
|
||||
path="res://.godot/imported/add-dragon.png-82a36ce738cebfeaa5078dd6de9b9710.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/add-dragon.png"
|
||||
dest_files=["res://.godot/imported/add-dragon.png-82a36ce738cebfeaa5078dd6de9b9710.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
assets/sprites/ui/buttons/close-game-highlight.png
Normal file
After Width: | Height: | Size: 552 B |
34
assets/sprites/ui/buttons/close-game-highlight.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bawbgis3cgdtu"
|
||||
path="res://.godot/imported/close-game-highlight.png-d5a62a31259194975f113b7db6f17522.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/close-game-highlight.png"
|
||||
dest_files=["res://.godot/imported/close-game-highlight.png-d5a62a31259194975f113b7db6f17522.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
assets/sprites/ui/buttons/close-game.png
Normal file
After Width: | Height: | Size: 534 B |
34
assets/sprites/ui/buttons/close-game.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ci7cb3kgavax4"
|
||||
path="res://.godot/imported/close-game.png-618d96e50398df2aacb8d97f2ab8cd43.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/close-game.png"
|
||||
dest_files=["res://.godot/imported/close-game.png-618d96e50398df2aacb8d97f2ab8cd43.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
assets/sprites/ui/buttons/dragon-list-highlight.png
Normal file
After Width: | Height: | Size: 543 B |
34
assets/sprites/ui/buttons/dragon-list-highlight.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://emm3gwb5fuqo"
|
||||
path="res://.godot/imported/dragon-list-highlight.png-94c8866c0da9b8252b4e4bead07f7b0a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/dragon-list-highlight.png"
|
||||
dest_files=["res://.godot/imported/dragon-list-highlight.png-94c8866c0da9b8252b4e4bead07f7b0a.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
assets/sprites/ui/buttons/dragon-list.png
Normal file
After Width: | Height: | Size: 523 B |
34
assets/sprites/ui/buttons/dragon-list.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpdhhhdmh5n58"
|
||||
path="res://.godot/imported/dragon-list.png-95bf8cf726fb5913cfced32d642f1f0b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/buttons/dragon-list.png"
|
||||
dest_files=["res://.godot/imported/dragon-list.png-95bf8cf726fb5913cfced32d642f1f0b.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
|
|
@ -1,4 +1,4 @@
|
|||
extends Button
|
||||
extends TextureButton
|
||||
|
||||
|
||||
@export var dragon_editor: PackedScene
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends Button
|
||||
extends TextureButton
|
||||
|
||||
|
||||
@export var dragon_list: PackedScene
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
[gd_scene load_steps=13 format=3 uid="uid://ctytpqaed0yqx"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://ctytpqaed0yqx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3kyt3shje5r1" path="res://scenes/main.gd" id="1_sugp2"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7nfcgjxqeg7l" path="res://scenes/window/dragon_popup.tscn" id="2_jyhfs"]
|
||||
[ext_resource type="PackedScene" uid="uid://miutbdsgccd1" path="res://scenes/dragons/dragon.tscn" id="4_jyhfs"]
|
||||
[ext_resource type="Script" uid="uid://cj4l3a6a8ro0r" path="res://scenes/create_button.gd" id="4_tbgi4"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdlipr8l1k38a" path="res://scenes/name_setter/name_setter.tscn" id="4_trceg"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbd3p787bmg3m" path="res://assets/sprites/ui/buttons/add-dragon.png" id="5_jkv2x"]
|
||||
[ext_resource type="PackedScene" uid="uid://fut42ruut302" path="res://scenes/dragon_editor/dragon_editor.tscn" id="5_tefeu"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1k808702cbcw" path="res://assets/sprites/ui/buttons/add-dragon-press.png" id="6_muem4"]
|
||||
[ext_resource type="Texture2D" uid="uid://75txlqcp2ucn" path="res://assets/sprites/ui/buttons/add-dragon-highlight.png" id="7_dp3eg"]
|
||||
[ext_resource type="Texture2D" uid="uid://ci7cb3kgavax4" path="res://assets/sprites/ui/buttons/close-game.png" id="8_jbj1t"]
|
||||
[ext_resource type="Script" uid="uid://oc6mw86npbii" path="res://scenes/list_button.gd" id="9_choun"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpdhhhdmh5n58" path="res://assets/sprites/ui/buttons/dragon-list.png" id="9_muem4"]
|
||||
[ext_resource type="PackedScene" uid="uid://tubxrqxjic6r" path="res://scenes/dragon_list/dragon_list.tscn" id="10_ya4ey"]
|
||||
[ext_resource type="Texture2D" uid="uid://emm3gwb5fuqo" path="res://assets/sprites/ui/buttons/dragon-list-highlight.png" id="12_dp3eg"]
|
||||
[ext_resource type="Texture2D" uid="uid://bawbgis3cgdtu" path="res://assets/sprites/ui/buttons/close-game-highlight.png" id="15_0ld40"]
|
||||
[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"]
|
||||
|
@ -29,46 +36,43 @@ max_dragon_instantiation_time = 600.0
|
|||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Create" type="Button" parent="CanvasLayer"]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -585.0
|
||||
offset_top = 11.0
|
||||
offset_right = -543.0
|
||||
offset_bottom = 42.0
|
||||
grow_horizontal = 0
|
||||
focus_mode = 0
|
||||
text = "crea"
|
||||
[node name="Create" type="TextureButton" parent="CanvasLayer"]
|
||||
offset_left = 535.0
|
||||
offset_top = 42.0
|
||||
offset_right = 575.0
|
||||
offset_bottom = 82.0
|
||||
texture_normal = ExtResource("5_jkv2x")
|
||||
texture_pressed = ExtResource("7_dp3eg")
|
||||
texture_hover = ExtResource("7_dp3eg")
|
||||
texture_disabled = ExtResource("6_muem4")
|
||||
texture_focused = ExtResource("5_jkv2x")
|
||||
script = ExtResource("4_tbgi4")
|
||||
dragon_editor = ExtResource("5_tefeu")
|
||||
|
||||
[node name="Close" type="Button" parent="CanvasLayer"]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -525.0
|
||||
offset_top = 12.0
|
||||
offset_right = -474.0
|
||||
offset_bottom = 43.0
|
||||
grow_horizontal = 0
|
||||
focus_mode = 0
|
||||
text = "tanca"
|
||||
|
||||
[node name="List" type="Button" parent="CanvasLayer"]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -456.0
|
||||
offset_top = 14.0
|
||||
offset_right = -411.0
|
||||
offset_bottom = 45.0
|
||||
grow_horizontal = 0
|
||||
focus_mode = 0
|
||||
text = "llista"
|
||||
[node name="List" type="TextureButton" parent="CanvasLayer"]
|
||||
offset_left = 535.0
|
||||
offset_top = 82.0
|
||||
offset_right = 575.0
|
||||
offset_bottom = 122.0
|
||||
texture_normal = ExtResource("9_muem4")
|
||||
texture_pressed = ExtResource("12_dp3eg")
|
||||
texture_hover = ExtResource("12_dp3eg")
|
||||
texture_disabled = ExtResource("9_muem4")
|
||||
texture_focused = ExtResource("9_muem4")
|
||||
script = ExtResource("9_choun")
|
||||
dragon_list = ExtResource("10_ya4ey")
|
||||
|
||||
[node name="Close" type="TextureButton" parent="CanvasLayer"]
|
||||
offset_left = 535.0
|
||||
offset_top = 122.0
|
||||
offset_right = 575.0
|
||||
offset_bottom = 162.0
|
||||
texture_normal = ExtResource("8_jbj1t")
|
||||
texture_pressed = ExtResource("15_0ld40")
|
||||
texture_hover = ExtResource("15_0ld40")
|
||||
texture_disabled = ExtResource("8_jbj1t")
|
||||
texture_focused = ExtResource("8_jbj1t")
|
||||
|
||||
[node name="Castle" type="Node2D" parent="."]
|
||||
|
||||
[node name="DpCastleBack" type="Sprite2D" parent="Castle"]
|
||||
|
@ -109,6 +113,6 @@ script = ExtResource("17_muem4")
|
|||
|
||||
[connection signal="tree_entered" from="." to="." method="_on_tree_entered"]
|
||||
[connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"]
|
||||
[connection signal="button_up" from="CanvasLayer/Create" to="CanvasLayer/Create" method="_on_button_up"]
|
||||
[connection signal="pressed" from="CanvasLayer/Close" to="." method="_on_close_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Create" to="CanvasLayer/Create" method="_on_button_up"]
|
||||
[connection signal="pressed" from="CanvasLayer/List" to="CanvasLayer/List" method="_on_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Close" to="." method="_on_close_pressed"]
|
||||
|
|