1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-08 06:14:48 -04:00

Replaced custom windows with Godot's native ones

- Got rid of my custom windows for Godot's because I forgot the engine had those, for some reason. ¯\_(ツ)_/¯ Oh well, at least it frees up a lot of unnecessary baggage and stress. Everything else is pretty much the same, aside from that.
This commit is contained in:
Anthony Wilcox 2019-01-01 10:54:18 -05:00
parent 6a806cc55a
commit f15145e5e5
13 changed files with 216 additions and 309 deletions

View file

@ -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="Node2D" index="0"]
[node name="GameScreen" type="Node2D"]
script = ExtResource( 1 )

View file

@ -20,7 +20,16 @@ size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 1 )
[node name="ReferenceRect" type="ReferenceRect" parent="." index="0"]
[node name="Music" type="AudioStreamPlayer" parent="." index="0"]
stream = ExtResource( 2 )
volume_db = 0.0
pitch_scale = 1.0
autoplay = true
mix_target = 0
bus = "Master"
[node name="ReferenceRect" type="ReferenceRect" parent="." index="1"]
anchor_left = 0.0
anchor_top = 0.0
@ -132,14 +141,134 @@ flat = false
align = 1
_sections_unfolded = [ "Margin" ]
[node name="Music" type="AudioStreamPlayer" parent="." index="1"]
[node name="AboutWin" type="WindowDialog" parent="." index="2"]
stream = ExtResource( 2 )
volume_db = 0.0
pitch_scale = 1.0
autoplay = true
mix_target = 0
bus = "Master"
visible = false
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 260.0
margin_top = 132.0
margin_right = 608.0
margin_bottom = 382.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
window_title = "KABO"
resizable = false
[node name="AboutTxt" type="RichTextLabel" parent="AboutWin" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 12.0
margin_top = 7.0
margin_right = -16.0
margin_bottom = -14.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
bbcode_enabled = false
bbcode_text = ""
visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = "Zack's Dress Up is a port and remake of ZC's Dress Up. Both created by Anthony Wilcox.
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Zack's Dress Up is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Zack's Dress Up. If not, see: https://www.gnu.org/licenses/"
scroll_active = true
scroll_following = false
selection_enabled = true
override_selected_font_color = false
[node name="CreditsWin" type="WindowDialog" parent="." index="3"]
visible = false
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 260.0
margin_top = 132.0
margin_right = 608.0
margin_bottom = 382.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
window_title = "KCRE"
resizable = false
[node name="CreditsTxt" type="RichTextLabel" parent="CreditsWin" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 12.0
margin_top = 7.0
margin_right = 332.0
margin_bottom = 236.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
bbcode_enabled = true
bbcode_text = "[center]Created by
Anthony Wilcox
Clothing inspired by
Megawolf77
Canon Rhode
##########################
[img]assets/sixam_logo_200px.png[/img]
SixAM is a brand by Anthony Wilcox.
[/center]"
visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = "Created by
Anthony Wilcox
Clothing inspired by
Megawolf77
Canon Rhode
##########################
SixAM is a brand by Anthony Wilcox.
"
scroll_active = true
scroll_following = false
selection_enabled = true
override_selected_font_color = false
_sections_unfolded = [ "BBCode" ]
[connection signal="toggled" from="ReferenceRect/VertContainer/MusicBtn" to="." method="_on_MusicBtn_toggled"]

View file

@ -1,6 +1,6 @@
[gd_scene format=2]
[node name="Shell" type="Control"]
[node name="Shell" type="Control" index="0"]
anchor_left = 0.0
anchor_top = 0.0
@ -15,7 +15,61 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
[node name="RefRect" type="ReferenceRect" parent="." index="0"]
[node name="HelpWin" type="WindowDialog" parent="." index="0"]
visible = false
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 183.0
margin_top = 124.0
margin_right = 373.0
margin_bottom = 198.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
window_title = "KHELP"
resizable = false
[node name="HelpTxt" type="RichTextLabel" parent="HelpWin" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 4.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
bbcode_enabled = true
bbcode_text = "[center]help - Shows this window
lang en - Use English
lang sv - Use Swedish
close - Closes the shell[/center]"
visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = "help - Shows this window
lang en - Use English
lang sv - Use Swedish
close - Closes the shell"
scroll_active = true
scroll_following = false
selection_enabled = true
override_selected_font_color = false
_sections_unfolded = [ "BBCode" ]
[node name="RefRect" type="ReferenceRect" parent="." index="1"]
anchor_left = 0.0
anchor_top = 0.0
@ -32,7 +86,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
[node name="HSplit" type="HSplitContainer" parent="RefRect" index="0"]
[node name="CmdLine" type="LineEdit" parent="RefRect" index="0"]
anchor_left = 0.0
anchor_top = 0.0
@ -44,24 +98,6 @@ margin_right = 288.0
margin_bottom = 30.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
split_offset = 165
collapsed = false
dragger_visibility = 0
[node name="CmdLine" type="LineEdit" parent="RefRect/HSplit" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 223.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 = 1
@ -76,28 +112,4 @@ caret_blink_speed = 0.65
caret_position = 0
_sections_unfolded = [ "Caret" ]
[node name="ExitBtn" type="Button" parent="RefRect/HSplit" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 235.0
margin_right = 282.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 = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Close"
flat = false
align = 1

View file

@ -3,3 +3,4 @@ KMUS,Music,Musik
KCRE,Credits,Eftertexter
KABO,About,Handla om
KSOO,Coming Soon,Kommer snart
KHELP,Help,Hjälp
1 en sv
3 KCRE Credits Eftertexter
4 KABO About Handla om
5 KSOO Coming Soon Kommer snart
6 KHELP Help Hjälp

Binary file not shown.

Binary file not shown.

View file

@ -24,7 +24,7 @@ window/size/resizable=false
[input]
ui_test=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777255,"unicode":0,"echo":false,"script":null)
ui_shell=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":16777255,"unicode":0,"echo":false,"script":null)
]
[locale]

View file

@ -1,20 +1,25 @@
extends Node2D
onready var shell = $Shell
onready var cmdl = $Shell/RefRect/HSplit/CmdLine
onready var cmdl_exit_btn = $Shell/RefRect/HSplit/ExitBtn
onready var cmdl = $Shell/RefRect/CmdLine
onready var cmdl_help = $Shell/HelpWin
const CLOSE_CMD = "close"
func _process(delta):
cmd_interface()
func cmd_interface():
if Input.is_action_pressed("ui_test"):
if Input.is_action_pressed("ui_shell"):
if cmdl.text == CLOSE_CMD:
cmdl.text = ""
shell.show()
if cmdl_exit_btn.pressed:
shell.hide()
if cmdl.text == "lang sv" and Input.is_key_pressed(KEY_ENTER):
TranslationServer.set_locale("sv")
elif cmdl.text == "lang en" and Input.is_key_pressed(KEY_ENTER):
TranslationServer.set_locale("en")
elif cmdl.text == "help"and Input.is_key_pressed(KEY_ENTER):
cmdl_help.show()
elif cmdl.text == CLOSE_CMD and Input.is_key_pressed(KEY_ENTER):
shell.hide()

View file

@ -2,18 +2,14 @@
# See the LICENSE file in the project root for more information.
extends Control
onready var coming_soon_win = preload("res://windows/ComingSoon.tscn")
onready var about_win = preload("res://windows/About.tscn")
onready var credits_win = preload("res://windows/Credits.tscn")
onready var about_win = $AboutWin
onready var credits_win = $CreditsWin
func _on_AboutBtn_pressed():
var win_instance = about_win.instance()
add_child(win_instance)
about_win.show()
func _on_CreditsBtn_pressed():
var win_instance = credits_win.instance()
add_child(win_instance)
credits_win.show()
func _on_MusicBtn_toggled(button_pressed):
if button_pressed == true:

View file

@ -1,181 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://src/WindowControl.gd" type="Script" id=1]
[node name="WindowControl" type="Control"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 40.0
margin_bottom = 40.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 )
toolbar_title = ""
content_text = ""
content_height = 216
[node name="WindowFrame" type="ReferenceRect" parent="." index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 351.0
margin_bottom = 249.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 = [ "Patch Margin", "Rect" ]
[node name="ContentFrame" type="ReferenceRect" parent="WindowFrame" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 32.0
margin_right = 350.0
margin_bottom = 248.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 = [ "Rect" ]
[node name="ContentPanel" type="Panel" parent="WindowFrame/ContentFrame" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 1.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 = [ "Rect" ]
[node name="ContentTxt" type="RichTextLabel" parent="WindowFrame/ContentFrame" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 6.0
margin_top = 5.0
margin_right = 347.0
margin_bottom = 208.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
bbcode_enabled = true
bbcode_text = ""
visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = ""
scroll_active = true
scroll_following = false
selection_enabled = false
override_selected_font_color = false
_sections_unfolded = [ "BBCode" ]
[node name="TitleBarFrame" type="ReferenceRect" parent="WindowFrame" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 351.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
_sections_unfolded = [ "Rect" ]
[node name="TitleBar" type="Panel" parent="WindowFrame/TitleBarFrame" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.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="CloseBtn" type="Button" parent="WindowFrame/TitleBarFrame/TitleBar" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 3.0
margin_top = 3.0
margin_right = 26.0
margin_bottom = 26.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 = "X"
flat = false
align = 1
_sections_unfolded = [ "Rect" ]
[node name="TitleLbl" type="Label" parent="WindowFrame/TitleBarFrame/TitleBar" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 0.0
margin_left = 31.0
margin_bottom = 31.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 = "Title Bar"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[connection signal="gui_input" from="WindowFrame/TitleBarFrame/TitleBar" to="." method="_on_TitleBar_gui_input"]
[connection signal="pressed" from="WindowFrame/TitleBarFrame/TitleBar/CloseBtn" to="." method="_on_CloseBtn_pressed"]

View file

@ -1,18 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://widgets/WindowControl.tscn" type="PackedScene" id=1]
[node name="About" type="Node"]
[node name="WindowControl" parent="." index="0" instance=ExtResource( 1 )]
toolbar_title = "KABO"
content_text = "Zack's Dress Up is a port and remake of ZC's Dress Up. Both created by Anthony Wilcox.
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Zack's Dress Up is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Zack's Dress Up. If not, see: https://www.gnu.org/licenses/"

View file

@ -1,13 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://widgets/WindowControl.tscn" type="PackedScene" id=1]
[node name="ComingSoon" type="Node"]
[node name="WindowControl" parent="." index="0" instance=ExtResource( 1 )]
toolbar_title = "KSOO"
content_text = "This feature has not been implemented yet."
content_height = 30

View file

@ -1,24 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://widgets/WindowControl.tscn" type="PackedScene" id=1]
[node name="Credits" type="Node"]
[node name="WindowControl" parent="." index="0" instance=ExtResource( 1 )]
toolbar_title = "KCRE"
content_text = "[center]Created by
Anthony Wilcox
Clothing inspired by
Megawolf77
Canon Rhode
##########################
[img]assets/sixam_logo_200px.png[/img]
SixAM is a brand by Anthony Wilcox.
[/center]"
content_height = 217