Revert "TGUI alerts, lists, inputs"
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
else
|
||||
jmp_coords = coords = "in nullspace"
|
||||
|
||||
if (tgui_alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
if (alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes")
|
||||
log_admin("[key_name(usr)] deleted [D] [coords]")
|
||||
message_admins("[key_name_admin(usr)] deleted [D] [jmp_coords]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -83,25 +83,25 @@
|
||||
if(extra_classes)
|
||||
classes += extra_classes
|
||||
|
||||
.["class"] = tgui_input_list(src, "What kind of data?", "Variable Type", classes)
|
||||
.["class"] = input(src, "What kind of data?", "Variable Type", default_class) as null|anything in classes
|
||||
if(holder && holder.marked_datum && .["class"] == markstring)
|
||||
.["class"] = VV_MARKED_DATUM
|
||||
|
||||
switch(.["class"])
|
||||
if(VV_TEXT)
|
||||
.["value"] = tgui_input_text(src, "Enter new text:", "Text", current_value)
|
||||
.["value"] = input("Enter new text:", "Text", current_value) as null|text
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
if(VV_MESSAGE)
|
||||
.["value"] = tgui_input_message(src, "Enter new text:", "Text", current_value)
|
||||
.["value"] = input("Enter new text:", "Text", current_value) as null|message
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
|
||||
|
||||
if(VV_NUM)
|
||||
.["value"] = tgui_input_num(src, "Enter new number:", "Num", current_value)
|
||||
.["value"] = input("Enter new number:", "Num", current_value) as null|num
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
@@ -128,7 +128,7 @@
|
||||
var/type = current_value
|
||||
var/error = ""
|
||||
do
|
||||
type = tgui_input_text(src, "Enter type:[error]", "Type", type)
|
||||
type = input("Enter type:[error]", "Type", type) as null|text
|
||||
if(!type)
|
||||
break
|
||||
type = text2path(type)
|
||||
@@ -146,7 +146,7 @@
|
||||
.["class"] = null
|
||||
return
|
||||
var/list/things = vv_reference_list(type, subtypes)
|
||||
var/value = tgui_input_list(src, "Select reference:", "Reference", things)
|
||||
var/value = input("Select reference:", "Reference", current_value) as null|anything in things
|
||||
if(!value)
|
||||
.["class"] = null
|
||||
return
|
||||
@@ -159,7 +159,7 @@
|
||||
.["class"] = null
|
||||
return
|
||||
var/list/things = vv_reference_list(type, subtypes)
|
||||
var/value = tgui_input_list(src, "Select reference:", "Reference", things)
|
||||
var/value = input("Select reference:", "Reference", current_value) as null|anything in things
|
||||
if(!value)
|
||||
.["class"] = null
|
||||
return
|
||||
@@ -172,14 +172,14 @@
|
||||
.["class"] = null
|
||||
return
|
||||
var/list/things = vv_reference_list(type, subtypes)
|
||||
var/value = tgui_input_list(src, "Select reference:", "Reference", things)
|
||||
var/value = input("Select reference:", "Reference", current_value) as null|anything in things
|
||||
if(!value)
|
||||
.["class"] = null
|
||||
return
|
||||
.["value"] = things[value]
|
||||
|
||||
if(VV_CLIENT)
|
||||
.["value"] = tgui_input_list(src, "Select reference:", "Reference", GLOB.clients)
|
||||
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
@@ -234,7 +234,7 @@
|
||||
var/type = current_value
|
||||
var/error = ""
|
||||
do
|
||||
type = tgui_input_text(src, "Enter type:[error]", "Type", type)
|
||||
type = input("Enter type:[error]", "Type", type) as null|text
|
||||
if(!type)
|
||||
break
|
||||
type = text2path(type)
|
||||
@@ -256,15 +256,15 @@
|
||||
if(VV_TEXT_LOCATE)
|
||||
var/datum/D
|
||||
do
|
||||
var/ref = tgui_input_text(src, "Enter reference:", "Reference")
|
||||
var/ref = input("Enter reference:", "Reference") as null|text
|
||||
if(!ref)
|
||||
break
|
||||
D = locate(ref)
|
||||
if(!D)
|
||||
tgui_alert(usr, "Invalid ref!")
|
||||
alert("Invalid ref!")
|
||||
continue
|
||||
if(!D.can_vv_mark())
|
||||
tgui_alert(usr, "Datum can not be marked!")
|
||||
alert("Datum can not be marked!")
|
||||
continue
|
||||
while(!D)
|
||||
.["type"] = D.type
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
variable = tgui_input_list(src, "Which var?", "Var", names)
|
||||
variable = input("Which var?", "Var") as null|anything in names
|
||||
else
|
||||
variable = var_name
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if(variable in GLOB.VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = tgui_alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", list("ABORT ", "Continue", " ABORT"))
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
if (prompt != "Continue")
|
||||
return
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
var/pre_processing = new_value
|
||||
var/unique
|
||||
if (varsvars?.len)
|
||||
unique = tgui_alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", list("Unique", "Same"))
|
||||
unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same")
|
||||
if(unique == "Unique")
|
||||
unique = TRUE
|
||||
else
|
||||
@@ -145,7 +145,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
if (VV_NEW_TYPE)
|
||||
var/many = tgui_alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", list("One", "Many", "Cancel"))
|
||||
var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel")
|
||||
if (many == "Cancel")
|
||||
return
|
||||
if (many == "Many")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// If the new name is something that would be restricted by IC chat filters,
|
||||
// give the admin a warning but allow them to do it anyway if they want.
|
||||
// if(CHAT_FILTER_CHECK(new_name) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) == "Cancel")
|
||||
// if(CHAT_FILTER_CHECK(new_name) && alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", "Confirm", "Cancel") == "Cancel")
|
||||
// return
|
||||
|
||||
if( !new_name || !M )
|
||||
@@ -69,7 +69,7 @@
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/monkey", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(tgui_alert(usr, "Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform")
|
||||
return
|
||||
if(!Mo)
|
||||
to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE)
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = tgui_input_num(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0)
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num|null
|
||||
|
||||
if (isnull(amount))
|
||||
return
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
names += componentsubtypes
|
||||
names += "---Elements---"
|
||||
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
||||
var/result = tgui_input_list(usr, "Choose a component/element to add","better know what ur fuckin doin pal",names)
|
||||
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
|
||||
if(!usr || !result || result == "---Components---" || result == "---Elements---")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
mod_list(target, null, "list", "contents", target_index, autodetect_class = FALSE)
|
||||
if(href_list[VV_HK_LIST_REMOVE])
|
||||
var/variable = target[target_index]
|
||||
var/prompt = tgui_alert(src, "Do you want to remove item number [target_index] from list?", "Confirm", list("Yes", "No"))
|
||||
var/prompt = alert("Do you want to remove item number [target_index] from list?", "Confirm", "Yes", "No")
|
||||
if (prompt != "Yes")
|
||||
return
|
||||
target.Cut(target_index, target_index+1)
|
||||
|
||||
Reference in New Issue
Block a user