mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-03 05:52:43 +00:00
The One Where I Port Modals
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
var/datum/computer_file/data/F = HDD.find_file_by_name(open_file)
|
||||
if(!F || !istype(F))
|
||||
return
|
||||
if(F.do_not_edit && (alert("WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No"))
|
||||
if(F.do_not_edit && (tgui_alert(usr, "WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", list("No", "Yes")) == "No"))
|
||||
return
|
||||
|
||||
var/oldtext = html_decode(F.stored_data)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
if("PRG_openfile")
|
||||
if(is_edited)
|
||||
if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes")
|
||||
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
|
||||
save_file(open_file)
|
||||
browsing = 0
|
||||
if(!open_file(params["PRG_openfile"]))
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
if("PRG_newfile")
|
||||
if(is_edited)
|
||||
if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes")
|
||||
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
|
||||
save_file(open_file)
|
||||
|
||||
var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
return TRUE
|
||||
|
||||
if("newaccount")
|
||||
var/newdomain = sanitize(input(usr,"Pick domain:", "Domain name") as null|anything in using_map.usable_email_tlds)
|
||||
var/newdomain = sanitize(tgui_input_list(usr,"Pick domain:", "Domain name", using_map.usable_email_tlds))
|
||||
if(!newdomain)
|
||||
return TRUE
|
||||
var/newlogin = sanitize(input(usr,"Pick account name (@[newdomain]):", "Account name"), 100)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
ntnet_global.setting_disabled = FALSE
|
||||
return TRUE
|
||||
|
||||
var/response = alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No")
|
||||
var/response = tgui_alert(usr, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", list("Yes", "No"))
|
||||
if(response == "Yes" && tgui_status(usr, state) == STATUS_INTERACTIVE)
|
||||
ntnet_global.setting_disabled = TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -80,14 +80,16 @@ var/warrant_uid = 0
|
||||
if("addwarrant")
|
||||
. = TRUE
|
||||
var/datum/data/record/warrant/W = new()
|
||||
var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search","arrest"))
|
||||
var/temp = tgui_alert(usr, "Do you want to create a search-, or an arrest warrant?", "Warrant Type", list("Search","Arrest","Cancel"))
|
||||
if(!temp)
|
||||
return
|
||||
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
|
||||
if(temp == "arrest")
|
||||
if(temp == "Arrest")
|
||||
W.fields["namewarrant"] = "Unknown"
|
||||
W.fields["charges"] = "No charges present"
|
||||
W.fields["auth"] = "Unauthorized"
|
||||
W.fields["arrestsearch"] = "arrest"
|
||||
if(temp == "search")
|
||||
if(temp == "Search")
|
||||
W.fields["namewarrant"] = "No suspect/location given" // VOREStation edit
|
||||
W.fields["charges"] = "No reason given"
|
||||
W.fields["auth"] = "Unauthorized"
|
||||
@@ -109,7 +111,7 @@ var/warrant_uid = 0
|
||||
var/namelist = list()
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
namelist += t.fields["name"]
|
||||
var/new_name = sanitize(input(usr, "Please input name") as null|anything in namelist)
|
||||
var/new_name = sanitize(tgui_input_list(usr, "Please input name:", "Name Choice", namelist))
|
||||
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
|
||||
if (!new_name)
|
||||
return
|
||||
@@ -117,7 +119,7 @@ var/warrant_uid = 0
|
||||
|
||||
if("editwarrantnamecustom")
|
||||
. = TRUE
|
||||
var/new_name = sanitize(input("Please input name") as null|text)
|
||||
var/new_name = sanitize(input(usr, "Please input name") as null|text)
|
||||
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
|
||||
if (!new_name)
|
||||
return
|
||||
@@ -125,7 +127,7 @@ var/warrant_uid = 0
|
||||
|
||||
if("editwarrantcharges")
|
||||
. = TRUE
|
||||
var/new_charges = sanitize(input("Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
|
||||
var/new_charges = sanitize(input(usr, "Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
|
||||
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
|
||||
if (!new_charges)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user