mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
TGUI Input List Toggle (#23551)
* TGUI Input List Toggle * contraview * Rename * Second rename
This commit is contained in:
@@ -63,8 +63,9 @@
|
||||
#define PREFTOGGLE_2_DANCE_DISCO (1<<16) // 65536
|
||||
#define PREFTOGGLE_2_MOD_ACTIVATION_METHOD (1<<17) // 131072
|
||||
#define PREFTOGGLE_2_PARALLAX_IN_DARKNESS (1<<18) // 262144
|
||||
#define PREFTOGGLE_2_DISABLE_TGUI_LISTS (1<<19) // 524288
|
||||
|
||||
#define TOGGLES_2_TOTAL 524287 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
#define TOGGLES_2_TOTAL 1048575 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
|
||||
#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO|PREFTOGGLE_2_MOD_ACTIVATION_METHOD)
|
||||
|
||||
|
||||
@@ -941,6 +941,9 @@
|
||||
if("tgui")
|
||||
toggles2 ^= PREFTOGGLE_2_FANCYUI
|
||||
|
||||
if("input_lists")
|
||||
toggles2 ^= PREFTOGGLE_2_DISABLE_TGUI_LISTS
|
||||
|
||||
if("ghost_att_anim")
|
||||
toggles2 ^= PREFTOGGLE_2_ITEMATTACK
|
||||
|
||||
|
||||
@@ -408,6 +408,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
if(user.client.donator_level > 0)
|
||||
dat += "<b>Donator Publicity:</b> <a href='?_src_=prefs;preference=donor_public'><b>[(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
|
||||
dat += "<b>Fancy TGUI:</b> <a href='?_src_=prefs;preference=tgui'>[(toggles2 & PREFTOGGLE_2_FANCYUI) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Input Lists:</b> <a href='?_src_=prefs;preference=input_lists'>[(toggles2 & PREFTOGGLE_2_DISABLE_TGUI_LISTS) ? "Default" : "TGUI"]</a><br>"
|
||||
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
|
||||
dat += "<b>Ghost Ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</b></a><br>"
|
||||
dat += "<b>Ghost Radio:</b> <a href='?_src_=prefs;preference=ghost_radio'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]</b></a><br>"
|
||||
|
||||
@@ -226,6 +226,14 @@
|
||||
to_chat(src, "You will no longer hear musical instruments.")
|
||||
SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Instruments") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_input()
|
||||
set name = "Toggle TGUI Input Lists"
|
||||
set category = "Preferences"
|
||||
set desc = "Switches input lists between the TGUI and the standard one"
|
||||
prefs.toggles2 ^= PREFTOGGLE_2_DISABLE_TGUI_LISTS
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles2 & PREFTOGGLE_2_DISABLE_TGUI_LISTS) ? "no longer" : "now"] use TGUI Input Lists.")
|
||||
|
||||
/client/verb/Toggle_disco() //to toggle off the disco machine locally, in case it gets too annoying
|
||||
set name = "Hear/Silence Dance Machine"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
return
|
||||
var/client/client = user
|
||||
user = client.mob
|
||||
|
||||
/// Client does NOT have tgui_input on: Returns regular input
|
||||
if(user.client?.prefs?.toggles2 & PREFTOGGLE_2_DISABLE_TGUI_LISTS)
|
||||
return input(user, message, title) as null|anything in buttons
|
||||
|
||||
var/datum/tgui_list_input/input = new(user, message, title, buttons, timeout)
|
||||
input.ui_interact(user)
|
||||
input.wait()
|
||||
|
||||
Reference in New Issue
Block a user