From 8a501d50b3cad0e152b5aab1b0e6eb52271884a4 Mon Sep 17 00:00:00 2001 From: Anthony Wilcox <35226681+tomiscw@users.noreply.github.com> Date: Wed, 2 Jan 2019 08:50:05 -0500 Subject: [PATCH] WIP settings window --- project/Clothes.tscn | 2 +- project/GameScreen.tscn | 2 +- project/Interface.tscn | 131 ++++++++++++++++-------------- project/lang/local.csv | 5 +- project/lang/local.en.translation | Bin 596 -> 684 bytes project/lang/local.sv.translation | Bin 604 -> 692 bytes project/src/Interface.gd | 3 +- 7 files changed, 77 insertions(+), 66 deletions(-) diff --git a/project/Clothes.tscn b/project/Clothes.tscn index d1428dc..3ad950e 100644 --- a/project/Clothes.tscn +++ b/project/Clothes.tscn @@ -17,7 +17,7 @@ [ext_resource path="res://assets/camera.png" type="Texture" id=15] [ext_resource path="res://assets/owo censor.png" type="Texture" id=16] -[node name="Clothes" type="Node2D" index="0"] +[node name="Clothes" type="Node"] [node name="Wordrobe" type="ReferenceRect" parent="." index="0"] diff --git a/project/GameScreen.tscn b/project/GameScreen.tscn index 79e9d86..786a5fe 100644 --- a/project/GameScreen.tscn +++ b/project/GameScreen.tscn @@ -8,7 +8,7 @@ [ext_resource path="res://Shell.tscn" type="PackedScene" id=6] [ext_resource path="res://Interface.tscn" type="PackedScene" id=7] -[node name="GameScreen" type="Node" index="0"] +[node name="GameScreen" type="Node"] script = ExtResource( 1 ) diff --git a/project/Interface.tscn b/project/Interface.tscn index 0dc0d69..9303a8e 100644 --- a/project/Interface.tscn +++ b/project/Interface.tscn @@ -1,13 +1,9 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://src/Interface.gd" type="Script" id=1] [ext_resource path="res://music/piano.ogg" type="AudioStream" id=2] -[sub_resource type="ButtonGroup" id=1] - -resource_local_to_scene = true - -[node name="Interface" type="Control"] +[node name="Interface" type="Control" index="0"] anchor_left = 0.0 anchor_top = 0.0 @@ -29,7 +25,7 @@ script = ExtResource( 1 ) stream = ExtResource( 2 ) volume_db = 0.0 pitch_scale = 1.0 -autoplay = true +autoplay = false mix_target = 0 bus = "Master" @@ -68,44 +64,14 @@ size_flags_horizontal = 1 size_flags_vertical = 1 alignment = 0 -[node name="MusicBtn" type="CheckBox" parent="RefRect/VertContainer" index="0"] +[node name="SettingsBtn" 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 = 24.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 = 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 = true -pressed = true -enabled_focus_mode = 2 -shortcut = null -group = null -text = "KMUS" -flat = false -align = 1 -_sections_unfolded = [ "custom_colors" ] - -[node name="SettingsBtn" type="Button" parent="RefRect/VertContainer" index="1"] - -visible = false -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 28.0 -margin_right = 147.0 -margin_bottom = 48.0 +margin_bottom = 20.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false focus_mode = 2 @@ -121,15 +87,15 @@ text = "KSET" flat = false align = 1 -[node name="CreditsBtn" type="Button" parent="RefRect/VertContainer" index="2"] +[node name="CreditsBtn" 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 = 28.0 +margin_top = 24.0 margin_right = 147.0 -margin_bottom = 48.0 +margin_bottom = 44.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false focus_mode = 2 @@ -145,15 +111,15 @@ text = "KCRE" flat = false align = 1 -[node name="AboutBtn" type="Button" parent="RefRect/VertContainer" index="3"] +[node name="AboutBtn" type="Button" parent="RefRect/VertContainer" index="2"] anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_top = 52.0 +margin_top = 48.0 margin_right = 147.0 -margin_bottom = 72.0 +margin_bottom = 68.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false focus_mode = 2 @@ -192,7 +158,7 @@ window_title = "KABO" resizable = false dialog_hide_on_ok = true -[node name="AboutTxt" type="RichTextLabel" parent="AboutWin" index="4"] +[node name="AboutTxt" type="RichTextLabel" parent="AboutWin" index="3"] anchor_left = 0.0 anchor_top = 0.0 @@ -250,7 +216,7 @@ window_title = "KCRE" resizable = false dialog_hide_on_ok = true -[node name="CreditsTxt" type="RichTextLabel" parent="CreditsWin" index="4"] +[node name="CreditsTxt" type="RichTextLabel" parent="CreditsWin" index="3"] anchor_left = 0.0 anchor_top = 0.0 @@ -304,15 +270,14 @@ _sections_unfolded = [ "BBCode" ] [node name="SettingsWin" type="AcceptDialog" parent="." index="4"] -visible = false anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_left = 242.0 -margin_top = 69.0 -margin_right = 379.0 -margin_bottom = 140.0 +margin_left = 241.0 +margin_top = 186.0 +margin_right = 382.0 +margin_bottom = 254.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false mouse_filter = 0 @@ -325,16 +290,33 @@ resizable = false dialog_hide_on_ok = true _sections_unfolded = [ "Dialog" ] -[node name="Languages" type="MenuButton" parent="SettingsWin" index="3"] +[node name="Grid" type="GridContainer" parent="SettingsWin" index="3"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -62.5 +margin_top = -26.0 +margin_right = 62.5 +margin_bottom = -2.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 +columns = 2 + +[node name="Languages" type="MenuButton" parent="SettingsWin/Grid" index="0"] + +pause_mode = 1 anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 -margin_left = 8.0 -margin_top = 8.0 -margin_right = 129.0 -margin_bottom = 35.0 +margin_right = 56.0 +margin_bottom = 24.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false mouse_filter = 0 @@ -345,13 +327,36 @@ toggle_mode = false action_mode = 0 enabled_focus_mode = 0 shortcut = null -group = SubResource( 1 ) -text = "Languages" -flat = true +group = null +text = "KLANG" +flat = false align = 1 -items = [ ] +items = [ "KENG", null, 0, true, false, -1, 0, null, "", false, "KSWD", null, 0, false, false, -1, 0, null, "", false ] +_sections_unfolded = [ "Pause" ] -[connection signal="toggled" from="RefRect/VertContainer/MusicBtn" to="." method="_on_MusicBtn_toggled"] +[node name="MusicBtn" type="CheckBox" parent="SettingsWin/Grid" index="1"] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = 60.0 +margin_right = 125.0 +margin_bottom = 24.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 = true +enabled_focus_mode = 2 +shortcut = null +group = null +text = "KMUS" +flat = false +align = 1 [connection signal="pressed" from="RefRect/VertContainer/SettingsBtn" to="." method="_on_SettingsBtn_pressed"] @@ -359,4 +364,6 @@ items = [ ] [connection signal="pressed" from="RefRect/VertContainer/AboutBtn" to="." method="_on_AboutBtn_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 365805d..19f4e3c 100644 --- a/project/lang/local.csv +++ b/project/lang/local.csv @@ -4,4 +4,7 @@ KCRE,Credits,Eftertexter KABO,About,Handla om KSOO,Coming Soon,Kommer snart KHELP,Help,Hjälp -KSET,Settings,Inställningar \ No newline at end of file +KSET,Settings,Inställningar +KLANG,Languages,Språk +KENG,English,Engelsk +KSWD,Swedish,Svenska \ No newline at end of file diff --git a/project/lang/local.en.translation b/project/lang/local.en.translation index f38e4d8511be89e326bc6907826ac34f081bdd84..1dc35b63d6dbfbaff8df90c278db052cdf633a67 100644 GIT binary patch delta 324 zcmcb@vW9g-0AoED0|Ucueq0WlL0GXk;1BlRd* zAk7KIHa}R8ssY&?Pz+K7!q5Jx=WwHnbAcsxUaXkLHhCkXh{;L!PGO)5kgGr#rqkvX zL#92dPO#ishEKJYlOHmQm*@dyL1yy+v5Woh6+nuC4GGHw+3rB>n3P{y!r+mbQ@{{h zo|=+boWbCen3rCfn4Vh95S&_4l9`uY%;1`ro&%El=RDbs;a@PD{67ZY(&Efy2InH6 No|0k)hM?deX8>B8ObGx0 delta 242 zcmZ3(dWB^}0Au}sC}3k?V1Th+~Z1VpYf>TRMGV{`l8Jvq!Q!-16861=HOG_9$QgaG` K${B)!gPZ}+n?h{> diff --git a/project/lang/local.sv.translation b/project/lang/local.sv.translation index 5078e689e38d9e00e1139206e5d120ab2c120e9c..aaeee16daebaabe72e4555a85f1c4875020a7d74 100644 GIT binary patch delta 314 zcmcb^vW0a+0AoED0|Ucueq0WlL0GXk;1BlRdb zAk7EF{6K8;gY~Emkmi75kQxwv_D?+rB#$J{1(w)(v0@s><7gEJlH#Bb^kGV zWF20TQ@{{hmYP?boyZVeP;_`{Hp4&91I+&!4=E{2B!8I>EHK!OT>ODEfn~T$* b`5%LCX>le{z*T35>#rUEfaV1S2RQ=(!e&z! delta 240 zcmdnOdWU600Au2RC}3k?V1Tha{w_H5QF4E zy3K*ux3oAjo8h1L