From e96a9040416c24e0f88f451581888d39cfa63cfc Mon Sep 17 00:00:00 2001 From: Anthony Wilcox <35226681+tomiscw@users.noreply.github.com> Date: Sat, 5 Jan 2019 12:28:50 -0500 Subject: [PATCH] Game experience should be more consistent now - The Exit (to menu) and Settings buttons have been merged into a single Pause window that can be accessed by pressing Escape or Start/"Nintendo +" from the keyboard or game controllers, respectfully. Interacting with the game should be more user friendly and predictable now. --- project/ClassicGUI.tscn | 111 ---------------- project/ClassicScn.tscn | 8 +- project/GUI.tscn | 123 ----------------- project/{GameScn.tscn => ModernScn.tscn} | 8 +- project/StartScn.tscn | 17 ++- project/WinDialogs.tscn | 152 +++++++++++++++++++++- project/lang/local.csv | 2 + project/lang/local.en.translation | Bin 1052 -> 1096 bytes project/lang/local.sv.translation | Bin 1068 -> 1120 bytes project/project.godot | 6 + project/src/{GameScreen.gd => GameScn.gd} | 5 + project/src/Interface.gd | 9 -- project/src/StartScn.gd | 8 +- project/src/WinDialogs.gd | 19 ++- 14 files changed, 197 insertions(+), 271 deletions(-) delete mode 100644 project/ClassicGUI.tscn delete mode 100644 project/GUI.tscn rename project/{GameScn.tscn => ModernScn.tscn} (76%) rename project/src/{GameScreen.gd => GameScn.gd} (54%) delete mode 100644 project/src/Interface.gd diff --git a/project/ClassicGUI.tscn b/project/ClassicGUI.tscn deleted file mode 100644 index caacf43..0000000 --- a/project/ClassicGUI.tscn +++ /dev/null @@ -1,111 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://src/Interface.gd" type="Script" id=1] -[ext_resource path="res://WinDialogs.tscn" type="PackedScene" id=2] - -[node name="Interface" type="Control"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = -7.0 -margin_right = 40.0 -margin_bottom = 33.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -script = ExtResource( 1 ) - -[node name="RefRect" type="ReferenceRect" parent="." index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = 11.0 -margin_top = 16.0 -margin_right = 165.0 -margin_bottom = 128.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 - -[node name="VertContainer" type="VBoxContainer" parent="RefRect" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 3.0 -margin_right = -3.0 -margin_bottom = -111.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -alignment = 0 - -[node name="ExitBtn" type="Button" parent="RefRect/VertContainer" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 147.0 -margin_bottom = 20.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -text = "KEXT" -flat = false -align = 1 - -[node name="SettingsBtn" type="Button" parent="RefRect/VertContainer" index="1"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 24.0 -margin_right = 147.0 -margin_bottom = 44.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -text = "KSET" -flat = false -align = 1 - -[node name="WinDialogs" parent="." index="1" instance=ExtResource( 2 )] - -[connection signal="pressed" from="RefRect/VertContainer/ExitBtn" to="." method="_on_ExitBtn_pressed"] - -[connection signal="pressed" from="RefRect/VertContainer/SettingsBtn" to="." method="_on_SettingsBtn_pressed"] - - diff --git a/project/ClassicScn.tscn b/project/ClassicScn.tscn index 1fb1302..fd6bac5 100644 --- a/project/ClassicScn.tscn +++ b/project/ClassicScn.tscn @@ -1,13 +1,11 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://src/GameScreen.gd" type="Script" id=1] +[ext_resource path="res://src/GameScn.gd" type="Script" id=1] [ext_resource path="res://assets/classic_dress_up_bg.png" type="Texture" id=2] [ext_resource path="res://assets/lights.png" type="Texture" id=3] [ext_resource path="res://Zack.tscn" type="PackedScene" id=4] [ext_resource path="res://ClassicClothes.tscn" type="PackedScene" id=5] -[ext_resource path="res://ClassicGUI.tscn" type="PackedScene" id=6] - - +[ext_resource path="res://WinDialogs.tscn" type="PackedScene" id=6] [node name="GameScreen" type="Node"] @@ -34,6 +32,6 @@ __meta__ = { [node name="Clothes" parent="." index="3" instance=ExtResource( 5 )] -[node name="Interface" parent="." index="4" instance=ExtResource( 6 )] +[node name="WinDialogs" parent="." index="4" instance=ExtResource( 6 )] diff --git a/project/GUI.tscn b/project/GUI.tscn deleted file mode 100644 index 8bb4b22..0000000 --- a/project/GUI.tscn +++ /dev/null @@ -1,123 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://src/Interface.gd" type="Script" id=1] -[ext_resource path="res://WinDialogs.tscn" type="PackedScene" id=2] - -[node name="Interface" type="Control"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = -7.0 -margin_right = 40.0 -margin_bottom = 33.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -script = ExtResource( 1 ) - -[node name="GMRefRect" type="ReferenceRect" parent="." index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 8.0 -margin_right = 800.0 -margin_bottom = 36.0 -rect_min_size = Vector2( 800, 0 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -_sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Rect" ] - -[node name="GMenuHbox" type="HBoxContainer" parent="GMRefRect" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 10.0 -margin_top = 2.0 -margin_right = -10.0 -margin_bottom = -6.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -alignment = 0 -_sections_unfolded = [ "Margin" ] - -[node name="ExitBtn" type="Button" parent="GMRefRect/GMenuHbox" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 42.0 -margin_bottom = 20.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -custom_colors/font_color_disabled = Color( 0, 0, 0, 1 ) -custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_colors/font_color_hover = Color( 0, 0, 0, 1 ) -custom_colors/font_color_pressed = Color( 0, 0, 0, 1 ) -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -text = "KEXT" -flat = true -align = 1 -_sections_unfolded = [ "custom_colors", "custom_constants" ] - -[node name="SettingsBtn" type="Button" parent="GMRefRect/GMenuHbox" index="1"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = 46.0 -margin_right = 87.0 -margin_bottom = 20.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -custom_colors/font_color_disabled = Color( 0, 0, 0, 1 ) -custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_colors/font_color_hover = Color( 0, 0, 0, 1 ) -custom_colors/font_color_pressed = Color( 0, 0, 0, 1 ) -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -text = "KSET" -flat = true -align = 1 -_sections_unfolded = [ "custom_colors" ] - -[node name="WinDialogs" parent="." index="1" instance=ExtResource( 2 )] - -[connection signal="pressed" from="GMRefRect/GMenuHbox/ExitBtn" to="." method="_on_ExitBtn_pressed"] - -[connection signal="pressed" from="GMRefRect/GMenuHbox/SettingsBtn" to="." method="_on_SettingsBtn_pressed"] - - diff --git a/project/GameScn.tscn b/project/ModernScn.tscn similarity index 76% rename from project/GameScn.tscn rename to project/ModernScn.tscn index fb33876..60787bf 100644 --- a/project/GameScn.tscn +++ b/project/ModernScn.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://src/GameScreen.gd" type="Script" id=1] +[ext_resource path="res://src/GameScn.gd" type="Script" id=1] [ext_resource path="res://assets/modern_dress_up_bg.png" type="Texture" id=2] [ext_resource path="res://assets/icrazy_frame.png" type="Texture" id=3] [ext_resource path="res://Zack.tscn" type="PackedScene" id=4] [ext_resource path="res://Clothes.tscn" type="PackedScene" id=5] -[ext_resource path="res://GUI.tscn" type="PackedScene" id=6] +[ext_resource path="res://WinDialogs.tscn" type="PackedScene" id=6] -[node name="GameScreen" type="Node" index="0"] +[node name="GameScreen" type="Node"] script = ExtResource( 1 ) @@ -31,6 +31,6 @@ __meta__ = { [node name="Clothes" parent="." index="3" instance=ExtResource( 5 )] -[node name="Interface" parent="." index="4" instance=ExtResource( 6 )] +[node name="WinDialogs" parent="." index="4" instance=ExtResource( 6 )] diff --git a/project/StartScn.tscn b/project/StartScn.tscn index 648980d..0d965f7 100644 --- a/project/StartScn.tscn +++ b/project/StartScn.tscn @@ -7,11 +7,13 @@ [ext_resource path="res://assets/dressup_title.svg" type="Texture" id=5] [ext_resource path="res://WinDialogs.tscn" type="PackedScene" id=6] -[node name="Start" type="Node" index="0"] +[node name="Start" type="Node"] script = ExtResource( 1 ) -[node name="ModernBG" type="Sprite" parent="." index="0"] +[node name="Modern" type="Node2D" parent="." index="0"] + +[node name="ModernBG" type="Sprite" parent="Modern" index="0"] position = Vector2( 400, 277 ) texture = ExtResource( 2 ) @@ -19,7 +21,7 @@ __meta__ = { "_edit_lock_": true } -[node name="WordrobeBG" type="Sprite" parent="." index="1"] +[node name="WordrobeBG" type="Sprite" parent="Modern" index="1"] position = Vector2( 492.609, 280.27 ) texture = ExtResource( 3 ) @@ -27,7 +29,7 @@ __meta__ = { "_edit_lock_": true } -[node name="ClassicBG" type="Sprite" parent="." index="2"] +[node name="ClassicBG" type="Sprite" parent="." index="1"] visible = false position = Vector2( 400, 277 ) @@ -36,7 +38,7 @@ __meta__ = { "_edit_lock_": true } -[node name="GameTitle" type="Sprite" parent="." index="3"] +[node name="GameTitle" type="Sprite" parent="." index="2"] position = Vector2( 489.565, 100.74 ) texture = ExtResource( 5 ) @@ -44,8 +46,9 @@ __meta__ = { "_edit_lock_": true } -[node name="MenuRf" type="ReferenceRect" parent="." index="4"] +[node name="MenuRf" type="ReferenceRect" parent="." index="3"] +editor/display_folded = true anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 @@ -267,7 +270,7 @@ __meta__ = { "_edit_lock_": true } -[node name="WinDialogs" parent="." index="5" instance=ExtResource( 6 )] +[node name="WinDialogs" parent="." index="4" instance=ExtResource( 6 )] [connection signal="toggled" from="MenuRf/StartVbox/PlayBtn" to="." method="_on_PlayBtn_toggled"] diff --git a/project/WinDialogs.tscn b/project/WinDialogs.tscn index b969137..f7869a2 100644 --- a/project/WinDialogs.tscn +++ b/project/WinDialogs.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://src/WinDialogs.gd" type="Script" id=1] [ext_resource path="res://music/song.ogg" type="AudioStream" id=2] -[node name="WinDialogs" type="Control"] +[node name="WinDialogs" type="Control" index="0"] anchor_left = 0.0 anchor_top = 0.0 @@ -26,7 +26,139 @@ autoplay = false mix_target = 0 bus = "Master" -[node name="CreditsWin" type="AcceptDialog" parent="." index="1"] +[node name="PauseWin" type="PopupDialog" parent="." index="1"] + +pause_mode = 2 +visible = false +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = 318.0 +margin_top = 227.0 +margin_right = 494.0 +margin_bottom = 341.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +mouse_filter = 0 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +popup_exclusive = false +_sections_unfolded = [ "Pause" ] + +[node name="PauseVbox" type="VBoxContainer" parent="PauseWin" index="0"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 10.0 +margin_top = 10.0 +margin_right = -10.0 +margin_bottom = -10.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +mouse_filter = 1 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +alignment = 0 +_sections_unfolded = [ "Margin" ] + +[node name="PauseLbl" type="Label" parent="PauseWin/PauseVbox" index="0"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_right = 156.0 +margin_bottom = 14.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +mouse_filter = 2 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 4 +text = "KPUS" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="SettingsBtn" type="Button" parent="PauseWin/PauseVbox" index="1"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_top = 18.0 +margin_right = 156.0 +margin_bottom = 38.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +focus_mode = 2 +mouse_filter = 0 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +toggle_mode = false +enabled_focus_mode = 2 +shortcut = null +group = null +text = "KSET" +flat = false +align = 1 + +[node name="ResumeBtn" type="Button" parent="PauseWin/PauseVbox" index="2"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_top = 42.0 +margin_right = 156.0 +margin_bottom = 62.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +focus_mode = 2 +mouse_filter = 0 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +toggle_mode = false +enabled_focus_mode = 2 +shortcut = null +group = null +text = "KRUS" +flat = false +align = 1 + +[node name="ExitBtn" type="Button" parent="PauseWin/PauseVbox" index="3"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_top = 66.0 +margin_right = 156.0 +margin_bottom = 86.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +focus_mode = 2 +mouse_filter = 0 +mouse_default_cursor_shape = 0 +size_flags_horizontal = 1 +size_flags_vertical = 1 +toggle_mode = false +enabled_focus_mode = 2 +shortcut = null +group = null +text = "KEXT" +flat = false +align = 1 + +[node name="CreditsWin" type="AcceptDialog" parent="." index="2"] visible = false anchor_left = 0.0 @@ -47,6 +179,7 @@ popup_exclusive = false window_title = "KCRE" resizable = false dialog_hide_on_ok = true +_sections_unfolded = [ "Pause" ] [node name="CreditsTxt" type="RichTextLabel" parent="CreditsWin" index="3"] @@ -102,8 +235,9 @@ selection_enabled = true override_selected_font_color = false _sections_unfolded = [ "BBCode" ] -[node name="SettingsWin" type="AcceptDialog" parent="." index="2"] +[node name="SettingsWin" type="AcceptDialog" parent="." index="3"] +pause_mode = 2 editor/display_folded = true visible = false anchor_left = 0.0 @@ -124,7 +258,7 @@ popup_exclusive = false window_title = "KSET" resizable = false dialog_hide_on_ok = true -_sections_unfolded = [ "Dialog" ] +_sections_unfolded = [ "Dialog", "Pause" ] [node name="Grid" type="GridContainer" parent="SettingsWin" index="3"] @@ -194,7 +328,7 @@ text = "KMUS" flat = false align = 1 -[node name="LicenseWin" type="AcceptDialog" parent="." index="3"] +[node name="LicenseWin" type="AcceptDialog" parent="." index="4"] editor/display_folded = true visible = false @@ -216,7 +350,7 @@ popup_exclusive = false window_title = "KLIC" resizable = false dialog_hide_on_ok = true -_sections_unfolded = [ "Dialog" ] +_sections_unfolded = [ "Dialog", "Pause" ] [node name="LicenseTxt" type="RichTextLabel" parent="LicenseWin" index="3"] @@ -275,6 +409,12 @@ selection_enabled = false override_selected_font_color = false _sections_unfolded = [ "BBCode" ] +[connection signal="pressed" from="PauseWin/PauseVbox/SettingsBtn" to="." method="_on_SettingsBtn_pressed"] + +[connection signal="pressed" from="PauseWin/PauseVbox/ResumeBtn" to="." method="_on_ResumeBtn_pressed"] + +[connection signal="pressed" from="PauseWin/PauseVbox/ExitBtn" to="." method="_on_ExitBtn_pressed"] + [connection signal="toggled" from="SettingsWin/Grid/MusicBtn" to="." method="_on_MusicBtn_toggled"] diff --git a/project/lang/local.csv b/project/lang/local.csv index 80c6887..fd7b175 100644 --- a/project/lang/local.csv +++ b/project/lang/local.csv @@ -8,6 +8,8 @@ KRBT,Remove Pants,Ta bort byxor KCLS,Classic,Klassisk KUND,Underwear,Underkläder KCLR,Clear,Klar +KRUS,Resume,Återuppta +KPUS,Paused,Pausad KMUS,Music,Musik KGMO,Game Mode,Spelläge KCRE,Credits,Eftertexter diff --git a/project/lang/local.en.translation b/project/lang/local.en.translation index a708a636c3fd856177b71bff471b3ea302d82be8..299478b05e96b57df1c953e516d86ec5daa6bfb8 100644 GIT binary patch delta 551 zcmX|-ODIH97{|YRr#r@DRyW-w8JnrGn>0m{bQ>h&F_*G3T{EX~H4n|bm!VL`f|YcN zjg*Znh=q+rNs67>%NiSHW#jOjam=Y-|L=T{|9R~D9(?DH6dM76A6yecr-i13&I#o` ze9hxtK?2AEA_=cC6GOKIEl0c-<*F z`Gkz{iM58h^;Oh5K}3~GM|51)+W0MN1<(5*WDnziw^R6BDN@O!DwpNru1ybREp&i& zeiC>3cfXiwTiz6Ne0Dt9z7eKnS(6&^J!)g2FL;CLiZ8D(9)I7}psyw+&{I|3UX`mT z4STdE{)hEQ15$nImvZl?rbk^n!EBt^ZkE89nR9H2=F%C7RjsycX+0(o;%0SN$vjA};uKxnChm@@V delta 521 zcmX@XF^6MA38SwU0|UcvzCaU%Szo?j-JLW!kXc+Z z9H@#Lhkmd$rJ|KpxKIz^WGMSM{+)@W9$_d5y?A7+#0@?gf%mk!C zI_i12n)-n>$V3n}6=rPSJ2{X^Trmg81DOlbac9o^)RjP*9g5d7e5&o7%*ZUvy7OYi zw5G`mnZz|W0Ofe07-ssG2*s+INcsYkwOULkUj&*i2^0nS1cYI#iyYPV0l8owaZmoq zB+r-zw&Uds*4;jn4VlFyqoJ}Od*J^4!Fp71aw4;E{UM;};ntGWqSAtbl0*il%8L9V z2G_jw)STjMhTyW)yyEOchJPW8qqLOke`)<=@XkprF3tqWWoP9V0d<5VDkPRE6hnA< z4520IhnME1GXxhD9bTHv@Xvd4jyD&lKl4AJNNNtyD9;1T{}~T2nZfDi|BvCHuLpal ztnNPskF3K>atauHON%psMgvvm9A1*1$`FuPTAY}|@Xu9ehwHB${}_BSlYuT`2+d1L UEy@Ne0a73r6#+dF6ddFX0MGKEbN~PV delta 498 zcmaFBv4&$q38SwU0|UcwjteV{odh$S-0DE=bMEIlLr2mEoTUd#9}K zKL*#l^wgZENRl3J7vR1c&Wd@_?$^NPVHBr