mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
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:
@@ -87,19 +87,19 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["weight_gain"])
|
||||
var/weight_gain_rate = input(user, "Choose your character's rate of weight gain between 100% \
|
||||
var/weight_gain_rate = tgui_input_num(user, "Choose your character's rate of weight gain between 100% \
|
||||
(full realism body fat gain) and 0% (no body fat gain).\n\
|
||||
(If you want to disable weight gain, set this to 0.01 to round it to 0%.)\
|
||||
([WEIGHT_CHANGE_MIN]-[WEIGHT_CHANGE_MAX])", "Character Preference") as num|null
|
||||
([WEIGHT_CHANGE_MIN]-[WEIGHT_CHANGE_MAX])", "Character Preference", pref.weight_gain)
|
||||
if(weight_gain_rate)
|
||||
pref.weight_gain = round(text2num(weight_gain_rate),1)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["weight_loss"])
|
||||
var/weight_loss_rate = input(user, "Choose your character's rate of weight loss between 100% \
|
||||
var/weight_loss_rate = tgui_input_num(user, "Choose your character's rate of weight loss between 100% \
|
||||
(full realism body fat loss) and 0% (no body fat loss).\n\
|
||||
(If you want to disable weight loss, set this to 0.01 round it to 0%.)\
|
||||
([WEIGHT_CHANGE_MIN]-[WEIGHT_CHANGE_MAX])", "Character Preference") as num|null
|
||||
([WEIGHT_CHANGE_MIN]-[WEIGHT_CHANGE_MAX])", "Character Preference", pref.weight_loss)
|
||||
if(weight_loss_rate)
|
||||
pref.weight_loss = round(text2num(weight_loss_rate),1)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
Reference in New Issue
Block a user