More standard tgui input conversions (#63464)

This commit is contained in:
Jeremiah
2021-12-24 13:04:18 +02:00
committed by GitHub
parent 36e5fcadd3
commit dcab86ba2c
64 changed files with 246 additions and 215 deletions
+3 -3
View File
@@ -234,9 +234,9 @@
if(can_customise)
customise = tgui_alert(user, "Do you want to customize the photo?", "Customization", list("Yes", "No"))
if(customise == "Yes")
var/name1 = stripped_input(user, "Set a name for this photo, or leave blank. 32 characters max.", "Name", max_length = 32)
var/desc1 = stripped_input(user, "Set a description to add to photo, or leave blank. 128 characters max.", "Caption", max_length = 128)
var/caption = stripped_input(user, "Set a caption for this photo, or leave blank. 256 characters max.", "Caption", max_length = 256)
var/name1 = tgui_input_text(user, "Set a name for this photo, or leave blank.", "Name", max_length = 32)
var/desc1 = tgui_input_text(user, "Set a description to add to photo, or leave blank.", "Description", max_length = 128)
var/caption = tgui_input_text(user, "Set a caption for this photo, or leave blank.", "Caption", max_length = 256)
if(name1)
picture.picture_name = name1
if(desc1)
+2 -2
View File
@@ -66,7 +66,7 @@
if(!user.is_literate())
to_chat(user, span_notice("You scribble illegibly on [src]!"))
return
var/txt = stripped_input(user, "What would you like to write on the back?", "Photo Writing", "", 128)
var/txt = tgui_input_text(user, "What would you like to write on the back?", "Photo Writing", max_length = 128)
if(txt && user.canUseTopic(src, BE_CLOSE))
scribble = txt
else
@@ -97,7 +97,7 @@
set category = "Object"
set src in usr
var/n_name = stripped_input(usr, "What would you like to label the photo?", "Photo Labelling", "", MAX_NAME_LEN)
var/n_name = tgui_input_text(usr, "What would you like to label the photo?", "Photo Labelling", max_length = MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
if(n_name && (loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && !usr.incapacitated())
name = "photo[(n_name ? text("- '[n_name]'") : null)]"