1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-06-26 08:34:43 -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

@ -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

@ -1,19 +1,15 @@
# Anthony Wilcox licenses this file to you under the GPL license.
# 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: