Convert almost all alert() to tgui_alert()

This commit is contained in:
Aronai Sieyes
2021-06-25 16:20:22 -04:00
parent 70bff20384
commit 0da0c54388
191 changed files with 509 additions and 521 deletions
@@ -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(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", "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(usr, "Would you like to save your changes first?","Save Changes","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(usr, "Would you like to save your changes first?","Save Changes","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)