mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-30 08:07:03 +01:00
TGUI Input Framework
This commit is contained in:
@@ -83,6 +83,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
var/tgui_fancy = TRUE
|
||||
var/tgui_lock = TRUE
|
||||
var/tgui_input_mode = TRUE // All the Input Boxes (Text,Number,List,Alert)
|
||||
var/tgui_large_buttons = TRUE
|
||||
var/tgui_swapped_buttons = FALSE
|
||||
var/windowflashing = TRUE
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
/// A separate variable for deadmin toggles, only deals with those.
|
||||
@@ -948,7 +951,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "</td>"
|
||||
if(pref_species.id == SPECIES_DULLAHAN)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
|
||||
dat += "<h3>Neckfire</h3>"
|
||||
dat += "<a style='display:block;width:50px' href='?_src_=prefs;preference=has_neckfire;task=input'>[features["neckfire"] ? "Yes" : "No"]</a>"
|
||||
if(features["neckfire"])
|
||||
@@ -2260,7 +2263,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["neckfire_color"] = sanitize_hexcolor(new_neckfire_color, 6)
|
||||
else
|
||||
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
|
||||
if("ipc_screen")
|
||||
var/new_ipc_screen
|
||||
new_ipc_screen = input(user, "Choose your character's screen:", "Character Preference") as null|anything in GLOB.ipc_screens_list
|
||||
|
||||
@@ -405,6 +405,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["see_chat_non_mob"] >> see_chat_non_mob
|
||||
S["tgui_fancy"] >> tgui_fancy
|
||||
S["tgui_lock"] >> tgui_lock
|
||||
S["tgui_input_mode"] >> tgui_input_mode
|
||||
S["tgui_large_buttons"] >> tgui_large_buttons
|
||||
S["tgui_swapped_buttons"] >> tgui_swapped_buttons
|
||||
S["buttons_locked"] >> buttons_locked
|
||||
S["windowflash"] >> windowflashing
|
||||
S["be_special"] >> be_special
|
||||
@@ -490,6 +493,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
see_chat_non_mob = sanitize_integer(see_chat_non_mob, 0, 1, initial(see_chat_non_mob))
|
||||
tgui_fancy = sanitize_integer(tgui_fancy, 0, 1, initial(tgui_fancy))
|
||||
tgui_lock = sanitize_integer(tgui_lock, 0, 1, initial(tgui_lock))
|
||||
tgui_input_mode = sanitize_integer(tgui_input_mode, 0, 1, initial(tgui_input_mode))
|
||||
tgui_large_buttons = sanitize_integer(tgui_large_buttons, 0, 1, initial(tgui_large_buttons))
|
||||
tgui_swapped_buttons = sanitize_integer(tgui_swapped_buttons, 0, 1, initial(tgui_swapped_buttons))
|
||||
buttons_locked = sanitize_integer(buttons_locked, 0, 1, initial(buttons_locked))
|
||||
windowflashing = sanitize_integer(windowflashing, 0, 1, initial(windowflashing))
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
@@ -607,6 +613,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["see_chat_non_mob"], see_chat_non_mob)
|
||||
WRITE_FILE(S["tgui_fancy"], tgui_fancy)
|
||||
WRITE_FILE(S["tgui_lock"], tgui_lock)
|
||||
WRITE_FILE(S["tgui_input_mode"], tgui_input_mode)
|
||||
WRITE_FILE(S["tgui_large_buttons"], tgui_large_buttons)
|
||||
WRITE_FILE(S["tgui_swapped_buttons"], tgui_swapped_buttons)
|
||||
WRITE_FILE(S["buttons_locked"], buttons_locked)
|
||||
WRITE_FILE(S["windowflash"], windowflashing)
|
||||
WRITE_FILE(S["be_special"], be_special)
|
||||
|
||||
Reference in New Issue
Block a user