Revert "TGUI alerts, lists, inputs"

This commit is contained in:
Letter N
2021-10-28 12:17:29 +08:00
committed by GitHub
parent 853ff1d8ad
commit bcdf96f274
362 changed files with 1149 additions and 1570 deletions
@@ -9,7 +9,7 @@ GLOBAL_PROTECT(VVpixelmovement)
/client/proc/vv_parse_text(O, new_var)
if(O && findtext(new_var,"\["))
var/process_vars = tgui_alert(usr, "\[] detected in string, process as variables?","Process Variables?",list("Yes","No"))
var/process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No")
if(process_vars == "Yes")
. = string2listofvars(new_var, O)
@@ -24,7 +24,7 @@ GLOBAL_PROTECT(VVpixelmovement)
if (!subtypes || !subtypes.len)
return FALSE
if (subtypes?.len)
switch(tgui_alert(src, "Strict object type detection?", "Type detection", list("Strictly this type","This type and subtypes", "Cancel")))
switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel"))
if("Strictly this type")
return FALSE
if("This type and subtypes")
@@ -97,7 +97,7 @@ GLOBAL_PROTECT(VVpixelmovement)
L += var_value
switch(tgui_alert(src, "Would you like to associate a value with the list entry?",,list("Yes","No")))
switch(alert("Would you like to associate a value with the list entry?",,"Yes","No"))
if("Yes")
L[var_value] = mod_list_add_ass(O) //hehe
if (O)
@@ -116,7 +116,7 @@ GLOBAL_PROTECT(VVpixelmovement)
return
if(L.len > 1000)
var/confirm = tgui_alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", list("Continue", "Abort"))
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
if(confirm != "Continue")
return
@@ -131,7 +131,7 @@ GLOBAL_PROTECT(VVpixelmovement)
value = "null"
names["#[i] [key] = [value]"] = i
if (!index)
var/variable = tgui_input_list(src, "Which var?","Var",names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)")
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)"
if(variable == null)
return
@@ -178,7 +178,7 @@ GLOBAL_PROTECT(VVpixelmovement)
if (index == null)
return
var/assoc = 0
var/prompt = tgui_alert(src, "Do you want to edit the key or its assigned value?", "Associated List", list("Key", "Assigned Value", "Cancel"))
var/prompt = alert(src, "Do you want to edit the key or its assigned value?", "Associated List", "Key", "Assigned Value", "Cancel")
if (prompt == "Cancel")
return
if (prompt == "Assigned Value")
@@ -308,7 +308,7 @@ GLOBAL_PROTECT(VVpixelmovement)
names = sortList(names)
variable = tgui_input_list(src, "Which var?","Var",names)
variable = input("Which var?","Var") as null|anything in names
if(!variable)
return