TGUI input box conversions 1 (#63313)

This commit is contained in:
Jeremiah
2021-12-11 14:21:35 -08:00
committed by GitHub
parent f6d15afaa1
commit 1052bc19ed
32 changed files with 81 additions and 79 deletions
+2 -2
View File
@@ -72,8 +72,8 @@
if(mode)
to_chat(user, span_notice("You turn on [src]."))
//Now let them chose the text.
var/str = reject_bad_text(stripped_input(user, "Label text?", "Set label","", MAX_NAME_LEN))
if(!str || !length(str))
var/str = reject_bad_text(tgui_input_text(user, "Label text", "Set Label", max_length = 64))
if(!str)
to_chat(user, span_warning("Invalid text!"))
return
label = str
+1 -1
View File
@@ -146,7 +146,7 @@
H.damageoverlaytemp = 9001
H.update_damage_hud()
return
var/n_name = stripped_input(usr, "What would you like to label the paper?", "Paper Labelling", null, MAX_NAME_LEN)
var/n_name = tgui_input_text(usr, "Enter a paper label", "Paper Labelling", max_length = MAX_NAME_LEN)
if(((loc == usr || istype(loc, /obj/item/clipboard)) && usr.stat == CONSCIOUS))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)