Adds tgui-style input modals for text, message, num

- Enhanced TextArea components to support autoFocus
- Added component and datum for accepting text, mesage, num input
- Added supporting procs to open the component with signature matching the byond input() proc
- Converted a few cases in character setup to use the new procs as a demo of capability.
This commit is contained in:
Leshana
2021-07-03 22:53:32 -04:00
parent c4aa905244
commit 97774c94fb
11 changed files with 459 additions and 9 deletions
@@ -100,7 +100,7 @@
return TOPIC_REFRESH
else if(href_list["nickname"])
var/raw_nickname = input(user, "Choose your character's nickname:", "Character Nickname") as text|null
var/raw_nickname = tgui_input_text(user, "Choose your character's nickname:", "Character Nickname", pref.nickname)
if (!isnull(raw_nickname) && CanUseTopic(user))
var/new_nickname = sanitize_name(raw_nickname, pref.species, is_FBP())
if(new_nickname)
@@ -140,7 +140,7 @@
return TOPIC_REFRESH
else if(href_list["metadata"])
var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , html_decode(pref.metadata)) as message|null, extra = 0) //VOREStation Edit
var/new_metadata = sanitize(tgui_input_message(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , html_decode(pref.metadata)), extra = 0) //VOREStation Edit
if(new_metadata && CanUseTopic(user))
pref.metadata = new_metadata
return TOPIC_REFRESH