1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-06-26 08:34:43 -04:00

Changed window dialog types

- Changed the window dialog types to so they can be exited upon just by pressing "Ok"
- Settings shell command has been simplfied so typing "settings" will show the setting window, as oppose to the button.
- Renamed cmd_interface to shell_interface
- Tweaked the about text
This commit is contained in:
Anthony Wilcox 2019-01-02 01:15:41 -05:00
parent 05b137616c
commit 602e6b0a45
4 changed files with 30 additions and 34 deletions

View file

@ -1,31 +1,24 @@
extends Node
onready var shell = $Shell
onready var cmdl = $Shell/RefRect/CmdLine
onready var cmdl_help = $Shell/HelpWin
const CLOSE_CMD = "close"
func _process(delta):
cmd_interface()
shell_interface()
func cmd_interface():
var settingsBtn = $Interface/RefRect/VertContainer/SettingsBtn
func shell_interface():
var shell = $Shell
var cmdl = $Shell/RefRect/CmdLine
var cmdl_help = $Shell/HelpWin
var settingsWin = $Interface/SettingsWin
if Input.is_action_pressed("ui_shell"):
if cmdl.text == CLOSE_CMD:
cmdl.text = ""
shell.show()
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):
if cmdl.text == "help"and Input.is_key_pressed(KEY_ENTER):
cmdl_help.show()
elif cmdl.text == "show settings" and Input.is_key_pressed(KEY_ENTER):
settingsBtn.show()
elif cmdl.text == "hide settings" and Input.is_key_pressed(KEY_ENTER):
settingsBtn.hide()
elif cmdl.text == "settings" and Input.is_key_pressed(KEY_ENTER):
settingsWin.show()
elif cmdl.text == CLOSE_CMD and Input.is_key_pressed(KEY_ENTER):
shell.hide()