From a79ee05ca76c7db1e814e7d7781a1da3ebd1c457 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Sun, 18 Jul 2021 16:56:18 +0200 Subject: [PATCH] Tweaked UI --- addons/gdhexgrid/addons/gut/icon.png.import | 6 +- addons/gdhexgrid/icon.png.import | 6 +- export_presets.cfg | 9 +- project.godot | 2 +- scenes/Game.tscn | 101 +++++++++++++------- 5 files changed, 77 insertions(+), 47 deletions(-) diff --git a/addons/gdhexgrid/addons/gut/icon.png.import b/addons/gdhexgrid/addons/gut/icon.png.import index 77ca840..f44f80c 100644 --- a/addons/gdhexgrid/addons/gut/icon.png.import +++ b/addons/gdhexgrid/addons/gut/icon.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/icon.png-8ef70a3ee536a318ef1cf6a9c072251e.stex" +path="res://.import/icon.png-94d6536ee4af028a7ca4b709cae95011.stex" metadata={ "vram_texture": false } [deps] -source_file="res://thirdparty/gdhexgrid/addons/gut/icon.png" -dest_files=[ "res://.import/icon.png-8ef70a3ee536a318ef1cf6a9c072251e.stex" ] +source_file="res://addons/gdhexgrid/addons/gut/icon.png" +dest_files=[ "res://.import/icon.png-94d6536ee4af028a7ca4b709cae95011.stex" ] [params] diff --git a/addons/gdhexgrid/icon.png.import b/addons/gdhexgrid/icon.png.import index 5f1cd4f..792998c 100644 --- a/addons/gdhexgrid/icon.png.import +++ b/addons/gdhexgrid/icon.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/icon.png-55a505cd80fd03b4057438c68aa35b70.stex" +path="res://.import/icon.png-9e2c68854eff2ba15efab32e39b37c44.stex" metadata={ "vram_texture": false } [deps] -source_file="res://thirdparty/gdhexgrid/icon.png" -dest_files=[ "res://.import/icon.png-55a505cd80fd03b4057438c68aa35b70.stex" ] +source_file="res://addons/gdhexgrid/icon.png" +dest_files=[ "res://.import/icon.png-9e2c68854eff2ba15efab32e39b37c44.stex" ] [params] diff --git a/export_presets.cfg b/export_presets.cfg index fdaf8fb..452c6d6 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -4,9 +4,8 @@ name="Pirate Treasure Hunt" platform="HTML5" runnable=true custom_features="" -export_filter="resources" -export_files=PoolStringArray( ) -include_filter="*,*.gd,islands/*,thirdparty/gdhexgrid/*" +export_filter="all_resources" +include_filter="*" exclude_filter="" export_path="export/html/index.html" script_export_mode=1 @@ -17,8 +16,8 @@ script_encryption_key="" custom_template/debug="" custom_template/release="" variant/export_type=0 -vram_texture_compression/for_desktop=true -vram_texture_compression/for_mobile=false +vram_texture_compression/for_desktop=false +vram_texture_compression/for_mobile=true html/custom_html_shell="" html/head_include="" html/canvas_resize_policy=2 diff --git a/project.godot b/project.godot index 488a05d..62c543c 100644 --- a/project.godot +++ b/project.godot @@ -22,7 +22,7 @@ _global_script_class_icons={ config/name="Pirate Treasure Hunt" run/main_scene="res://scenes/Game.tscn" -config/icon="res://icon.png" +config/icon="res://assets/pirate.svg" [autoload] diff --git a/scenes/Game.tscn b/scenes/Game.tscn index f29d4ef..de57add 100644 --- a/scenes/Game.tscn +++ b/scenes/Game.tscn @@ -126,33 +126,40 @@ script = ExtResource( 8 ) [node name="TopContainer" type="HBoxContainer" parent="World/UI"] anchor_right = 1.0 +margin_left = 10.0 +margin_top = 10.0 +margin_right = -10.0 margin_bottom = 20.0 __meta__ = { "_edit_use_anchors_": false } +[node name="GenerateButton" type="Button" parent="World/UI/TopContainer"] +margin_right = 113.0 +margin_bottom = 64.0 +rect_min_size = Vector2( 64, 64 ) +text = "Generate World" + [node name="EditIslandButton" type="CheckButton" parent="World/UI/TopContainer"] -margin_right = 117.0 +visible = false +margin_left = 117.0 +margin_right = 234.0 margin_bottom = 40.0 text = "Editor" -[node name="Button" type="Button" parent="World/UI/TopContainer"] -margin_left = 121.0 -margin_right = 192.0 -margin_bottom = 40.0 -text = "Generate" - [node name="Offset" type="Label" parent="World/UI/TopContainer"] -margin_left = 196.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 243.0 +margin_right = 285.0 margin_bottom = 27.0 text = "Offset: " [node name="OffsetValue" type="Label" parent="World/UI/TopContainer"] -margin_left = 247.0 +visible = false +margin_left = 289.0 margin_top = 13.0 -margin_right = 267.0 +margin_right = 309.0 margin_bottom = 27.0 text = "0,0" __meta__ = { @@ -160,16 +167,18 @@ __meta__ = { } [node name="Zoom" type="Label" parent="World/UI/TopContainer"] -margin_left = 271.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 320.0 +margin_right = 287.0 margin_bottom = 27.0 text = " Zoom: " [node name="ZoomValue" type="Label" parent="World/UI/TopContainer"] -margin_left = 324.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 344.0 +margin_right = 258.0 margin_bottom = 27.0 text = "0.0" __meta__ = { @@ -177,37 +186,42 @@ __meta__ = { } [node name="HexCoord" type="Label" parent="World/UI/TopContainer"] -margin_left = 348.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 422.0 +margin_right = 312.0 margin_bottom = 27.0 text = " HexCoord: " [node name="HexCoordValue" type="Label" parent="World/UI/TopContainer"] -margin_left = 426.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 454.0 +margin_right = 266.0 margin_bottom = 27.0 text = "(0,0)" [node name="WorldCoord" type="Label" parent="World/UI/TopContainer"] -margin_left = 458.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 541.0 +margin_right = 321.0 margin_bottom = 27.0 text = "WorldCoord: " [node name="WorldCoordValue" type="Label" parent="World/UI/TopContainer"] -margin_left = 545.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 573.0 +margin_right = 266.0 margin_bottom = 27.0 text = "(0,0)" [node name="TileType" type="Label" parent="World/UI/TopContainer"] -margin_left = 577.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 600.0 +margin_right = 261.0 margin_bottom = 27.0 text = "Tile" __meta__ = { @@ -215,9 +229,10 @@ __meta__ = { } [node name="TileTypeValue" type="Label" parent="World/UI/TopContainer"] -margin_left = 604.0 +visible = false +margin_left = 238.0 margin_top = 13.0 -margin_right = 638.0 +margin_right = 272.0 margin_bottom = 27.0 text = "None" __meta__ = { @@ -225,18 +240,34 @@ __meta__ = { } [node name="VSeparator" type="VSeparator" parent="World/UI/TopContainer"] -margin_left = 642.0 -margin_right = 646.0 -margin_bottom = 40.0 +visible = false +margin_left = 117.0 +margin_right = 954.0 +margin_bottom = 64.0 +size_flags_horizontal = 3 __meta__ = { "_edit_use_anchors_": false } +[node name="Label2" type="Label" parent="World/UI/TopContainer"] +margin_left = 117.0 +margin_top = 25.0 +margin_right = 958.0 +margin_bottom = 39.0 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="World/UI/TopContainer"] +margin_left = 962.0 +margin_top = 25.0 +margin_right = 992.0 +margin_bottom = 39.0 +text = "FPS: " + [node name="FPSValue" type="Label" parent="World/UI/TopContainer"] -margin_left = 650.0 -margin_top = 13.0 -margin_right = 658.0 -margin_bottom = 27.0 +margin_left = 996.0 +margin_top = 25.0 +margin_right = 1004.0 +margin_bottom = 39.0 text = "0" align = 2 script = ExtResource( 4 ) @@ -358,8 +389,8 @@ render_target_update_mode = 1 [connection signal="pressed" from="Editor/UI/Editor/ClearWorldButton" to="Editor" method="_on_ClearWorldButton_pressed"] [connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"] [connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"] +[connection signal="pressed" from="World/UI/TopContainer/GenerateButton" to="World" method="_on_generate_button_pressed"] [connection signal="toggled" from="World/UI/TopContainer/EditIslandButton" to="Editor" method="_on_EditIslandButton_toggled"] -[connection signal="pressed" from="World/UI/TopContainer/Button" to="World" method="_on_generate_button_pressed"] [connection signal="pressed" from="World/UI/VBoxContainer/MapButton" to="World" method="_on_MapButton_pressed"] [connection signal="pressed" from="World/UI/VBoxContainer/BirdyButton" to="World" method="_on_BirdyButton_pressed"] [connection signal="pressed" from="World/UI/VBoxContainer/DigButton" to="World" method="_on_DigButton_pressed"]