feat: started adding new ui

This commit is contained in:
Gerard Gascón 2025-04-11 17:03:19 +02:00
parent dd4c4bb5e8
commit 72013e48eb
45 changed files with 860 additions and 96 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://blkh88mh1rnm"
path="res://.godot/imported/DP_barret_barretina_Anim.png-ebd66457744b024a3e2179851454b448.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hats/DP_barret_barretina_Anim.png"
dest_files=["res://.godot/imported/DP_barret_barretina_Anim.png-ebd66457744b024a3e2179851454b448.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uchf8kc02nq2"
path="res://.godot/imported/DP_barret_casc_Anim.png-75c8cc6f159ce64f5f5aa4e5b7ca89a4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hats/DP_barret_casc_Anim.png"
dest_files=["res://.godot/imported/DP_barret_casc_Anim.png-75c8cc6f159ce64f5f5aa4e5b7ca89a4.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cikq8k32v8ann"
path="res://.godot/imported/DP_barret_copa_Anim.png-e7216cf9f41d234cf020952ae418efc1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hats/DP_barret_copa_Anim.png"
dest_files=["res://.godot/imported/DP_barret_copa_Anim.png-e7216cf9f41d234cf020952ae418efc1.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chdfhv2fysfnc"
path="res://.godot/imported/DP_barret_corona_Anim.png-65b440a539a09f8d83278ded69d36e6b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hats/DP_barret_corona_Anim.png"
dest_files=["res://.godot/imported/DP_barret_corona_Anim.png-65b440a539a09f8d83278ded69d36e6b.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwmkb6rqfiopn"
path="res://.godot/imported/DP_barret_palla_Anim.png-9c2b1863e232198bc2176f22cf834817.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hats/DP_barret_palla_Anim.png"
dest_files=["res://.godot/imported/DP_barret_palla_Anim.png-9c2b1863e232198bc2176f22cf834817.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1a5x8tv4ts0f"
path="res://.godot/imported/DP_barret_princesa_Anim.png-905c56a0c0130d0bfc2331d3d988dea1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hats/DP_barret_princesa_Anim.png"
dest_files=["res://.godot/imported/DP_barret_princesa_Anim.png-905c56a0c0130d0bfc2331d3d988dea1.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://do2jnyp7khi61"
path="res://.godot/imported/DP_tors_armadura_Anim.png-9a17dd9d38640685f1d12c4601e875d8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/shirts/DP_tors_armadura_Anim.png"
dest_files=["res://.godot/imported/DP_tors_armadura_Anim.png-9a17dd9d38640685f1d12c4601e875d8.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ckf8ac7yfrpe8"
path="res://.godot/imported/DP_tors_faixa_Anim.png-72a5543865786d1e64f2b2fb632ed6c1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/shirts/DP_tors_faixa_Anim.png"
dest_files=["res://.godot/imported/DP_tors_faixa_Anim.png-72a5543865786d1e64f2b2fb632ed6c1.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cdum44fqvsa71"
path="res://.godot/imported/DP_tors_traje_Anim.png-861b04460538a8604009d3a1cfdb8764.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/shirts/DP_tors_traje_Anim.png"
dest_files=["res://.godot/imported/DP_tors_traje_Anim.png-861b04460538a8604009d3a1cfdb8764.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cs2mds1fjgoi0"
path="res://.godot/imported/DP_tors_tutu_Anim.png-117851e7f124991f76de11ed033873f2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/shirts/DP_tors_tutu_Anim.png"
dest_files=["res://.godot/imported/DP_tors_tutu_Anim.png-117851e7f124991f76de11ed033873f2.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgpbbkmwt8ysq"
path="res://.godot/imported/DP_UI_Button_Text.png-4118c6dc859f64058ae0c56885ae74dd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_Button_Text.png"
dest_files=["res://.godot/imported/DP_UI_Button_Text.png-4118c6dc859f64058ae0c56885ae74dd.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bu5xa7tgfk3h3"
path="res://.godot/imported/DP_UI_Buttons01.png-8bf9c42efb1059969b45f58674de2bbe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_Buttons01.png"
dest_files=["res://.godot/imported/DP_UI_Buttons01.png-8bf9c42efb1059969b45f58674de2bbe.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dceoy4417v83e"
path="res://.godot/imported/DP_UI_CharCreation_BG.png-c6cfef46e2b28b9038f8191a2bdb27ea.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_CharCreation_BG.png"
dest_files=["res://.godot/imported/DP_UI_CharCreation_BG.png-c6cfef46e2b28b9038f8191a2bdb27ea.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cup2lrb8lou72"
path="res://.godot/imported/DP_UI_CharList_BG.png-7a606cdb3b4f2c6e5d0354cbfeed0452.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_CharList_BG.png"
dest_files=["res://.godot/imported/DP_UI_CharList_BG.png-7a606cdb3b4f2c6e5d0354cbfeed0452.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d27vpp71fe4de"
path="res://.godot/imported/DP_UI_CharList_Frame.png-ffcbd3ee2fcadd5064a114714775ec63.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_CharList_Frame.png"
dest_files=["res://.godot/imported/DP_UI_CharList_Frame.png-ffcbd3ee2fcadd5064a114714775ec63.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cka65mkfbdetw"
path="res://.godot/imported/DP_UI_CharList_FrameBG.png-6ae511a1e0e22414f8fe0e97958766ce.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_CharList_FrameBG.png"
dest_files=["res://.godot/imported/DP_UI_CharList_FrameBG.png-6ae511a1e0e22414f8fe0e97958766ce.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bo2ehwr5q48d0"
path="res://.godot/imported/DP_UI_CharList_Top.png-2a8cb0a34c5e9ba97fee13317cfc6d3e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_CharList_Top.png"
dest_files=["res://.godot/imported/DP_UI_CharList_Top.png-2a8cb0a34c5e9ba97fee13317cfc6d3e.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bdrm1nxydvf5t"
path="res://.godot/imported/DP_UI_Label_Big.png-5521a5777a6785c199d8a42613a97572.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_Label_Big.png"
dest_files=["res://.godot/imported/DP_UI_Label_Big.png-5521a5777a6785c199d8a42613a97572.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ct6d22ha6krsj"
path="res://.godot/imported/DP_UI_SlideBar.png-a232c43e1791b5958e9eac0879667996.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_SlideBar.png"
dest_files=["res://.godot/imported/DP_UI_SlideBar.png-a232c43e1791b5958e9eac0879667996.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bv56c620gg6m6"
path="res://.godot/imported/DP_UI_Slider.png-78de0dfd1f3ddafc89bae947eefcbf3f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/ui/DP_UI_Slider.png"
dest_files=["res://.godot/imported/DP_UI_Slider.png-78de0dfd1f3ddafc89bae947eefcbf3f.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

View file

@ -0,0 +1,3 @@
[gd_resource type="StyleBoxEmpty" format=3 uid="uid://bhe580k04w6ve"]
[resource]

View file

@ -12,7 +12,9 @@ class_name DragonEditor
@export var shoes_outfits: DragonOutfit @export var shoes_outfits: DragonOutfit
@export var dragon_colors: DragonOutfit @export var dragon_colors: DragonOutfit
@onready var dragon_name: LineEdit = $CanvasLayer/LineEdit @onready var dragon_name: LineEdit = $CanvasLayer/NameLabel/LineEdit
@onready var dragger: DraggableWindow = $CanvasLayer/Dragger
signal on_create_dragon(hat: Texture2D, shirt: Texture2D, shoes: Texture2D, dragon_name: String) signal on_create_dragon(hat: Texture2D, shirt: Texture2D, shoes: Texture2D, dragon_name: String)
@ -21,10 +23,12 @@ func _ready() -> void:
hat.texture = null hat.texture = null
shirt.texture = null shirt.texture = null
shoes.texture = null shoes.texture = null
dragger.on_drag.connect(_on_drag)
func _on_close_requested() -> void: func _on_drag(offset: Vector2i):
queue_free() position += offset
func _on_next_color_pressed() -> void: func _on_next_color_pressed() -> void:
@ -52,3 +56,7 @@ func _on_create_pressed() -> void:
return return
on_create_dragon.emit(hat.texture, shirt.texture, shoes.texture, dragon_name.text) on_create_dragon.emit(hat.texture, shirt.texture, shoes.texture, dragon_name.text)
queue_free() queue_free()
func _on_close_pressed() -> void:
queue_free()

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://fut42ruut302"] [gd_scene load_steps=23 format=3 uid="uid://fut42ruut302"]
[ext_resource type="Script" uid="uid://bfuos2kgfgber" path="res://scenes/dragon_editor/dragon_editor.gd" id="1_8vkll"] [ext_resource type="Script" uid="uid://bfuos2kgfgber" path="res://scenes/dragon_editor/dragon_editor.gd" id="1_8vkll"]
[ext_resource type="Resource" uid="uid://cnhwn6kfcbjl5" path="res://assets/outfits/hats.tres" id="2_vvtct"] [ext_resource type="Resource" uid="uid://cnhwn6kfcbjl5" path="res://assets/outfits/hats.tres" id="2_vvtct"]
@ -7,17 +7,49 @@
[ext_resource type="Resource" uid="uid://bcs60f2k7h0jc" path="res://assets/outfits/dragons.tres" id="5_1ivi1"] [ext_resource type="Resource" uid="uid://bcs60f2k7h0jc" path="res://assets/outfits/dragons.tres" id="5_1ivi1"]
[ext_resource type="Texture2D" uid="uid://dl87ffgh2hl68" path="res://assets/sprites/dragons/DragonPet_drac01.png" id="5_xhgxf"] [ext_resource type="Texture2D" uid="uid://dl87ffgh2hl68" path="res://assets/sprites/dragons/DragonPet_drac01.png" id="5_xhgxf"]
[ext_resource type="Texture2D" uid="uid://12fv5nymaljj" path="res://assets/sprites/hats/DragonPet_barret_barretina.png" id="6_1ivi1"] [ext_resource type="Texture2D" uid="uid://12fv5nymaljj" path="res://assets/sprites/hats/DragonPet_barret_barretina.png" id="6_1ivi1"]
[ext_resource type="Texture2D" uid="uid://dceoy4417v83e" path="res://assets/sprites/ui/DP_UI_CharCreation_BG.png" id="6_udwtk"]
[ext_resource type="Script" uid="uid://dxl7onk7x6h8b" path="res://src/draggable.gd" id="7_1vw8k"]
[ext_resource type="Texture2D" uid="uid://cs0ke244c33t2" path="res://assets/sprites/shirts/DragonPet_roba_armadura.png" id="7_giwys"] [ext_resource type="Texture2D" uid="uid://cs0ke244c33t2" path="res://assets/sprites/shirts/DragonPet_roba_armadura.png" id="7_giwys"]
[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://onajhbpjtnil" path="res://assets/sprites/decor/DragonPet_acc_escut.png" id="8_udwtk"] [ext_resource type="Texture2D" uid="uid://onajhbpjtnil" path="res://assets/sprites/decor/DragonPet_acc_escut.png" id="8_udwtk"]
[ext_resource type="Script" uid="uid://mhudiyt5gnt1" path="res://scenes/dragon_editor/line_edit.gd" id="9_xhgxf"] [ext_resource type="Script" uid="uid://mhudiyt5gnt1" path="res://scenes/dragon_editor/line_edit.gd" id="9_xhgxf"]
[ext_resource type="Texture2D" uid="uid://bdrm1nxydvf5t" path="res://assets/sprites/ui/DP_UI_Label_Big.png" id="12_qppok"]
[ext_resource type="StyleBox" uid="uid://bhe580k04w6ve" path="res://assets/styles/style_box_empty.tres" id="14_bh8dj"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ofxsr"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 40, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_bh8dj"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 80, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_1vw8k"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 0, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_rrp4v"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 120, 38, 40)
[sub_resource type="AtlasTexture" id="AtlasTexture_mc14k"]
atlas = ExtResource("8_ofxsr")
region = Rect2(0, 0, 62, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_kohpo"]
atlas = ExtResource("7_qppok")
region = Rect2(0, 160, 38, 40)
[node name="DragonEditor" type="Window"] [node name="DragonEditor" type="Window"]
transparent_bg = true
title = "Dragon Editor" title = "Dragon Editor"
position = Vector2i(0, 36) position = Vector2i(0, 36)
size = Vector2i(300, 500) size = Vector2i(230, 332)
unresizable = true
borderless = true
always_on_top = true always_on_top = true
min_size = Vector2i(300, 500) transparent = true
max_size = Vector2i(1000, 1000)
script = ExtResource("1_8vkll") script = ExtResource("1_8vkll")
hat_outfits = ExtResource("2_vvtct") hat_outfits = ExtResource("2_vvtct")
shirt_outfits = ExtResource("3_xhgxf") shirt_outfits = ExtResource("3_xhgxf")
@ -26,92 +58,16 @@ dragon_colors = ExtResource("5_1ivi1")
[node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="change_hat" type="Button" parent="CanvasLayer"] [node name="BG" type="TextureRect" parent="CanvasLayer"]
anchors_preset = 8 offset_right = 40.0
anchor_left = 0.5 offset_bottom = 40.0
anchor_top = 0.5 texture = ExtResource("6_udwtk")
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -130.0
offset_top = -206.0
offset_right = -62.0
offset_bottom = -175.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0
text = "barret"
[node name="change_shirt" type="Button" parent="CanvasLayer"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -47.0
offset_top = -242.0
offset_right = 42.0
offset_bottom = -211.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0
text = "samarreta"
[node name="change_shoes" type="Button" parent="CanvasLayer"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 54.0
offset_top = -206.0
offset_right = 114.0
offset_bottom = -175.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0
text = "sabata"
[node name="dragon_previous" type="Button" parent="CanvasLayer"]
offset_left = 40.0
offset_top = 232.0
offset_right = 58.0
offset_bottom = 263.0
focus_mode = 0
text = "<"
[node name="dragon_next" type="Button" parent="CanvasLayer"]
offset_left = 235.0
offset_top = 232.0
offset_right = 253.0
offset_bottom = 263.0
focus_mode = 0
text = ">"
[node name="create" type="Button" parent="CanvasLayer"]
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -42.0
offset_top = -31.0
grow_horizontal = 0
grow_vertical = 0
focus_mode = 0
text = "crea"
[node name="Dragon" type="TextureRect" parent="CanvasLayer"] [node name="Dragon" type="TextureRect" parent="CanvasLayer"]
anchors_preset = 8 offset_left = 76.0
anchor_left = 0.5 offset_top = 120.0
anchor_top = 0.5 offset_right = 152.0
anchor_right = 0.5 offset_bottom = 208.0
anchor_bottom = 0.5
offset_left = -38.0
offset_top = -57.0
offset_right = 38.0
offset_bottom = 31.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("5_xhgxf") texture = ExtResource("5_xhgxf")
[node name="Hat" type="TextureRect" parent="CanvasLayer/Dragon"] [node name="Hat" type="TextureRect" parent="CanvasLayer/Dragon"]
@ -159,14 +115,97 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
texture = ExtResource("8_udwtk") texture = ExtResource("8_udwtk")
[node name="LineEdit" type="LineEdit" parent="CanvasLayer"] [node name="Dragger" type="Control" parent="CanvasLayer"]
offset_left = 59.0 layout_mode = 3
offset_top = 372.0 anchors_preset = 0
offset_right = 250.0 offset_left = 18.0
offset_bottom = 403.0 offset_top = 32.0
offset_right = 198.0
offset_bottom = 320.0
script = ExtResource("7_1vw8k")
[node name="change_hat" type="Button" parent="CanvasLayer"]
offset_left = 48.0
offset_top = 38.0
offset_right = 94.0
offset_bottom = 86.0
focus_mode = 0
icon = SubResource("AtlasTexture_ofxsr")
flat = true
[node name="change_shirt" type="Button" parent="CanvasLayer"]
offset_left = 84.0
offset_top = 50.0
offset_right = 130.0
offset_bottom = 98.0
focus_mode = 0
icon = SubResource("AtlasTexture_bh8dj")
flat = true
[node name="change_shoes" type="Button" parent="CanvasLayer"]
offset_left = 120.0
offset_top = 38.0
offset_right = 166.0
offset_bottom = 86.0
focus_mode = 0
icon = SubResource("AtlasTexture_1vw8k")
flat = true
[node name="dragon_previous" type="Button" parent="CanvasLayer"]
offset_left = 76.0
offset_top = 136.0
offset_right = 122.0
offset_bottom = 184.0
scale = Vector2(-1, 1)
focus_mode = 0
icon = SubResource("AtlasTexture_rrp4v")
flat = true
[node name="dragon_next" type="Button" parent="CanvasLayer"]
offset_left = 134.0
offset_top = 136.0
offset_right = 180.0
offset_bottom = 184.0
focus_mode = 0
icon = SubResource("AtlasTexture_rrp4v")
flat = true
[node name="create" type="Button" parent="CanvasLayer"]
offset_left = 112.0
offset_top = 274.0
offset_right = 182.0
offset_bottom = 306.0
focus_mode = 0
icon = SubResource("AtlasTexture_mc14k")
flat = true
[node name="close" type="Button" parent="CanvasLayer"]
offset_left = 178.0
offset_top = 6.0
offset_right = 224.0
offset_bottom = 54.0
focus_mode = 0
icon = SubResource("AtlasTexture_kohpo")
flat = true
[node name="NameLabel" type="TextureRect" parent="CanvasLayer"]
offset_left = 34.0
offset_top = 228.0
offset_right = 182.0
offset_bottom = 276.0
texture = ExtResource("12_qppok")
[node name="LineEdit" type="LineEdit" parent="CanvasLayer/NameLabel"]
offset_left = 10.0
offset_top = 8.0
offset_right = 138.0
offset_bottom = 42.0
theme_override_styles/focus = ExtResource("14_bh8dj")
placeholder_text = "NOM" placeholder_text = "NOM"
alignment = 1 alignment = 1
max_length = 8 max_length = 8
flat = true
caret_blink = true
script = ExtResource("9_xhgxf") script = ExtResource("9_xhgxf")
[connection signal="close_requested" from="." to="." method="_on_close_requested"] [connection signal="close_requested" from="." to="." method="_on_close_requested"]
@ -176,3 +215,4 @@ script = ExtResource("9_xhgxf")
[connection signal="pressed" from="CanvasLayer/dragon_previous" to="." method="_on_previous_color_pressed"] [connection signal="pressed" from="CanvasLayer/dragon_previous" to="." method="_on_previous_color_pressed"]
[connection signal="pressed" from="CanvasLayer/dragon_next" to="." method="_on_next_color_pressed"] [connection signal="pressed" from="CanvasLayer/dragon_next" to="." method="_on_next_color_pressed"]
[connection signal="pressed" from="CanvasLayer/create" to="." method="_on_create_pressed"] [connection signal="pressed" from="CanvasLayer/create" to="." method="_on_create_pressed"]
[connection signal="pressed" from="CanvasLayer/close" to="." method="_on_close_pressed"]

32
src/draggable.gd Normal file
View file

@ -0,0 +1,32 @@
extends Control
class_name DraggableWindow
var dragging: bool = false
var dragging_start_position: Vector2i = Vector2i()
signal on_drag(offset: Vector2i)
signal on_drop()
func _ready() -> void:
set_process_input(true)
func _gui_input(event: InputEvent) -> void:
if event is not InputEventMouseButton:
return
if event.button_index != MOUSE_BUTTON_LEFT:
return
if event.pressed:
dragging = true
dragging_start_position = Vector2i(get_global_mouse_position())
else:
dragging = false
on_drop.emit()
func _process(_delta) -> void:
if dragging:
on_drag.emit(Vector2i(get_global_mouse_position()) - dragging_start_position)

1
src/draggable.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://dxl7onk7x6h8b