More TGUI Input Conversions

This commit is contained in:
Casey
2022-06-19 07:08:38 -04:00
committed by CHOMPStation2
parent 1740fb34de
commit b0802ce267
101 changed files with 2948 additions and 143 deletions

View File

@@ -42,7 +42,7 @@
else if(istype(W, /obj/item/weapon/pen))
switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel")))
if("Title")
var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN)
var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(user, "<span class='warning'> Invalid text.</span>")
return
@@ -153,7 +153,7 @@
else if(istype(W, /obj/item/weapon/pen))
switch(tgui_alert(usr, "What would you like to alter?","Select Alteration",list("Title","Description","Cancel")))
if("Title")
var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN)
var/str = sanitizeSafe(tgui_input_text(usr,"Label text?","Set label","", MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(user, "<span class='warning'> Invalid text.</span>")
return