1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-08 06:14:48 -04:00
dressupzack/project/src/GameScreen.gd
Anthony Wilcox f15145e5e5 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.
2019-01-01 10:54:18 -05:00

25 lines
685 B
GDScript

extends Node2D
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()
func cmd_interface():
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):
cmdl_help.show()
elif cmdl.text == CLOSE_CMD and Input.is_key_pressed(KEY_ENTER):
shell.hide()