commit 10cfdbd2521bcdc32b9b8d8537d77c0834a4ee7e Author: David J. Allen Date: Fri Apr 4 23:58:52 2025 -0600 initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100755 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..4709183 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/assets/groups/canvas_layout.tres b/assets/groups/canvas_layout.tres new file mode 100755 index 0000000..53cf914 --- /dev/null +++ b/assets/groups/canvas_layout.tres @@ -0,0 +1,3 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://c71aawlem32fa"] + +[resource] diff --git a/assets/groups/canvas_tool.tres b/assets/groups/canvas_tool.tres new file mode 100755 index 0000000..046e494 --- /dev/null +++ b/assets/groups/canvas_tool.tres @@ -0,0 +1,3 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://b12lx5kudvat0"] + +[resource] diff --git a/assets/textures/barsHorizontal.png b/assets/textures/barsHorizontal.png new file mode 100755 index 0000000..b40ad8f Binary files /dev/null and b/assets/textures/barsHorizontal.png differ diff --git a/assets/textures/barsHorizontal.png.import b/assets/textures/barsHorizontal.png.import new file mode 100644 index 0000000..b716a45 --- /dev/null +++ b/assets/textures/barsHorizontal.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b78r0uxu2q8bg" +path="res://.godot/imported/barsHorizontal.png-5c340be748705ed2c47adbccaeb48b54.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/barsHorizontal.png" +dest_files=["res://.godot/imported/barsHorizontal.png-5c340be748705ed2c47adbccaeb48b54.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 diff --git a/assets/textures/barsVertical.png b/assets/textures/barsVertical.png new file mode 100755 index 0000000..15de39c Binary files /dev/null and b/assets/textures/barsVertical.png differ diff --git a/assets/textures/barsVertical.png.import b/assets/textures/barsVertical.png.import new file mode 100644 index 0000000..01f4668 --- /dev/null +++ b/assets/textures/barsVertical.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b1gxogaykwk3t" +path="res://.godot/imported/barsVertical.png-e6268907791b8225ea57d687e014731e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/barsVertical.png" +dest_files=["res://.godot/imported/barsVertical.png-e6268907791b8225ea57d687e014731e.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 diff --git a/assets/textures/checkmark.png b/assets/textures/checkmark.png new file mode 100755 index 0000000..f912260 Binary files /dev/null and b/assets/textures/checkmark.png differ diff --git a/assets/textures/checkmark.png.import b/assets/textures/checkmark.png.import new file mode 100644 index 0000000..c44d96d --- /dev/null +++ b/assets/textures/checkmark.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8ic3rtyawopm" +path="res://.godot/imported/checkmark.png-90bf058668dc6a15e6471f7d8f9eb18b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/checkmark.png" +dest_files=["res://.godot/imported/checkmark.png-90bf058668dc6a15e6471f7d8f9eb18b.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 diff --git a/assets/textures/checkmark_small.png b/assets/textures/checkmark_small.png new file mode 100755 index 0000000..d5e781b Binary files /dev/null and b/assets/textures/checkmark_small.png differ diff --git a/assets/textures/checkmark_small.png.import b/assets/textures/checkmark_small.png.import new file mode 100644 index 0000000..21d068c --- /dev/null +++ b/assets/textures/checkmark_small.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://260h8iplfej8" +path="res://.godot/imported/checkmark_small.png-e303c4e9c735c1d9cb4e3b8872697277.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/checkmark_small.png" +dest_files=["res://.godot/imported/checkmark_small.png-e303c4e9c735c1d9cb4e3b8872697277.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 diff --git a/assets/textures/cross.png b/assets/textures/cross.png new file mode 100755 index 0000000..e21d5ac Binary files /dev/null and b/assets/textures/cross.png differ diff --git a/assets/textures/cross.png.import b/assets/textures/cross.png.import new file mode 100644 index 0000000..24b9b2a --- /dev/null +++ b/assets/textures/cross.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c85xvc3cn6yc6" +path="res://.godot/imported/cross.png-5a9380f51b19c15420017904e8c26829.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/cross.png" +dest_files=["res://.godot/imported/cross.png-5a9380f51b19c15420017904e8c26829.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 diff --git a/assets/textures/exclamation.png b/assets/textures/exclamation.png new file mode 100755 index 0000000..951d06f Binary files /dev/null and b/assets/textures/exclamation.png differ diff --git a/assets/textures/exclamation.png.import b/assets/textures/exclamation.png.import new file mode 100644 index 0000000..e260c42 --- /dev/null +++ b/assets/textures/exclamation.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bl0hgtjs0hotr" +path="res://.godot/imported/exclamation.png-12d4abaa636464265fe9bf460e2c4bc3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/exclamation.png" +dest_files=["res://.godot/imported/exclamation.png-12d4abaa636464265fe9bf460e2c4bc3.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 diff --git a/assets/textures/exit.png b/assets/textures/exit.png new file mode 100755 index 0000000..0924199 Binary files /dev/null and b/assets/textures/exit.png differ diff --git a/assets/textures/exit.png.import b/assets/textures/exit.png.import new file mode 100644 index 0000000..2eb40e7 --- /dev/null +++ b/assets/textures/exit.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ccrodmdktimve" +path="res://.godot/imported/exit.png-538106750e61a416cfc164cc99820b25.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/exit.png" +dest_files=["res://.godot/imported/exit.png-538106750e61a416cfc164cc99820b25.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 diff --git a/assets/textures/export.png b/assets/textures/export.png new file mode 100755 index 0000000..97100c7 Binary files /dev/null and b/assets/textures/export.png differ diff --git a/assets/textures/export.png.import b/assets/textures/export.png.import new file mode 100644 index 0000000..abf9889 --- /dev/null +++ b/assets/textures/export.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://di8qjbvpdmqas" +path="res://.godot/imported/export.png-d26dd0677eb3163d90d47cc890d4cbba.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/export.png" +dest_files=["res://.godot/imported/export.png-d26dd0677eb3163d90d47cc890d4cbba.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 diff --git a/assets/textures/fastBackwards.png b/assets/textures/fastBackwards.png new file mode 100755 index 0000000..8eaee1a Binary files /dev/null and b/assets/textures/fastBackwards.png differ diff --git a/assets/textures/fastBackwards.png.import b/assets/textures/fastBackwards.png.import new file mode 100644 index 0000000..525d34d --- /dev/null +++ b/assets/textures/fastBackwards.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvffd2h31otem" +path="res://.godot/imported/fastBackwards.png-23e3b875391285f6e1867ad4307c8e31.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/fastBackwards.png" +dest_files=["res://.godot/imported/fastBackwards.png-23e3b875391285f6e1867ad4307c8e31.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 diff --git a/assets/textures/fastForward.png b/assets/textures/fastForward.png new file mode 100755 index 0000000..6500b10 Binary files /dev/null and b/assets/textures/fastForward.png differ diff --git a/assets/textures/fastForward.png.import b/assets/textures/fastForward.png.import new file mode 100644 index 0000000..8fe8512 --- /dev/null +++ b/assets/textures/fastForward.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbyfjjoavhi6i" +path="res://.godot/imported/fastForward.png-5dc9dc1dd0f314414d0e8358c405e79f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/fastForward.png" +dest_files=["res://.godot/imported/fastForward.png-5dc9dc1dd0f314414d0e8358c405e79f.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 diff --git a/assets/textures/flag.png b/assets/textures/flag.png new file mode 100755 index 0000000..5f09821 Binary files /dev/null and b/assets/textures/flag.png differ diff --git a/assets/textures/flag.png.import b/assets/textures/flag.png.import new file mode 100644 index 0000000..3fcded5 --- /dev/null +++ b/assets/textures/flag.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ce8y51h35uwyh" +path="res://.godot/imported/flag.png-a11215c87ad2cd374bd693e583dc8a29.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/flag.png" +dest_files=["res://.godot/imported/flag.png-a11215c87ad2cd374bd693e583dc8a29.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 diff --git a/assets/textures/gear.png b/assets/textures/gear.png new file mode 100755 index 0000000..bc19573 Binary files /dev/null and b/assets/textures/gear.png differ diff --git a/assets/textures/gear.png.import b/assets/textures/gear.png.import new file mode 100644 index 0000000..1a0ffc4 --- /dev/null +++ b/assets/textures/gear.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ct17smegxolvj" +path="res://.godot/imported/gear.png-de6059477d50724e86e92d156e2938d5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/gear.png" +dest_files=["res://.godot/imported/gear.png-de6059477d50724e86e92d156e2938d5.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 diff --git a/assets/textures/home.png b/assets/textures/home.png new file mode 100755 index 0000000..65f5c1e Binary files /dev/null and b/assets/textures/home.png differ diff --git a/assets/textures/home.png.import b/assets/textures/home.png.import new file mode 100644 index 0000000..8eaf638 --- /dev/null +++ b/assets/textures/home.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cwh5jc64rwjbf" +path="res://.godot/imported/home.png-a5f71d75232f15cb2eb7b12c6208b855.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/home.png" +dest_files=["res://.godot/imported/home.png-a5f71d75232f15cb2eb7b12c6208b855.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 diff --git a/assets/textures/information.png b/assets/textures/information.png new file mode 100755 index 0000000..6f7d18e Binary files /dev/null and b/assets/textures/information.png differ diff --git a/assets/textures/information.png.import b/assets/textures/information.png.import new file mode 100644 index 0000000..b424102 --- /dev/null +++ b/assets/textures/information.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ce1h6limtxn4p" +path="res://.godot/imported/information.png-6d94c3e6aae926c3672f4231983a22c2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/information.png" +dest_files=["res://.godot/imported/information.png-6d94c3e6aae926c3672f4231983a22c2.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 diff --git a/assets/textures/left-arrow.png b/assets/textures/left-arrow.png new file mode 100755 index 0000000..291c350 Binary files /dev/null and b/assets/textures/left-arrow.png differ diff --git a/assets/textures/left-arrow.png.import b/assets/textures/left-arrow.png.import new file mode 100644 index 0000000..2e38e84 --- /dev/null +++ b/assets/textures/left-arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bc748njoctfcw" +path="res://.godot/imported/left-arrow.png-ead4d2a5a61c451207c85467f72d7c3a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/left-arrow.png" +dest_files=["res://.godot/imported/left-arrow.png-ead4d2a5a61c451207c85467f72d7c3a.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 diff --git a/assets/textures/menuGrid.png b/assets/textures/menuGrid.png new file mode 100755 index 0000000..3e92b49 Binary files /dev/null and b/assets/textures/menuGrid.png differ diff --git a/assets/textures/menuGrid.png.import b/assets/textures/menuGrid.png.import new file mode 100644 index 0000000..36b7b7c --- /dev/null +++ b/assets/textures/menuGrid.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdb5sd2l8f4cb" +path="res://.godot/imported/menuGrid.png-c80acfb79859e5c9c820e4b4890401a2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/menuGrid.png" +dest_files=["res://.godot/imported/menuGrid.png-c80acfb79859e5c9c820e4b4890401a2.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 diff --git a/assets/textures/menuList.png b/assets/textures/menuList.png new file mode 100755 index 0000000..92e1528 Binary files /dev/null and b/assets/textures/menuList.png differ diff --git a/assets/textures/menuList.png.import b/assets/textures/menuList.png.import new file mode 100644 index 0000000..cca6c87 --- /dev/null +++ b/assets/textures/menuList.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c1ufmjxbn2se7" +path="res://.godot/imported/menuList.png-bfe6cb64af812aae2d6f991fb90c37aa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/menuList.png" +dest_files=["res://.godot/imported/menuList.png-bfe6cb64af812aae2d6f991fb90c37aa.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 diff --git a/assets/textures/mouse.png b/assets/textures/mouse.png new file mode 100755 index 0000000..e504ab7 Binary files /dev/null and b/assets/textures/mouse.png differ diff --git a/assets/textures/mouse.png.import b/assets/textures/mouse.png.import new file mode 100644 index 0000000..c6435b7 --- /dev/null +++ b/assets/textures/mouse.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://upmujujak83f" +path="res://.godot/imported/mouse.png-e878ec3ccbf6e4655c87ca17be1d3899.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/mouse.png" +dest_files=["res://.godot/imported/mouse.png-e878ec3ccbf6e4655c87ca17be1d3899.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 diff --git a/assets/textures/mouseLeft.png b/assets/textures/mouseLeft.png new file mode 100755 index 0000000..fdba627 Binary files /dev/null and b/assets/textures/mouseLeft.png differ diff --git a/assets/textures/mouseLeft.png.import b/assets/textures/mouseLeft.png.import new file mode 100644 index 0000000..a55ac85 --- /dev/null +++ b/assets/textures/mouseLeft.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2ilump7jv8e5" +path="res://.godot/imported/mouseLeft.png-adc036aec33f65d95b1e1009ae03d380.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/mouseLeft.png" +dest_files=["res://.godot/imported/mouseLeft.png-adc036aec33f65d95b1e1009ae03d380.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 diff --git a/assets/textures/mouseMiddle.png b/assets/textures/mouseMiddle.png new file mode 100755 index 0000000..07aaead Binary files /dev/null and b/assets/textures/mouseMiddle.png differ diff --git a/assets/textures/mouseMiddle.png.import b/assets/textures/mouseMiddle.png.import new file mode 100644 index 0000000..ddec99b --- /dev/null +++ b/assets/textures/mouseMiddle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bluchrj0o5qdj" +path="res://.godot/imported/mouseMiddle.png-9ff476f134f39cab1d53a35cbf0b7f3b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/mouseMiddle.png" +dest_files=["res://.godot/imported/mouseMiddle.png-9ff476f134f39cab1d53a35cbf0b7f3b.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 diff --git a/assets/textures/mouseRight.png b/assets/textures/mouseRight.png new file mode 100755 index 0000000..9c79c95 Binary files /dev/null and b/assets/textures/mouseRight.png differ diff --git a/assets/textures/mouseRight.png.import b/assets/textures/mouseRight.png.import new file mode 100644 index 0000000..25df254 --- /dev/null +++ b/assets/textures/mouseRight.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://y4t2jqo662lv" +path="res://.godot/imported/mouseRight.png-af17b3b9e7c92630447e48aa1ab33dff.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/mouseRight.png" +dest_files=["res://.godot/imported/mouseRight.png-af17b3b9e7c92630447e48aa1ab33dff.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 diff --git a/assets/textures/musicOff.png b/assets/textures/musicOff.png new file mode 100755 index 0000000..ce460f2 Binary files /dev/null and b/assets/textures/musicOff.png differ diff --git a/assets/textures/musicOff.png.import b/assets/textures/musicOff.png.import new file mode 100644 index 0000000..b03beae --- /dev/null +++ b/assets/textures/musicOff.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cbn0iyq1hfe5s" +path="res://.godot/imported/musicOff.png-2760868011e73a10a0bcdaaac7d5dae3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/musicOff.png" +dest_files=["res://.godot/imported/musicOff.png-2760868011e73a10a0bcdaaac7d5dae3.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 diff --git a/assets/textures/musicOn.png b/assets/textures/musicOn.png new file mode 100755 index 0000000..e0db7ff Binary files /dev/null and b/assets/textures/musicOn.png differ diff --git a/assets/textures/musicOn.png.import b/assets/textures/musicOn.png.import new file mode 100644 index 0000000..1518ba2 --- /dev/null +++ b/assets/textures/musicOn.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvh26pfmyo74i" +path="res://.godot/imported/musicOn.png-9f76f04ee2ecfed774d9c9c352f6af4d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/musicOn.png" +dest_files=["res://.godot/imported/musicOn.png-9f76f04ee2ecfed774d9c9c352f6af4d.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 diff --git a/assets/textures/pause.png b/assets/textures/pause.png new file mode 100755 index 0000000..aec61a0 Binary files /dev/null and b/assets/textures/pause.png differ diff --git a/assets/textures/pause.png.import b/assets/textures/pause.png.import new file mode 100644 index 0000000..4a8fe34 --- /dev/null +++ b/assets/textures/pause.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjp6eonogfif2" +path="res://.godot/imported/pause.png-9f20969c0f0dce4c1e3e02e828b5bcda.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/pause.png" +dest_files=["res://.godot/imported/pause.png-9f20969c0f0dce4c1e3e02e828b5bcda.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 diff --git a/assets/textures/plus.png b/assets/textures/plus.png new file mode 100755 index 0000000..3f5cf37 Binary files /dev/null and b/assets/textures/plus.png differ diff --git a/assets/textures/plus.png.import b/assets/textures/plus.png.import new file mode 100644 index 0000000..e0f1091 --- /dev/null +++ b/assets/textures/plus.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://m2s5sd4pmrhu" +path="res://.godot/imported/plus.png-50ad455194f0ed193dc689e27c5354a1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/plus.png" +dest_files=["res://.godot/imported/plus.png-50ad455194f0ed193dc689e27c5354a1.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 diff --git a/assets/textures/pointer.png b/assets/textures/pointer.png new file mode 100755 index 0000000..cdd89b3 Binary files /dev/null and b/assets/textures/pointer.png differ diff --git a/assets/textures/pointer.png.import b/assets/textures/pointer.png.import new file mode 100644 index 0000000..0bea5a9 --- /dev/null +++ b/assets/textures/pointer.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ua5o5an18y6y" +path="res://.godot/imported/pointer.png-b39d88377d4499d9b793c1a6b2270802.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/pointer.png" +dest_files=["res://.godot/imported/pointer.png-b39d88377d4499d9b793c1a6b2270802.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 diff --git a/assets/textures/question.png b/assets/textures/question.png new file mode 100755 index 0000000..a1b75ad Binary files /dev/null and b/assets/textures/question.png differ diff --git a/assets/textures/question.png.import b/assets/textures/question.png.import new file mode 100644 index 0000000..f820ba6 --- /dev/null +++ b/assets/textures/question.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://3c0k5xktslsn" +path="res://.godot/imported/question.png-e99ab9730bf445631148b3ac93df82e6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/question.png" +dest_files=["res://.godot/imported/question.png-e99ab9730bf445631148b3ac93df82e6.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 diff --git a/assets/textures/return.png b/assets/textures/return.png new file mode 100755 index 0000000..8eb2cfb Binary files /dev/null and b/assets/textures/return.png differ diff --git a/assets/textures/return.png.import b/assets/textures/return.png.import new file mode 100644 index 0000000..e704993 --- /dev/null +++ b/assets/textures/return.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5etkfq1tgisf" +path="res://.godot/imported/return.png-fab8fbe9aa9cd616e59d2c43b0e9768d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/return.png" +dest_files=["res://.godot/imported/return.png-fab8fbe9aa9cd616e59d2c43b0e9768d.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 diff --git a/assets/textures/right-arrow.png b/assets/textures/right-arrow.png new file mode 100755 index 0000000..3bc614e Binary files /dev/null and b/assets/textures/right-arrow.png differ diff --git a/assets/textures/right-arrow.png.import b/assets/textures/right-arrow.png.import new file mode 100644 index 0000000..1db630a --- /dev/null +++ b/assets/textures/right-arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bxy1e87mujpi1" +path="res://.godot/imported/right-arrow.png-c326af30c34e91efe548cff6e7671be0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/right-arrow.png" +dest_files=["res://.godot/imported/right-arrow.png-c326af30c34e91efe548cff6e7671be0.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 diff --git a/assets/textures/signal3.png b/assets/textures/signal3.png new file mode 100755 index 0000000..b0763e7 Binary files /dev/null and b/assets/textures/signal3.png differ diff --git a/assets/textures/signal3.png.import b/assets/textures/signal3.png.import new file mode 100644 index 0000000..da09da9 --- /dev/null +++ b/assets/textures/signal3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cnupc4sbjpqrc" +path="res://.godot/imported/signal3.png-9a581cde38ac66c1947039e63aa552e3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/signal3.png" +dest_files=["res://.godot/imported/signal3.png-9a581cde38ac66c1947039e63aa552e3.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 diff --git a/assets/textures/thumb-1920-667142.jpg b/assets/textures/thumb-1920-667142.jpg new file mode 100755 index 0000000..2fc01da Binary files /dev/null and b/assets/textures/thumb-1920-667142.jpg differ diff --git a/assets/textures/thumb-1920-667142.jpg.import b/assets/textures/thumb-1920-667142.jpg.import new file mode 100644 index 0000000..e4e154d --- /dev/null +++ b/assets/textures/thumb-1920-667142.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://r28cvdr75lu4" +path="res://.godot/imported/thumb-1920-667142.jpg-7567282eb17461c643dd2a6de64ac930.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/thumb-1920-667142.jpg" +dest_files=["res://.godot/imported/thumb-1920-667142.jpg-7567282eb17461c643dd2a6de64ac930.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 diff --git a/assets/textures/trashcan.png b/assets/textures/trashcan.png new file mode 100755 index 0000000..cbd352d Binary files /dev/null and b/assets/textures/trashcan.png differ diff --git a/assets/textures/trashcan.png.import b/assets/textures/trashcan.png.import new file mode 100644 index 0000000..6a8ef8e --- /dev/null +++ b/assets/textures/trashcan.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dl16dbu4bb5lh" +path="res://.godot/imported/trashcan.png-f716b4b8fb2b9290994c4237284a5ea2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/trashcan.png" +dest_files=["res://.godot/imported/trashcan.png-f716b4b8fb2b9290994c4237284a5ea2.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 diff --git a/assets/textures/trashcanOpen.png b/assets/textures/trashcanOpen.png new file mode 100755 index 0000000..1192503 Binary files /dev/null and b/assets/textures/trashcanOpen.png differ diff --git a/assets/textures/trashcanOpen.png.import b/assets/textures/trashcanOpen.png.import new file mode 100644 index 0000000..411849f --- /dev/null +++ b/assets/textures/trashcanOpen.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://x6rjmc3qqynr" +path="res://.godot/imported/trashcanOpen.png-95d1f5865eda44d1a9a66e73a8b13643.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/trashcanOpen.png" +dest_files=["res://.godot/imported/trashcanOpen.png-95d1f5865eda44d1a9a66e73a8b13643.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 diff --git a/assets/textures/warning.png b/assets/textures/warning.png new file mode 100755 index 0000000..5869f57 Binary files /dev/null and b/assets/textures/warning.png differ diff --git a/assets/textures/warning.png.import b/assets/textures/warning.png.import new file mode 100644 index 0000000..bba53f1 --- /dev/null +++ b/assets/textures/warning.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b1f87exx3bxff" +path="res://.godot/imported/warning.png-d02fee0a1849545d57b452515c90196a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/warning.png" +dest_files=["res://.godot/imported/warning.png-d02fee0a1849545d57b452515c90196a.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 diff --git a/assets/textures/wrench.png b/assets/textures/wrench.png new file mode 100755 index 0000000..5f74641 Binary files /dev/null and b/assets/textures/wrench.png differ diff --git a/assets/textures/wrench.png.import b/assets/textures/wrench.png.import new file mode 100644 index 0000000..5a3db66 --- /dev/null +++ b/assets/textures/wrench.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://f2b6en8hsyh4" +path="res://.godot/imported/wrench.png-0bf537c67e84e6157d5037b8d039d173.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/wrench.png" +dest_files=["res://.godot/imported/wrench.png-0bf537c67e84e6157d5037b8d039d173.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 diff --git a/assets/textures/zoom.png b/assets/textures/zoom.png new file mode 100755 index 0000000..6485b48 Binary files /dev/null and b/assets/textures/zoom.png differ diff --git a/assets/textures/zoom.png.import b/assets/textures/zoom.png.import new file mode 100644 index 0000000..6e3c768 --- /dev/null +++ b/assets/textures/zoom.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cf2mtfsfsb6k1" +path="res://.godot/imported/zoom.png-960a6405624a1439b35bc8d2d6ac8a9c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/zoom.png" +dest_files=["res://.godot/imported/zoom.png-960a6405624a1439b35bc8d2d6ac8a9c.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 diff --git a/assets/textures/zoomDefault.png b/assets/textures/zoomDefault.png new file mode 100755 index 0000000..451cb6a Binary files /dev/null and b/assets/textures/zoomDefault.png differ diff --git a/assets/textures/zoomDefault.png.import b/assets/textures/zoomDefault.png.import new file mode 100644 index 0000000..3dd9fc8 --- /dev/null +++ b/assets/textures/zoomDefault.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dws7buk4satvq" +path="res://.godot/imported/zoomDefault.png-5eb43a95094da731274d9b517789390e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/zoomDefault.png" +dest_files=["res://.godot/imported/zoomDefault.png-5eb43a95094da731274d9b517789390e.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 diff --git a/assets/textures/zoomIn.png b/assets/textures/zoomIn.png new file mode 100755 index 0000000..086b6f0 Binary files /dev/null and b/assets/textures/zoomIn.png differ diff --git a/assets/textures/zoomIn.png.import b/assets/textures/zoomIn.png.import new file mode 100644 index 0000000..ed8ca4c --- /dev/null +++ b/assets/textures/zoomIn.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bna16xaqa674x" +path="res://.godot/imported/zoomIn.png-1b0b2ed8a89f0dc9324087aada6c42bc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/zoomIn.png" +dest_files=["res://.godot/imported/zoomIn.png-1b0b2ed8a89f0dc9324087aada6c42bc.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 diff --git a/assets/textures/zoomOut.png b/assets/textures/zoomOut.png new file mode 100755 index 0000000..77e7909 Binary files /dev/null and b/assets/textures/zoomOut.png differ diff --git a/assets/textures/zoomOut.png.import b/assets/textures/zoomOut.png.import new file mode 100644 index 0000000..8fda8db --- /dev/null +++ b/assets/textures/zoomOut.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b10xrvmyos08q" +path="res://.godot/imported/zoomOut.png-63ff626c2195047ec6dd725be5e21e0a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/zoomOut.png" +dest_files=["res://.godot/imported/zoomOut.png-63ff626c2195047ec6dd725be5e21e0a.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 diff --git a/assets/themes/default.tres b/assets/themes/default.tres new file mode 100755 index 0000000..afd2c44 --- /dev/null +++ b/assets/themes/default.tres @@ -0,0 +1,5 @@ +[gd_resource type="Theme" format=3 uid="uid://bpy5ajiru3dns"] + +[resource] +Tree/constants/draw_guides = 0 +Tree/constants/draw_relationship_lines = 1 diff --git a/icon.svg b/icon.svg new file mode 100755 index 0000000..adc26df --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..a4f7651 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://difri7b7mxc4q" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..097bd70 --- /dev/null +++ b/project.godot @@ -0,0 +1,36 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="HtmlDesigner" +config/tags=PackedStringArray("app", "interface", "tool") +run/main_scene="res://src/main_ui.tscn" +config/features=PackedStringArray("4.3", "Forward Plus") +run/low_processor_mode=true +config/icon="res://icon.svg" + +[autoload] + +html="*res://src/html.tscn" +app="*res://src/app.tscn" + +[display] + +window/size/initial_position_type=3 +window/subwindows/embed_subwindows=false + +[dotnet] + +project/assembly_name="HtmlDesigner" + +[rendering] + +renderer/rendering_method="gl_compatibility" diff --git a/src/app.gd b/src/app.gd new file mode 100755 index 0000000..a2d0869 --- /dev/null +++ b/src/app.gd @@ -0,0 +1,136 @@ +extends Control + + +var drag_widget: Control = null + + +func _physics_process(_delta: float) -> void: + if drag_widget: + drag_widget.set_global_position(get_global_mouse_position()) + +func lmb_pressed(event: InputEventMouseButton) -> bool: + return event.button_index == MOUSE_BUTTON_LEFT and event.is_pressed() + +func lmb_released(event: InputEventMouseButton) -> bool: + return event.button_index == MOUSE_BUTTON_LEFT and event.is_released() + +func rmb_pressed(event: InputEventMouseButton) -> bool: + return event.button_index == MOUSE_BUTTON_RIGHT and event.is_pressed() + +func rmb_released(event: InputEventMouseButton) -> bool: + return event.button_index == MOUSE_BUTTON_RIGHT and event.is_released() + +func set_drag_widget(o: WidgetModel, duplicate: bool = true) -> void: + if !o: + print("nothing...") + return + drag_widget = o.duplicate() if duplicate else o + drag_widget.set_global_position(get_global_mouse_position()) +# drag_widget.set_visible(true) + drag_widget.set_z_index(100) + + add_child(drag_widget) + if drag_widget: +# print("show model: ", drag_widget.get_model()) + drag_widget.show() + +func reset_drag_object() -> void: + if drag_widget: + drag_widget.queue_free() + drag_widget = null + + +func swap_children(parent: Node, from_index: int, to_index: int) -> void: + var from = parent.get_child(from_index) + var to = parent.get_child(to_index) + parent.move_child(from, to_index) + parent.move_child(to, from_index) + + +func swap_child_nodes(parent: Node, from: Node, to: Node) -> void: + var from_index = from.get_index() + var to_index = to.get_index() + parent.move_child(from, to_index) + parent.move_child(to, from_index) + + +func clear_children(node: Node) -> void: + for i in node.get_children(): + i.queue_free() + + +func delay(seconds: float): + return await get_tree().create_timer(seconds).timeout + + +func make_multi_file_dialog(node: Node, title: String, on_files_selected: Callable, filters = []) -> FileDialog: + var file_dialog := FileDialog.new() + file_dialog.set_title("Attach files") + file_dialog.set_file_mode(FileDialog.FILE_MODE_OPEN_FILES) + file_dialog.set_initial_position(Window.WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN) + file_dialog.set_min_size(Vector2(640, 480)) + file_dialog.set_filters(filters) + file_dialog.files_selected.connect(on_files_selected) + node.add_child(file_dialog) + file_dialog.show() + return file_dialog + + +func make_color_picker(node: Node, title: String, on_color_selected: Callable) -> ColorPicker: + var color_picker := ColorPicker.new() + color_picker.set_h_size_flags(Control.SIZE_EXPAND_FILL) + color_picker.color_changed.connect(on_color_selected) + var window := make_window(node, title, color_picker) + window.set_min_size(Vector2i(300, 560)) + window.set_max_size(Vector2i(300, 560)) + return color_picker + + +func make_file_dialog(node: Node, title: String, on_file_selected: Callable, filters = []) -> FileDialog: + var file_dialog := FileDialog.new() + file_dialog.set_title("Attach files") + file_dialog.set_access(FileDialog.ACCESS_FILESYSTEM) + file_dialog.set_file_mode(FileDialog.FILE_MODE_OPEN_FILE) + file_dialog.set_initial_position(Window.WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN) + file_dialog.set_min_size(Vector2(640, 480)) + file_dialog.set_filters(filters) + file_dialog.file_selected.connect(on_file_selected) + node.add_child(file_dialog) + file_dialog.show() + return file_dialog + + +func make_window(node: Node, title: String, ui_scene: Control) -> Window: + var window = Window.new() + window.set_flag(Window.FLAG_POPUP, false) +# window.set_flag(Window.FLAG_BORDERLESS, true) + window.set_title(title) + window.set_exclusive(true) + window.set_min_size(Vector2i(640, 480)) + window.set_initial_position(Window.WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN) + window.close_requested.connect(window.queue_free) + window.add_child(ui_scene) + node.add_child(window) + window.show() + return window + + +func toggle_popup_menu(popup_menu: PopupMenu) -> void: + popup_menu.set_visible(!popup_menu.is_visible()) + if popup_menu.is_visible(): + popup_menu.set_position(DisplayServer.mouse_get_position()) + else: + popup_menu.set_position(Vector2i(-600, -480)) + popup_menu.set_process(popup_menu.is_visible()) + +func array_to_string(arr: PackedStringArray, delim: String = ", ", trim_suffix: bool = true) -> String: + if arr.is_empty(): + return "" + return delim.join(arr).trim_suffix(delim if trim_suffix else "") + +func scroll_to_top(scroll_view: ScrollContainer) -> void: + scroll_view.set_v_scroll(0) + +func scroll_to_bottom(scroll_view: ScrollContainer) -> void: + var max_value = scroll_view.get_v_scroll_bar().get_max() + scroll_view.set_deferred("scroll_vertical", max_value) diff --git a/src/app.tscn b/src/app.tscn new file mode 100755 index 0000000..2298eab --- /dev/null +++ b/src/app.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=2 format=3 uid="uid://byeo2r0t0rpld"] + +[ext_resource type="Script" path="res://src/app.gd" id="1_56vju"] + +[node name="app" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 +script = ExtResource("1_56vju") diff --git a/src/canvas.gd b/src/canvas.gd new file mode 100755 index 0000000..6e7ee75 --- /dev/null +++ b/src/canvas.gd @@ -0,0 +1,217 @@ +extends TextureRect + +class_name Canvas + +signal update_doctree(data) +signal update_document(document) +signal update_selected(selected) + +@onready var button_select := %Select +@onready var button_move := %Move +@onready var label_selection := %Selection +@onready var label_tool := %SetTool +@onready var selection_bounds := %SelectionBounds +@onready var popup_menu := %PopupMenu +@onready var background := $"../Background" +@onready var layout := $Layout +@onready var no_layout := %NoLayout +@onready var v_layout := %VerticalLayout +@onready var h_layout := %HorizontalLayout +@onready var g_layout := %GridLayout + +enum CanvasTool { + SELECT, + MOVE +} + +var page_name := "index" +var contains_mouse := false +var current_tool := CanvasTool.SELECT +var selected: Array[WidgetModel] = [] +var mouse_position := Vector2() +var bg_image_path := "" + + +func _ready() -> void: + mouse_entered.connect(func(): contains_mouse = true) + mouse_exited.connect(func(): contains_mouse = false) + button_select.pressed.connect(_set_tool.bind(CanvasTool.SELECT)) + button_move.pressed.connect(_set_tool.bind(CanvasTool.MOVE)) + popup_menu.id_pressed.connect(_handle_popup_menu) + + no_layout.pressed.connect(func(): _set_layout(_init_container(Container.new()))) + v_layout.pressed.connect(func(): _set_layout(_init_container(VBoxContainer.new()))) + h_layout.pressed.connect(func(): _set_layout(_init_container(HBoxContainer.new()))) + g_layout.pressed.connect( + func(): + var c := GridContainer.new() + c.set_columns(2) + _set_layout(c) + _init_container(c) + ) + + +func _init_container(c: Container) -> Container: + c.set_name("MainLayout") + c.set_size(background.get_size()) + c.size_flags_horizontal = Control.SIZE_EXPAND_FILL + c.size_flags_vertical = Control.SIZE_EXPAND_FILL + return c + + +func _set_layout(container) -> void: + var temp = layout + layout.replace_by(container) + temp.queue_free() + layout = container + + +func _input(event: InputEvent) -> void: + if not contains_mouse: + return + + # get the dragged object + if event is InputEventMouseButton: + if app.lmb_pressed(event): + if current_tool == CanvasTool.SELECT: + _start_selection() + if app.lmb_released(event): + if app.drag_widget: + print("dropped widget: ", app.drag_widget) + unselect_all() + var widget = app.drag_widget + var parent = widget.get_parent() + parent.remove_child(widget) + layout.add_child(widget) + if widget.has_signal("selected"): + widget.selected.connect(_set_selection.bind(widget)) + if widget.has_signal("update_document"): + widget.update_document.connect(emit_signal.bind("update_document", generate_html())) + widget.set_global_position(get_global_mouse_position()) + app.drag_widget = null + _set_selection(widget) + emit_signal("update_document", generate_html()) + _end_selection() + if app.rmb_pressed(event): + # open context menu + if popup_menu: + app.toggle_popup_menu(popup_menu) + + elif event is InputEventMouseMotion: + if current_tool == CanvasTool.SELECT: + _update_selection() + +func unselect_all() -> void: + for i in get_children(): + if i is WidgetUI: + i.is_selected = false + +func generate_html() -> String: + var bg_color: Color = background.get_theme_stylebox("panel").get_bg_color() + var bg := html.background(bg_image_path, bg_color) + var document := html.html("", {"style": bg, "position": "relative"}) + "\n" + var attrs: Dictionary = { + "style": bg, + "position": "relative", + } + var contents = "" + for i in layout.get_children(): + if i.has_method("generate_html"): + contents += i.generate_html() + "\n" + var s: Vector2 = background.get_size() + document += html.body(contents, {"width": s.x, "height": s.y}) + return document + + +func generate_tree() -> Tree: + # build tree from canvas + var tree := Tree.new() + var children := get_children() + for child in children: + if child is HtmlDiv: + child.generate_tree() + return tree + + +func _set_tool(tool: CanvasTool) -> void: + current_tool = tool + match current_tool: + CanvasTool.SELECT: label_tool.set_text("Select") + CanvasTool.MOVE: label_tool.set_text("Move") + + +func _set_selection(widget: WidgetModel) -> void: + selected.clear() + selected.append(widget) + label_selection.set_text(widget.get_name()) + emit_signal("update_doctree", {"parent": "index.html", "name": widget.get_name()}) + emit_signal("update_selected", selected) + + +func _start_selection() -> void: + mouse_position = get_global_mouse_position() + var rect = Rect2(mouse_position, Vector2()) +# draw_rect(rect, Color(1.0, 1.0, 0), false, 2.0) +# selection_bounds.set_visible(true) +# selection_bounds.set_global_position(mouse_position) + + +func _update_selection() -> void: + var delta = get_global_mouse_position() - mouse_position + var rect = Rect2(mouse_position, delta) +# draw_rect(rect, Color(1.0, 1.0, 0), false, 2.0) +# selection_bounds.set_size(delta) + + +func _highlight_selection() -> void: + pass +# for i in selected: +# i. + + +func _end_selection() -> Array: +# selection_bounds.set_visible(false) + return [] + + +func set_background_color(color: Color) -> void: + background.get_theme_stylebox("panel").set_bg_color(color) + emit_signal("update_document", generate_html()) + + +func load_background(path: String) -> void: + # Check if file is shader or image + var bg = load(path) + + print(typeof(bg)) + # Load a background shader or static image + match typeof(bg): + TYPE_OBJECT: + print("setting image/texture background...") +# var mat = get_material() +# mat.albe + bg_image_path = path + var t := load(bg_image_path) + set_texture(t) + emit_signal("update_document", generate_html()) + + +func update_selected_from_data(data: Dictionary) -> void: + pass + + +func clear_widgets() -> void: + for i in layout.get_children(): + i.queue_free() + + +func add_page() -> void: + pass + +func _handle_popup_menu(id: int) -> void: + match id: + 0: app.make_file_dialog(self, "Select Background", load_background, ["*.png ; PNG Images","*.jpg; JPEG Images", "*.gdshader ; GD Shader"]) + 1: app.make_color_picker(self, "Select Background Color", set_background_color) + 2: add_page() + 3: clear_widgets() +# 3: reset_background() diff --git a/src/canvas.tscn b/src/canvas.tscn new file mode 100755 index 0000000..783838b --- /dev/null +++ b/src/canvas.tscn @@ -0,0 +1,219 @@ +[gd_scene load_steps=12 format=3 uid="uid://dg2dai5xiebkw"] + +[ext_resource type="Script" path="res://src/canvas.gd" id="1_s4wkp"] +[ext_resource type="ButtonGroup" uid="uid://b12lx5kudvat0" path="res://assets/groups/canvas_tool.tres" id="1_som1s"] +[ext_resource type="ButtonGroup" uid="uid://c71aawlem32fa" path="res://assets/groups/canvas_layout.tres" id="2_bven0"] +[ext_resource type="Texture2D" uid="uid://ua5o5an18y6y" path="res://assets/textures/pointer.png" id="2_kl574"] +[ext_resource type="Texture2D" uid="uid://c85xvc3cn6yc6" path="res://assets/textures/cross.png" id="3_e1hxl"] +[ext_resource type="Texture2D" uid="uid://b78r0uxu2q8bg" path="res://assets/textures/barsHorizontal.png" id="4_2ddyv"] +[ext_resource type="Texture2D" uid="uid://b1gxogaykwk3t" path="res://assets/textures/barsVertical.png" id="5_fu4lw"] +[ext_resource type="Texture2D" uid="uid://cdb5sd2l8f4cb" path="res://assets/textures/menuGrid.png" id="6_yohf3"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1k5jw"] +bg_color = Color(1, 1, 1, 1) + +[sub_resource type="Shader" id="Shader_57orc"] +code = "// NOTE: Shader automatically converted from Godot Engine 4.1.1.stable.mono's CanvasItemMaterial. + +shader_type canvas_item; +render_mode blend_mix; +" + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_q3mnx"] +shader = SubResource("Shader_57orc") + +[node name="ScrollContainer" type="ScrollContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="MarginContainer" type="MarginContainer" parent="."] +custom_minimum_size = Vector2(400, 200) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/PanelContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="Tools" type="HBoxContainer" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +layout_mode = 2 +text = "Tools" +vertical_alignment = 1 + +[node name="Select" type="TextureButton" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +toggle_mode = true +button_pressed = true +button_group = ExtResource("1_som1s") +texture_normal = ExtResource("2_kl574") +ignore_texture_size = true +stretch_mode = 5 + +[node name="Move" type="Button" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +layout_mode = 2 +toggle_mode = true +button_group = ExtResource("1_som1s") +text = "Move" + +[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +layout_mode = 2 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +layout_mode = 2 +text = "Main Layout" + +[node name="NoLayout" type="TextureButton" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +toggle_mode = true +button_group = ExtResource("2_bven0") +texture_normal = ExtResource("3_e1hxl") +ignore_texture_size = true +stretch_mode = 5 + +[node name="VerticalLayout" type="TextureButton" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +toggle_mode = true +button_group = ExtResource("2_bven0") +texture_normal = ExtResource("4_2ddyv") +ignore_texture_size = true +stretch_mode = 5 + +[node name="HorizontalLayout" type="TextureButton" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +toggle_mode = true +button_group = ExtResource("2_bven0") +texture_normal = ExtResource("5_fu4lw") +ignore_texture_size = true +stretch_mode = 5 + +[node name="GridLayout" type="TextureButton" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +toggle_mode = true +button_group = ExtResource("2_bven0") +texture_normal = ExtResource("6_yohf3") +ignore_texture_size = true +stretch_mode = 5 + +[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="SetTool" type="Label" parent="MarginContainer/VBoxContainer/PanelContainer/MarginContainer/Tools"] +unique_name_in_owner = true +layout_mode = 2 +text = "Select" + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Selection" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="Spacer2" type="Control" parent="MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +scroll_horizontal = 100 +scroll_vertical = 100 + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 200 +theme_override_constants/margin_top = 200 +theme_override_constants/margin_right = 200 +theme_override_constants/margin_bottom = 200 + +[node name="Background" type="Panel" parent="MarginContainer/VBoxContainer/ScrollContainer/MarginContainer"] +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_1k5jw") + +[node name="Canvas" type="TextureRect" parent="MarginContainer/VBoxContainer/ScrollContainer/MarginContainer"] +unique_name_in_owner = true +material = SubResource("ShaderMaterial_q3mnx") +custom_minimum_size = Vector2(1024, 960) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +script = ExtResource("1_s4wkp") + +[node name="Layout" type="Container" parent="MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/Canvas"] +unique_name_in_owner = true +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Control" type="Control" parent="MarginContainer"] +layout_mode = 2 +mouse_filter = 2 + +[node name="SelectionBounds" type="ColorRect" parent="MarginContainer/Control"] +unique_name_in_owner = true +visible = false +layout_mode = 2 +offset_right = 120.0 +offset_bottom = 123.0 +mouse_filter = 1 +color = Color(1, 0.909804, 0.615686, 1) + +[node name="PopupMenu" type="PopupMenu" parent="MarginContainer/Control"] +unique_name_in_owner = true +item_count = 5 +item_0/text = "Set Background" +item_0/id = 0 +item_1/text = "Set Background Color" +item_1/id = 1 +item_2/text = "" +item_2/id = 1000 +item_2/separator = true +item_3/text = "Add Page" +item_3/id = 2 +item_4/text = "Clear Page" +item_4/id = 3 diff --git a/src/canvas_settings.tscn b/src/canvas_settings.tscn new file mode 100755 index 0000000..803738b --- /dev/null +++ b/src/canvas_settings.tscn @@ -0,0 +1,22 @@ +[gd_scene format=3 uid="uid://b8hb0s6n4yu2t"] + +[node name="canvas_settings" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 + +[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"] +layout_mode = 2 +horizontal_scroll_mode = 0 + +[node name="Interface" type="VBoxContainer" parent="MarginContainer/ScrollContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 diff --git a/src/code.gd b/src/code.gd new file mode 100755 index 0000000..d2c2b2c --- /dev/null +++ b/src/code.gd @@ -0,0 +1,55 @@ +extends PanelContainer + +signal update_code + +@onready var save := %Save +@onready var load := %Load +@onready var reload := %Reload +@onready var editor := %Editor + + +func _ready() -> void: + save.pressed.connect(_save_file_dialog) + load.pressed.connect(_load_file_dialog) + reload.pressed.connect(emit_signal.bind("update_code")) + + +func _save_file_dialog() -> void: + var file_dialog := FileDialog.new() + file_dialog.set_file_mode(FileDialog.FILE_MODE_SAVE_FILE) + file_dialog.set_access(FileDialog.ACCESS_FILESYSTEM) + file_dialog.set_filters(PackedStringArray(["*.html ; HTML page"])) + file_dialog.set_min_size(Vector2(600, 480)) + file_dialog.set_initial_position(Window.WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN) + file_dialog.file_selected.connect( + func(path: String): + var file = FileAccess.open(path, FileAccess.WRITE) + if file: + file.store_string(editor.get_text()) + remove_child(file_dialog) + file_dialog.queue_free() + ) + add_child(file_dialog) + file_dialog.popup() + + +func _load_file_dialog() -> void: + var file_dialog := FileDialog.new() + file_dialog.set_file_mode(FileDialog.FILE_MODE_OPEN_FILE) + file_dialog.set_access(FileDialog.ACCESS_FILESYSTEM) + file_dialog.set_filters(PackedStringArray(["*.html ; HTML page"])) + file_dialog.set_min_size(Vector2(600, 480)) + file_dialog.set_initial_position(Window.WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN) + file_dialog.file_selected.connect( + func(path: String): + var file = FileAccess.open(path, FileAccess.READ) + editor.set_text(file.get_as_text() if file else "") + remove_child(file_dialog) + file_dialog.queue_free() + ) + add_child(file_dialog) + file_dialog.popup() + + +func set_text(text: String) -> void: + editor.set_text(text) diff --git a/src/code.tscn b/src/code.tscn new file mode 100755 index 0000000..cc108a1 --- /dev/null +++ b/src/code.tscn @@ -0,0 +1,80 @@ +[gd_scene load_steps=5 format=3 uid="uid://byt4c7isecxso"] + +[ext_resource type="Script" path="res://src/code.gd" id="1_kmlt3"] + +[sub_resource type="InputEventKey" id="InputEventKey_26e8s"] +device = -1 +ctrl_pressed = true +keycode = 83 +unicode = 115 + +[sub_resource type="Shortcut" id="Shortcut_xrwox"] +events = [SubResource("InputEventKey_26e8s")] + +[sub_resource type="CodeHighlighter" id="CodeHighlighter_tcpfj"] +number_color = Color(0.556863, 0.258824, 0.392157, 1) +symbol_color = Color(0, 0, 0.745098, 1) +function_color = Color(0.686275, 0, 0.368627, 1) +member_variable_color = Color(0.239216, 0.878431, 0.827451, 1) +keyword_colors = { +"button": Color(0, 0, 1, 1), +"height": Color(0.329284, 0.803401, 0.828125, 1), +"width": Color(0.329412, 0.803922, 0.827451, 1) +} + +[node name="Code" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +script = ExtResource("1_kmlt3") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="Controls" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MarginContainer"] +layout_mode = 2 +theme_override_constants/separation = 8 + +[node name="Save" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer/Controls"] +unique_name_in_owner = true +layout_mode = 2 +shortcut = SubResource("Shortcut_xrwox") +text = "Save" + +[node name="Load" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer/Controls"] +unique_name_in_owner = true +layout_mode = 2 +text = "Load" + +[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/MarginContainer/Controls"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Reload" type="Button" parent="MarginContainer/VBoxContainer/MarginContainer/Controls"] +unique_name_in_owner = true +layout_mode = 2 +text = "Reload" + +[node name="Editor" type="CodeEdit" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 +highlight_all_occurrences = true +highlight_current_line = true +draw_tabs = true +syntax_highlighter = SubResource("CodeHighlighter_tcpfj") +gutters_draw_line_numbers = true diff --git a/src/designer.tscn b/src/designer.tscn new file mode 100755 index 0000000..93e9a82 --- /dev/null +++ b/src/designer.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=3 format=3 uid="uid://bec7c5seis81k"] + +[ext_resource type="PackedScene" uid="uid://dg2dai5xiebkw" path="res://src/canvas.tscn" id="1_jayv4"] + +[sub_resource type="GDScript" id="GDScript_x6j4p"] +script/source = "extends PanelContainer + + +" + +[node name="Designer" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 +script = SubResource("GDScript_x6j4p") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="Canvas" parent="MarginContainer" instance=ExtResource("1_jayv4")] +layout_mode = 2 +size_flags_vertical = 3 diff --git a/src/doctree.gd b/src/doctree.gd new file mode 100755 index 0000000..9672ffa --- /dev/null +++ b/src/doctree.gd @@ -0,0 +1,21 @@ +extends PanelContainer + +@onready var tree := %Tree + + +func _ready() -> void: + var root = tree.create_item() + root.set_text(0, "root") + var page1 = tree.create_item(root) + page1.set_text(0, "index.html") + + +func add_page(parent: String, widget_name: String) -> void: + # tokenize parent into path array + var path := _tokenize(parent) + pass + + +func _tokenize(dots: String, delimiter: String = ",") -> Array[String]: + var path: Array[String] = [] + return path diff --git a/src/doctree.tscn b/src/doctree.tscn new file mode 100755 index 0000000..7f5f9cc --- /dev/null +++ b/src/doctree.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=2 format=3 uid="uid://cy5b2bxrwni8w"] + +[ext_resource type="Script" path="res://src/doctree.gd" id="1_ulm8l"] + +[node name="DocumentTree" type="PanelContainer"] +custom_minimum_size = Vector2(0, 150) +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_ulm8l") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="Controls" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="Button" type="Button" parent="MarginContainer/VBoxContainer/Controls"] +layout_mode = 2 +text = "New" + +[node name="Button2" type="Button" parent="MarginContainer/VBoxContainer/Controls"] +layout_mode = 2 +text = "Delete" + +[node name="Tree" type="Tree" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 diff --git a/src/graph.tscn b/src/graph.tscn new file mode 100755 index 0000000..91a4824 --- /dev/null +++ b/src/graph.tscn @@ -0,0 +1,9 @@ +[gd_scene format=3 uid="uid://cjyhxon67nd1a"] + +[node name="Graph" type="GraphEdit"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +scroll_offset = Vector2(-126, 0) diff --git a/src/html.gd b/src/html.gd new file mode 100644 index 0000000..c660f82 --- /dev/null +++ b/src/html.gd @@ -0,0 +1,128 @@ +extends Node + +@onready var selection + +func doctype() -> String: + return "" + +func html(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("html", content, attrs) + +func head(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("head", content, attrs) + +func body(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("body", content, attrs) + +func link(attrs: Dictionary = {}) -> String: + return _format_attrs("link", attrs) + +func heading(level: int, content: String = "", attrs: Dictionary = {}) -> String: + level = clamp(level, 1, 6) + return _format_attrs("h" + str(level), attrs) + content + "" + +func h(level: int, content: String = "", attrs: Dictionary = {}) -> String: + return heading(level, content, attrs) + +func paragraph(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("p", content, attrs) + +func p(content: String = "", attrs: Dictionary = {}) -> String: + return paragraph(content, attrs) + +func header(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("header", content, attrs) + +func footer(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("footer", content, attrs) + +func div(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("div", content, attrs) + +func ref(url: String, content: String = "") -> String: + return _format_tag("a", content, {"href": url}) + +func image(src: String, attrs: Dictionary = {}) -> String: + return _format_attrs("img src=" + src, attrs) + +func img(src: String, attrs: Dictionary = {}) -> String: + return image(src, attrs) + +func input(content: String = "", attrs: Dictionary = {"type": "content"}) -> String: + attrs["value"] = "\"" + content + "\"" + return _format_tag("input", "", attrs) + +func italic(content: String = "") -> String: + return _format_tag("i", content, {}) + +func i(content: String = "") -> String: + return italic(content) + +func bold(content: String = "") -> String: + return _format_tag("b", content, {}) + +func b(content: String = "") -> String: + return bold(content) + +func line_break() -> String: + return "
" + +func br() -> String: + return line_break() + +func button(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("button", content, attrs) + +func label(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("label", content, attrs) + +func comment(content: String = "") -> String: + return "" + +func iframe(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("iframe", content, attrs) + +func nav(content: String = "", attrs: Dictionary = {}) -> String: + return _format_tag("nav", content, attrs) + +func style(content: Dictionary = {}, attrs: Dictionary = {}) -> String: + var ss: String + for k in content: + ss += k + ": " + str(attrs[k]) + "; " + return _format_tag("style", "", attrs) + ss + "" + +func widget(w: WidgetUI) -> String: + return w.generate_html() + +func background(url: String, color: Color) -> Dictionary: + var bg := { + "background-image": "url('" + url + "')", + "background-repeat": "no-repeat", + "background-attachment": "fixed", + "background-size": "cover", + "background-color": "#" + color.to_html() + } + return bg + +func test_document() -> String: + return doctype() + html(body(h(1, "My first heading.") + p("My first paragraph."))) + +func _format_style_attr(attrs: Dictionary = {}) -> String: + var s := "\"" + for k in attrs: + s += k + ": " + str(attrs[k]) + "; " + return "style=" + s + "\"" + +func _format_attrs(tag_name: String, attrs: Dictionary) -> String: + var tag := "<" + tag_name + for k in attrs: + if k == "style": + tag += " " + _format_style_attr(attrs[k]) + else: + var has_value = len(str(attrs[k])) + tag += " " + k + ("=" + str(attrs[k])) if has_value else "" + tag += ">" + return tag + +func _format_tag(tag_name: String, content: String, attrs: Dictionary) -> String: + return _format_attrs(tag_name, attrs) + content + "" diff --git a/src/html.tscn b/src/html.tscn new file mode 100755 index 0000000..de3d244 --- /dev/null +++ b/src/html.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://bj0g3xmjs70xa"] + +[ext_resource type="Script" path="res://src/html.gd" id="1_0s8tj"] + +[node name="html" type="Node"] +script = ExtResource("1_0s8tj") diff --git a/src/inspector.gd b/src/inspector.gd new file mode 100755 index 0000000..e558dd6 --- /dev/null +++ b/src/inspector.gd @@ -0,0 +1,18 @@ +extends PanelContainer + +@onready var interface := %Interface + +signal update_widget(data) + + +func add_interface(new_interface: WidgetInspector) -> void: + print("new interface: ", new_interface) + if !new_interface: + return + new_interface.show() + interface.add_child(new_interface) + + +func clear_interface() -> void: + for i in interface.get_children(): + i.queue_free() diff --git a/src/inspector.tscn b/src/inspector.tscn new file mode 100755 index 0000000..e29e8a9 --- /dev/null +++ b/src/inspector.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=2 format=3 uid="uid://ber4hj8igsi1a"] + +[ext_resource type="Script" path="res://src/inspector.gd" id="1_vnn04"] + +[node name="Inspector" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +mouse_filter = 1 +script = ExtResource("1_vnn04") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 + +[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"] +layout_mode = 2 +horizontal_scroll_mode = 0 + +[node name="Interface" type="VBoxContainer" parent="MarginContainer/ScrollContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 diff --git a/src/log.tscn b/src/log.tscn new file mode 100755 index 0000000..3cad2fa --- /dev/null +++ b/src/log.tscn @@ -0,0 +1,8 @@ +[gd_scene format=3 uid="uid://cu7dssjm8pil1"] + +[node name="Log" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 diff --git a/src/main_ui.gd b/src/main_ui.gd new file mode 100755 index 0000000..a90a458 --- /dev/null +++ b/src/main_ui.gd @@ -0,0 +1,37 @@ +extends PanelContainer + +@onready var inspector := %Properties +@onready var canvas := %Canvas/%Canvas +@onready var doctree := %Doctree +@onready var code := %Code +@onready var log := %Log + + + +func _ready() -> void: + canvas.update_selected.connect(_update_selected) + canvas.update_doctree.connect(_update_doctree) + canvas.update_document.connect(func(doc): code.set_text(doc)) + code.update_code.connect(func(): code.set_text(canvas.generate_html())) + + +func _input(event: InputEvent) -> void: + if event is InputEventMouseButton: + if app.lmb_released(event): + app.reset_drag_object() + + +func _update_selected(selected: Array[WidgetModel]) -> void: + inspector.clear_interface() + for i in selected: + var inspect := i.load_inspector() as WidgetInspector + inspector.add_interface(inspect) + + +func _update_widget(data: Dictionary) -> void: + canvas.update_selection_from_data(data) + + +func _update_doctree(data: Dictionary) -> void: + pass + #doctree.add_page diff --git a/src/main_ui.tscn b/src/main_ui.tscn new file mode 100644 index 0000000..07d91ca --- /dev/null +++ b/src/main_ui.tscn @@ -0,0 +1,147 @@ +[gd_scene load_steps=11 format=3 uid="uid://boasb5n8rqfd7"] + +[ext_resource type="Theme" uid="uid://bpy5ajiru3dns" path="res://assets/themes/default.tres" id="1_dd06c"] +[ext_resource type="Script" path="res://src/main_ui.gd" id="1_myl0w"] +[ext_resource type="PackedScene" uid="uid://c1jt1x0ltj8o4" path="res://src/widgets/widget_view.tscn" id="1_pqv61"] +[ext_resource type="PackedScene" uid="uid://ber4hj8igsi1a" path="res://src/inspector.tscn" id="2_4ryji"] +[ext_resource type="PackedScene" uid="uid://cy5b2bxrwni8w" path="res://src/doctree.tscn" id="2_n2mey"] +[ext_resource type="PackedScene" uid="uid://byt4c7isecxso" path="res://src/code.tscn" id="3_7welq"] +[ext_resource type="PackedScene" uid="uid://cu7dssjm8pil1" path="res://src/log.tscn" id="3_iw1l6"] +[ext_resource type="PackedScene" uid="uid://dg2dai5xiebkw" path="res://src/canvas.tscn" id="5_36e2g"] +[ext_resource type="PackedScene" uid="uid://cjyhxon67nd1a" path="res://src/graph.tscn" id="5_mfp0n"] +[ext_resource type="PackedScene" uid="uid://b8hb0s6n4yu2t" path="res://src/canvas_settings.tscn" id="10_52e1j"] + +[node name="MainUI" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 +theme = ExtResource("1_dd06c") +script = ExtResource("1_myl0w") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="File" type="MenuButton" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = "File" +item_count = 4 +popup/item_0/text = "Open" +popup/item_0/id = 2 +popup/item_1/text = "Recent" +popup/item_1/id = 3 +popup/item_2/text = "Export" +popup/item_2/id = 2 +popup/item_3/text = "Close" +popup/item_3/id = 1 + +[node name="About" type="MenuButton" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = "About" + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="HSplitContainer2" type="HSplitContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="WidgetFrame" type="PanelContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2"] +custom_minimum_size = Vector2(275, 0) +layout_mode = 2 +mouse_filter = 1 + +[node name="TabContainer" type="TabContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/WidgetFrame"] +layout_mode = 2 +current_tab = 0 + +[node name="Tools" type="VSplitContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/WidgetFrame/TabContainer"] +layout_mode = 2 +metadata/_tab_index = 0 + +[node name="Doctree" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/WidgetFrame/TabContainer/Tools" instance=ExtResource("2_n2mey")] +unique_name_in_owner = true +layout_mode = 2 + +[node name="Widgets" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/WidgetFrame/TabContainer/Tools" instance=ExtResource("1_pqv61")] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Documents" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/WidgetFrame/TabContainer"] +visible = false +layout_mode = 2 +metadata/_tab_index = 1 + +[node name="HSplitContainer" type="HSplitContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2"] +layout_mode = 2 + +[node name="DesignerFrame" type="PanelContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="VSplitContainer" type="VSplitContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame"] +layout_mode = 2 + +[node name="TabContainer" type="TabContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame/VSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +current_tab = 0 + +[node name="Canvas" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame/VSplitContainer/TabContainer" instance=ExtResource("5_36e2g")] +unique_name_in_owner = true +layout_mode = 2 +metadata/_tab_index = 0 + +[node name="Graph" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame/VSplitContainer/TabContainer" instance=ExtResource("5_mfp0n")] +visible = false +layout_mode = 2 +scroll_offset = Vector2(0, -31) +metadata/_tab_index = 1 + +[node name="TabContainer2" type="TabContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame/VSplitContainer"] +custom_minimum_size = Vector2(0, 200) +layout_mode = 2 +current_tab = 0 + +[node name="Code" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame/VSplitContainer/TabContainer2" instance=ExtResource("3_7welq")] +unique_name_in_owner = true +layout_mode = 2 +metadata/_tab_index = 0 + +[node name="Console" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/DesignerFrame/VSplitContainer/TabContainer2" instance=ExtResource("3_iw1l6")] +unique_name_in_owner = true +visible = false +layout_mode = 2 +metadata/_tab_index = 1 + +[node name="InspectorFrame" type="PanelContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer"] +layout_mode = 2 + +[node name="TabContainer2" type="TabContainer" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/InspectorFrame"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +current_tab = 0 + +[node name="Properties" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/InspectorFrame/TabContainer2" instance=ExtResource("2_4ryji")] +unique_name_in_owner = true +layout_mode = 2 +metadata/_tab_index = 0 + +[node name="Page Settings" parent="MarginContainer/VBoxContainer/HBoxContainer/HSplitContainer2/HSplitContainer/InspectorFrame/TabContainer2" instance=ExtResource("10_52e1j")] +visible = false +layout_mode = 2 +metadata/_tab_index = 1 diff --git a/src/widgets/button/button.gd b/src/widgets/button/button.gd new file mode 100755 index 0000000..e05f2c4 --- /dev/null +++ b/src/widgets/button/button.gd @@ -0,0 +1,20 @@ +extends WidgetModel + +class_name HtmlButton + +@onready var button := $Button + +func generate_html() -> String: + return html.button(button.get_text(), + { + "style": super.get_style(), + "text-align": _get_alignment(button) + } + ) + +func _get_alignment(button: Button) -> String: + match button.get_text_alignment(): + HORIZONTAL_ALIGNMENT_LEFT: return "left" + HORIZONTAL_ALIGNMENT_CENTER: return "center" + HORIZONTAL_ALIGNMENT_RIGHT: return "right" + return "left" diff --git a/src/widgets/button/button.tscn b/src/widgets/button/button.tscn new file mode 100755 index 0000000..9d4df14 --- /dev/null +++ b/src/widgets/button/button.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=2 format=3 uid="uid://boy6hls2choco"] + +[ext_resource type="Script" path="res://src/widgets/button/button.gd" id="1_t2end"] + +[node name="button" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +mouse_filter = 1 +script = ExtResource("1_t2end") +inspector_file = "res://src/widgets/button/button_ui.tscn" + +[node name="Button" type="Button" parent="."] +show_behind_parent = true +layout_mode = 2 +mouse_filter = 2 +text = "button" diff --git a/src/widgets/button/button_ui.gd b/src/widgets/button/button_ui.gd new file mode 100755 index 0000000..ee1f6a3 --- /dev/null +++ b/src/widgets/button/button_ui.gd @@ -0,0 +1,15 @@ +extends WidgetInspector + + +@onready var text := %text + + +func _ready() -> void: + super._ready() + widget_type.set_text("button") + text.set_text(target_widget.button.get_text()) + text.text_changed.connect( + func(t: String): + target_widget.button.set_text(t) + _update_document() + ) diff --git a/src/widgets/button/button_ui.tscn b/src/widgets/button/button_ui.tscn new file mode 100755 index 0000000..c253d9d --- /dev/null +++ b/src/widgets/button/button_ui.tscn @@ -0,0 +1,111 @@ +[gd_scene load_steps=2 format=3 uid="uid://c5snky0pypbcq"] + +[ext_resource type="Script" path="res://src/widgets/button/button_ui.gd" id="1_hjme1"] + +[node name="button_ui4" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_hjme1") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 32 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 32 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="type" type="Label" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "object" +horizontal_alignment = 1 + +[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/h_separation = 16 +theme_override_constants/v_separation = 4 +columns = 2 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Name" + +[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Text" + +[node name="text" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Alignment" + +[node name="alignment" type="OptionButton" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +item_count = 3 +selected = 0 +popup/item_0/text = "Left" +popup/item_0/id = 0 +popup/item_1/text = "Center" +popup/item_1/id = 1 +popup/item_2/text = "Right" +popup/item_2/id = 2 + +[node name="LabelPosition" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Position" + +[node name="position" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 + +[node name="x" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="y" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="LabelSize" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Size" + +[node name="size" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="width" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 +custom_arrow_step = 1.0 + +[node name="height" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 diff --git a/src/widgets/div/div.gd b/src/widgets/div/div.gd new file mode 100755 index 0000000..7244d09 --- /dev/null +++ b/src/widgets/div/div.gd @@ -0,0 +1,73 @@ +extends WidgetModel + +class_name HtmlDiv + +signal update_document() + +@onready var layout := %layout +@onready var padding := %padding + +var mouse_position := Vector2() +var border_width := 1 +var border_color := Color() + +func generate_html() -> String: + var content := "" + var offset := 0 + for i in layout.get_children(): + if i.has_method("generate_html"): + var sep = layout.get("theme_override_constants/separation") + i.style = make_default_style(i) + i.style["position"] = "relative" + if layout.is_vertical(): + i.style["left"] = "0px" + i.style["top"] = str(offset) + "px" + else: + i.style["left"] = str(offset) + "px" + i.style["top"] = "0px" + content += i.generate_html() + "\n" + offset += sep + var style = make_default_style(self) + var p = str(padding.get("theme_override_constants/margin_top")) + "px " + p += str(padding.get("theme_override_constants/margin_right")) + "px " + p += str(padding.get("theme_override_constants/margin_bottom")) + "px " + p += str(padding.get("theme_override_constants/margin_left")) + "px" + style["border_width"] = str(border_width) + "px solid black" + style["display"] = "inline-block" + style["padding"] = p +# style["padding-top"] = str(p.get("theme_override_constants/margin_top")) + "px" +# style["padding-right"] = str(p.get("theme_override_constants/margin_right")) + "px" +# style["padding-bottom"] = str(p.get("theme_override_constants/margin_bottom")) + "px" +# style["padding-left"] = str(p.get("theme_override_constants/margin_left")) + "px" + style["background-color"] = "#" + str(get("theme_override_styles/panel/bg_color").get_bg_color().to_html(true)) + style["box-sizing"] = "border_width-box" + return html.div(content, {"style": style}) + + +func generate_tree() -> Tree: + return Tree.new() + + +func _input(event: InputEvent) -> void: + if not contains_mouse: + is_selected = false + return + + # get the dragged object + if event is InputEventMouseButton: + if app.lmb_pressed(event) and is_selected: + var parent = get_parent() + parent.remove_child(self) + app.set_drag_widget(self, false) + elif app.lmb_pressed(event) and !is_selected: + is_selected = true + emit_signal("selected") + elif app.lmb_released(event): + if app.drag_widget: + var widget = app.drag_widget + var parent = widget.get_parent() + parent.remove_child(widget) + layout.add_child(widget) + widget.set_global_position(get_global_mouse_position()) + app.drag_widget = null + emit_signal("update_document") diff --git a/src/widgets/div/div.tscn b/src/widgets/div/div.tscn new file mode 100755 index 0000000..02a0ba1 --- /dev/null +++ b/src/widgets/div/div.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=3 format=3 uid="uid://4cfrxaordmjn"] + +[ext_resource type="Script" path="res://src/widgets/div/div.gd" id="1_xlxh1"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6x5w8"] +bg_color = Color(0.195312, 0.195312, 0.195312, 0.294118) + +[node name="div" type="PanelContainer"] +offset_right = 150.0 +offset_bottom = 150.0 +theme_override_styles/panel = SubResource("StyleBoxFlat_6x5w8") +script = ExtResource("1_xlxh1") +inspector_file = "res://src/widgets/div/div_ui.tscn" + +[node name="padding" type="MarginContainer" parent="."] +unique_name_in_owner = true +layout_mode = 2 +mouse_filter = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="layout" type="BoxContainer" parent="padding"] +unique_name_in_owner = true +layout_mode = 2 +mouse_filter = 2 +theme_override_constants/separation = 8 +vertical = true diff --git a/src/widgets/div/div_ui.gd b/src/widgets/div/div_ui.gd new file mode 100755 index 0000000..fbe20c5 --- /dev/null +++ b/src/widgets/div/div_ui.gd @@ -0,0 +1,65 @@ +extends WidgetInspector + + +@onready var orientation := %orientation +@onready var separation := %separation +@onready var padding := %padding +@onready var bg_color := %bgcolor + + +func _ready() -> void: + super._ready() + widget_type.set_text("div") + orientation.select(!target_widget.layout.is_vertical()) + + _init_signals() + _init_padding() + _init_bg_color() + + +func _init_bg_color() -> void: + bg_color.set_pick_color(target_widget.get("theme_override_styles/panel/bg_color").get_bg_color()) + + +func _init_padding() -> void: + var p: MarginContainer = target_widget.padding + padding.get_node("top").set_value(p.get("theme_override_constants/margin_top")) + padding.get_node("right").set_value(p.get("theme_override_constants/margin_right")) + padding.get_node("bottom").set_value(p.get("theme_override_constants/margin_bottom")) + padding.get_node("left").set_value(p.get("theme_override_constants/margin_left")) + + +func _init_signals() -> void: + padding.get_node("top").value_changed.connect( + func(value: int) -> void: + target_widget.padding.set("theme_override_constants/margin_top", value) + ) + padding.get_node("right").value_changed.connect( + func(value: int) -> void: + target_widget.padding.set("theme_override_constants/margin_right", value) + ) + padding.get_node("bottom").value_changed.connect( + func(value: int) -> void: + target_widget.padding.set("theme_override_constants/margin_bottom", value) + ) + padding.get_node("left").value_changed.connect( + func(value: int) -> void: + target_widget.padding.set("theme_override_constants/margin_left", value) + ) + orientation.item_selected.connect( + func(index: int) -> void: + target_widget.layout.set_vertical(!index) + _update_document() + ) + separation.value_changed.connect( + func(value: int) -> void: + target_widget.layout.set("theme_override_constants/separation", value) + _update_document() + ) + bg_color.color_changed.connect( + func(color: Color) -> void: + target_widget.get("theme_override_styles/panel/bg_color").set_bg_color(color) + _update_document() + ) + + diff --git a/src/widgets/div/div_ui.tscn b/src/widgets/div/div_ui.tscn new file mode 100755 index 0000000..b23c8eb --- /dev/null +++ b/src/widgets/div/div_ui.tscn @@ -0,0 +1,177 @@ +[gd_scene load_steps=3 format=3 uid="uid://cp0kw1a6vy45n"] + +[ext_resource type="Script" path="res://src/widgets/div/div_ui.gd" id="1_wtbfy"] +[ext_resource type="Texture2D" uid="uid://cdb5sd2l8f4cb" path="res://assets/textures/menuGrid.png" id="2_pf4gw"] + +[node name="div_ui" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_wtbfy") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 32 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 32 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="type" type="Label" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "object" +horizontal_alignment = 1 + +[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/h_separation = 16 +theme_override_constants/v_separation = 4 +columns = 2 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Name" + +[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label4" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Padding" + +[node name="padding" type="GridContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +columns = 2 + +[node name="top" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/padding"] +layout_mode = 2 +suffix = "px" + +[node name="right" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/padding"] +layout_mode = 2 +suffix = "px" + +[node name="bottom" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/padding"] +layout_mode = 2 +suffix = "px" + +[node name="left" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/padding"] +layout_mode = 2 +suffix = "px" + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Orientation" + +[node name="orientation" type="OptionButton" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +alignment = 1 +item_count = 2 +selected = 0 +popup/item_0/text = "Vertical" +popup/item_0/id = 0 +popup/item_1/text = "Horizontal" +popup/item_1/id = 1 + +[node name="Label6" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Alignment" + +[node name="orientation2" type="MenuButton" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +icon = ExtResource("2_pf4gw") +icon_alignment = 1 +expand_icon = true +item_count = 2 +popup/item_0/text = "" +popup/item_0/id = 0 +popup/item_1/text = "" +popup/item_1/id = 1 + +[node name="Label7" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Expand" + +[node name="expand" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="vertical" type="CheckBox" parent="MarginContainer/VBoxContainer/GridContainer/expand"] +layout_mode = 2 +text = "vertical" + +[node name="horizontal" type="CheckBox" parent="MarginContainer/VBoxContainer/GridContainer/expand"] +layout_mode = 2 +text = "horizontal" + +[node name="Label5" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Separation" + +[node name="separation" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +alignment = 1 + +[node name="LabelPosition" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Position" + +[node name="position" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 + +[node name="x" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="y" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="LabelSize" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Size" + +[node name="size" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="width" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 +custom_arrow_step = 1.0 + +[node name="height" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Bg Color" + +[node name="bgcolor" type="ColorPickerButton" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 diff --git a/src/widgets/input/input.gd b/src/widgets/input/input.gd new file mode 100755 index 0000000..6f84698 --- /dev/null +++ b/src/widgets/input/input.gd @@ -0,0 +1,19 @@ +extends WidgetModel + +@onready var lineedit := $LineEdit + +func generate_html() -> String: + return html.input(lineedit.get_text(), { + "style": super.get_style(), + "type": "content", + "text-align": _get_alignment(lineedit) + } + ) + + +func _get_alignment(input: LineEdit) -> String: + match input.get_horizontal_alignment(): + HORIZONTAL_ALIGNMENT_LEFT: return "left" + HORIZONTAL_ALIGNMENT_CENTER: return "center" + HORIZONTAL_ALIGNMENT_RIGHT: return "right" + return "left" diff --git a/src/widgets/input/input.tscn b/src/widgets/input/input.tscn new file mode 100755 index 0000000..747f20f --- /dev/null +++ b/src/widgets/input/input.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=2 format=3 uid="uid://b5adgc74cmjls"] + +[ext_resource type="Script" path="res://src/widgets/input/input.gd" id="1_me8lb"] + +[node name="input" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_me8lb") +inspector_file = "res://src/widgets/input/input_ui.tscn" + +[node name="LineEdit" type="LineEdit" parent="."] +layout_mode = 2 +mouse_filter = 2 +placeholder_text = "input" diff --git a/src/widgets/input/input_ui.gd b/src/widgets/input/input_ui.gd new file mode 100755 index 0000000..88c7598 --- /dev/null +++ b/src/widgets/input/input_ui.gd @@ -0,0 +1,16 @@ +extends WidgetInspector + +class_name HtmlInput + +@onready var text := %text + + +func _ready() -> void: + super._ready() + widget_type.set_text("input") + text.set_text(target_widget.lineedit.get_text()) + text.text_changed.connect( + func(t: String): + target_widget.lineedit.set_text(t) + _update_document() + ) diff --git a/src/widgets/input/input_ui.tscn b/src/widgets/input/input_ui.tscn new file mode 100755 index 0000000..324b287 --- /dev/null +++ b/src/widgets/input/input_ui.tscn @@ -0,0 +1,111 @@ +[gd_scene load_steps=2 format=3 uid="uid://bjjimbyvsw64f"] + +[ext_resource type="Script" path="res://src/widgets/input/input_ui.gd" id="1_e5u0f"] + +[node name="input_ui" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_e5u0f") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 32 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 32 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="type" type="Label" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "object" +horizontal_alignment = 1 + +[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/h_separation = 16 +theme_override_constants/v_separation = 4 +columns = 2 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Name" + +[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Text" + +[node name="text" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Alignment" + +[node name="alignment" type="OptionButton" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +item_count = 3 +selected = 0 +popup/item_0/text = "Left" +popup/item_0/id = 0 +popup/item_1/text = "Center" +popup/item_1/id = 1 +popup/item_2/text = "Right" +popup/item_2/id = 2 + +[node name="LabelPosition" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Position" + +[node name="position" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 + +[node name="x" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="y" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="LabelSize" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Size" + +[node name="size" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="width" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 +custom_arrow_step = 1.0 + +[node name="height" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 diff --git a/src/widgets/label/label.gd b/src/widgets/label/label.gd new file mode 100755 index 0000000..fc0f541 --- /dev/null +++ b/src/widgets/label/label.gd @@ -0,0 +1,26 @@ +extends WidgetModel + +@onready var label := $Label + +func generate_html() -> String: + style["vertical-align"] = _get_v_align(label) + return html.label(label.get_text(), + { + "style": self.get_style(), + "text-align": _get_h_align(label), + } + ) + +func _get_h_align(label: Label) -> String: + match label.get_horizontal_alignment(): + HORIZONTAL_ALIGNMENT_LEFT: return "left" + HORIZONTAL_ALIGNMENT_CENTER: return "center" + HORIZONTAL_ALIGNMENT_RIGHT: return "right" + return "left" + +func _get_v_align(label: Label) -> String: + match label.get_vertical_alignment(): + VERTICAL_ALIGNMENT_TOP: return "top" + VERTICAL_ALIGNMENT_CENTER: return "middle" + VERTICAL_ALIGNMENT_BOTTOM: return "bottom" + return "middle" diff --git a/src/widgets/label/label.tscn b/src/widgets/label/label.tscn new file mode 100755 index 0000000..e1ed7e9 --- /dev/null +++ b/src/widgets/label/label.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=2 format=3 uid="uid://ty203p68s81"] + +[ext_resource type="Script" path="res://src/widgets/label/label.gd" id="1_ekon1"] + +[node name="label" type="PanelContainer"] +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_ekon1") +inspector_file = "res://src/widgets/label/label_ui.tscn" + +[node name="Label" type="Label" parent="."] +layout_mode = 2 +mouse_filter = 1 +text = "label" +vertical_alignment = 1 diff --git a/src/widgets/label/label_ui.gd b/src/widgets/label/label_ui.gd new file mode 100755 index 0000000..0ed05d7 --- /dev/null +++ b/src/widgets/label/label_ui.gd @@ -0,0 +1,16 @@ +extends WidgetInspector + +class_name HtmlLabel + +@onready var text := %text + + +func _ready() -> void: + super._ready() + widget_type.set_text("label") + text.set_text(target_widget.label.get_text()) + text.text_changed.connect( + func(t: String): + target_widget.label.set_text(t) + _update_document() + ) diff --git a/src/widgets/label/label_ui.tscn b/src/widgets/label/label_ui.tscn new file mode 100755 index 0000000..7d06b49 --- /dev/null +++ b/src/widgets/label/label_ui.tscn @@ -0,0 +1,109 @@ +[gd_scene load_steps=2 format=3 uid="uid://bt78jm5l36ohg"] + +[ext_resource type="Script" path="res://src/widgets/label/label_ui.gd" id="1_4w022"] + +[node name="label_ui" type="PanelContainer"] +script = ExtResource("1_4w022") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 32 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 32 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="type" type="Label" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "object" +horizontal_alignment = 1 + +[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/h_separation = 16 +theme_override_constants/v_separation = 4 +columns = 2 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Name" + +[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Text" + +[node name="text" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Alignment" + +[node name="alignment" type="OptionButton" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +item_count = 3 +selected = 0 +popup/item_0/text = "Left" +popup/item_0/id = 0 +popup/item_1/text = "Center" +popup/item_1/id = 1 +popup/item_2/text = "Right" +popup/item_2/id = 2 + +[node name="LabelPosition" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Position" + +[node name="position" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 + +[node name="x" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="y" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +max_value = 10000.0 +alignment = 1 + +[node name="LabelSize" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Size" + +[node name="size" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="width" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 +custom_arrow_step = 1.0 + +[node name="height" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 diff --git a/src/widgets/widget.tscn b/src/widgets/widget.tscn new file mode 100755 index 0000000..213cb0c --- /dev/null +++ b/src/widgets/widget.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=2 format=3 uid="uid://56tj4bi3gtib"] + +[sub_resource type="GDScript" id="GDScript_e651v"] +script/source = "extends Control + +class_name Widget + +enum Type { + BASIC, + COMPONENT +} + +@export var ui: WidgetUI = preload(\"res://src/widgets/ui/widget_ui.tscn\").instantiate() +@export var model: WidgetModel = preload(\"res://src/widgets/models/widget_model.tscn\").instantiate() + + +var type := Type.BASIC +" + +[node name="widget" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = SubResource("GDScript_e651v") diff --git a/src/widgets/widget_inspector.gd b/src/widgets/widget_inspector.gd new file mode 100755 index 0000000..5bba693 --- /dev/null +++ b/src/widgets/widget_inspector.gd @@ -0,0 +1,54 @@ +extends PanelContainer + +class_name WidgetInspector + + +@onready var widget_name := %name +@onready var widget_type := %type +@onready var x := %x +@onready var y := %y +@onready var width := %width +@onready var height := %height + +var target_widget = null + + +func _ready() -> void: + set_name(target_widget.get_name()) + var _s: Vector2 = target_widget.get_size() + var _p: Vector2 = target_widget.get_position() + x.set_value(_p.x) + y.set_value(_p.y) + width.set_value(_s.x) + height.set_value(_s.y) + widget_name.set_text(target_widget.get_name()) + width.value_changed.connect( + func(w: int) -> void: + target_widget.set_size(Vector2(w, height.get_value())) + _update_document() + ) + height.value_changed.connect( + func(h: int) -> void: + target_widget.set_size(Vector2(width.get_value(), h)) + _update_document() + ) + x.value_changed.connect( + func(x: int) -> void: + target_widget.set_position(Vector2(x, y.get_value())) + _update_document() + ) + y.value_changed.connect( + func(y: int) -> void: + target_widget.set_position(Vector2(x.get_value(), y)) + _update_document() + ) + widget_name.text_changed.connect( + func(t: String) -> void: + target_widget.set_name(t) + _update_document() + ) + + +func _update_document() -> void: + var canvas = target_widget.get_parent().get_parent() + canvas.emit_signal("update_document", canvas.generate_html()) diff --git a/src/widgets/widget_inspector.tscn b/src/widgets/widget_inspector.tscn new file mode 100755 index 0000000..7babd0e --- /dev/null +++ b/src/widgets/widget_inspector.tscn @@ -0,0 +1,89 @@ +[gd_scene load_steps=2 format=3 uid="uid://plevr8r1yvw6"] + +[ext_resource type="Script" path="res://src/widgets/widget_inspector.gd" id="1_ijy7f"] + +[node name="WidgetInspector" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_ijy7f") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 32 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 32 +theme_override_constants/margin_bottom = 8 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="type" type="Label" parent="MarginContainer/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "object" +horizontal_alignment = 1 + +[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_constants/h_separation = 16 +theme_override_constants/v_separation = 4 +columns = 2 + +[node name="Label3" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Name" + +[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/GridContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="LabelPosition" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Position" + +[node name="position" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 + +[node name="x" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +value = 1.0 +alignment = 1 + +[node name="y" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/position"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +alignment = 1 + +[node name="LabelSize" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Size" + +[node name="size" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="height" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 + +[node name="width" type="SpinBox" parent="MarginContainer/VBoxContainer/GridContainer/size"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +min_value = 1.0 +max_value = 10000.0 +value = 1.0 +alignment = 1 +custom_arrow_step = 1.0 diff --git a/src/widgets/widget_model.gd b/src/widgets/widget_model.gd new file mode 100755 index 0000000..a97ab6c --- /dev/null +++ b/src/widgets/widget_model.gd @@ -0,0 +1,94 @@ +extends Control + +class_name WidgetModel + +signal selected() + +@onready var popup_menu = %popup_menu +@export_file var inspector_file: String = "" + +var id := -1 +var contains_mouse := false +var is_selected := false +var inspector :WidgetInspector = null +var last_size := Vector2() +var style := {} + + +func _ready() -> void: + _init_widget() + + +func _input(event: InputEvent) -> void: + # Don't do anything if mouse not in bounds + if not contains_mouse: + is_selected = false + return + + # Start dragging the set model + if event is InputEventMouseButton: + if app.lmb_pressed(event) and is_selected: + var parent = get_parent() + parent.remove_child(self) + app.set_drag_widget(self, false) + elif app.lmb_pressed(event) and !is_selected: + is_selected = true + emit_signal("selected") + if app.rmb_pressed(event): + # open context menu + app.toggle_popup_menu(popup_menu) + pass + + if event is InputEventMouseMotion: + if is_selected: + pass + + +func generate_html() -> String: + return "" + +func make_default_style(widget: Control) -> Dictionary: + var s: Vector2 = widget.get_size() + var p: Vector2 = widget.get_position() + return { + "background": "#00000000", + "position": "absolute", + "width": str(s.x)+"px", + "height": str(s.y)+"px", + "left": str(p.x)+"px", + "top": str(p.y)+"px", + "display": "block" + } + +func get_style() -> Dictionary: + return style + +func load_inspector() -> WidgetInspector: + if inspector_file.is_empty(): + return null + inspector = load(inspector_file).instantiate() + if inspector is WidgetInspector: + inspector.target_widget = self + return inspector + return null + + +func get_inspector() -> WidgetInspector: + return inspector + + +func _init_widget() -> void: + mouse_entered.connect(func(): contains_mouse = true) + mouse_exited.connect(func(): contains_mouse = false) + size_flags_horizontal = Control.SIZE_EXPAND_FILL + size_flags_vertical = Control.SIZE_EXPAND_FILL + + +func _handle_popup_menu(id: int) -> void: + match id: + 0: pass +# 0: app.make_file_dialog(self, "Select Background", load_background, ["*.png ; PNG Images","*.jpg; JPEG Images", "*.gdshader ; GD Shader"]) +# 1: app.make_color_picker(self, "Select Background Color", set_background_color) +# 2: add_page() +# 3: clear_widgets() +# 3: reset_background() diff --git a/src/widgets/widget_model.tscn b/src/widgets/widget_model.tscn new file mode 100755 index 0000000..2adb9fd --- /dev/null +++ b/src/widgets/widget_model.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=3 uid="uid://bej7c61cavhfe"] + +[ext_resource type="Script" path="res://src/widgets/widget_model.gd" id="1_wpu75"] + +[node name="WidgetModel" type="PanelContainer"] +mouse_filter = 2 +script = ExtResource("1_wpu75") +inspector_file = null diff --git a/src/widgets/widget_ui.gd b/src/widgets/widget_ui.gd new file mode 100755 index 0000000..3c4daec --- /dev/null +++ b/src/widgets/widget_ui.gd @@ -0,0 +1,42 @@ +extends Control + +class_name WidgetUI + +@onready var label := $VBoxContainer/Label +@onready var icon := $VBoxContainer/Icon +@export_file var model_file: String = "" + +var model: WidgetModel = null +var inspector: WidgetInspector = null +var contains_mouse := false + + +func _ready() -> void: + mouse_entered.connect(func(): contains_mouse = true) + mouse_exited.connect(func(): contains_mouse = false) + if model_file: + model = load(model_file).instantiate() + if model: + label.set_text(model.get_name()) + + +func _input(event: InputEvent) -> void: + # Don't do anything if mouse not in bounds + if not contains_mouse or get_child_count() <= 0: + return + + # Get the model which should be a WidgetUI + if !model is WidgetModel: + return + + # Start dragging the set model + if event is InputEventMouseButton: + if app.lmb_pressed(event): + app.set_drag_widget(model) + + +func load_inspector() -> Control: + return load(load_model().inspector_file).instantiate() + +func load_model() -> WidgetModel: + return load(model_file).instantiate() diff --git a/src/widgets/widget_ui.tscn b/src/widgets/widget_ui.tscn new file mode 100755 index 0000000..d834e51 --- /dev/null +++ b/src/widgets/widget_ui.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=3 format=3 uid="uid://chp6edqaytoqd"] + +[ext_resource type="Script" path="res://src/widgets/widget_ui.gd" id="1_ywdh4"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7sglw"] +bg_color = Color(0.0705882, 0.0705882, 0.0705882, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_blend = true + +[node name="widget" type="PanelContainer"] +custom_minimum_size = Vector2(64, 64) +offset_right = 64.0 +offset_bottom = 64.0 +mouse_filter = 1 +theme_override_styles/panel = SubResource("StyleBoxFlat_7sglw") +script = ExtResource("1_ywdh4") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 + +[node name="Icon" type="TextureRect" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 14 +text = "widget" +horizontal_alignment = 1 diff --git a/src/widgets/widget_view.tscn b/src/widgets/widget_view.tscn new file mode 100755 index 0000000..14ef2b2 --- /dev/null +++ b/src/widgets/widget_view.tscn @@ -0,0 +1,72 @@ +[gd_scene load_steps=2 format=3 uid="uid://c1jt1x0ltj8o4"] + +[ext_resource type="PackedScene" uid="uid://chp6edqaytoqd" path="res://src/widgets/widget_ui.tscn" id="1_te5l0"] + +[node name="Widgets" type="PanelContainer"] +custom_minimum_size = Vector2(300, 200) +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="MarginContainer/ScrollContainer/VBoxContainer"] +layout_mode = 2 +text = "Basic" + +[node name="Widgets" type="HFlowContainer" parent="MarginContainer/ScrollContainer/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="button" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets" instance=ExtResource("1_te5l0")] +layout_mode = 2 +model_file = "res://src/widgets/button/button.tscn" + +[node name="Label" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets/button/VBoxContainer" index="1"] +text = "button" + +[node name="label" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets" instance=ExtResource("1_te5l0")] +layout_mode = 2 +model_file = "res://src/widgets/label/label.tscn" + +[node name="Label" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets/label/VBoxContainer" index="1"] +text = "label" + +[node name="input" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets" instance=ExtResource("1_te5l0")] +layout_mode = 2 +model_file = "res://src/widgets/input/input.tscn" + +[node name="Label" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets/input/VBoxContainer" index="1"] +text = "input" + +[node name="div" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets" instance=ExtResource("1_te5l0")] +layout_mode = 2 +model_file = "res://src/widgets/div/div.tscn" + +[node name="Label" parent="MarginContainer/ScrollContainer/VBoxContainer/Widgets/div/VBoxContainer" index="1"] +text = "div" + +[node name="Label2" type="Label" parent="MarginContainer/ScrollContainer/VBoxContainer"] +layout_mode = 2 +text = "Components" + +[editable path="MarginContainer/ScrollContainer/VBoxContainer/Widgets/button"] +[editable path="MarginContainer/ScrollContainer/VBoxContainer/Widgets/label"] +[editable path="MarginContainer/ScrollContainer/VBoxContainer/Widgets/input"] +[editable path="MarginContainer/ScrollContainer/VBoxContainer/Widgets/div"] diff --git a/test.html b/test.html new file mode 100755 index 0000000..281121f --- /dev/null +++ b/test.html @@ -0,0 +1,6 @@ + +
+ + +
+ \ No newline at end of file