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

"Shell" interface

- Created a new hidden "shell" interface. This was initially created for testing the new localization settings but can easily be extended for other purposes.
This commit is contained in:
Anthony Wilcox 2019-01-01 09:51:46 -05:00
parent 7216c18d57
commit 6a806cc55a
4 changed files with 150 additions and 13 deletions

20
project/src/GameScreen.gd Normal file
View file

@ -0,0 +1,20 @@
extends Node2D
onready var shell = $Shell
onready var cmdl = $Shell/RefRect/HSplit/CmdLine
onready var cmdl_exit_btn = $Shell/RefRect/HSplit/ExitBtn
func _process(delta):
cmd_interface()
func cmd_interface():
if Input.is_action_pressed("ui_test"):
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")