mirror of
https://github.com/tonytins/dressupzack
synced 2025-05-08 06:14:48 -04:00
- 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.
25 lines
685 B
GDScript
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()
|