TGUI Input Conversions

This commit is contained in:
Casey
2022-06-18 23:58:15 -04:00
committed by CHOMPStation2
parent 1740fb34de
commit 928a321b5f
201 changed files with 2350 additions and 491 deletions

View File

@@ -85,19 +85,19 @@
switch(.["class"])
if (VV_TEXT)
.["value"] = input(usr, "Enter new text:", "Text", current_value) as null|text
.["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value)
if (.["value"] == null)
.["class"] = null
return
if (VV_MESSAGE)
.["value"] = input(usr, "Enter new text:", "Text", current_value) as null|message
.["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value, multiline = TRUE)
if (.["value"] == null)
.["class"] = null
return
if (VV_NUM)
.["value"] = input(usr, "Enter new number:", "Num", current_value) as null|num
.["value"] = tgui_input_number(usr, "Enter new number:", "Num", current_value)
if (.["value"] == null)
.["class"] = null
return
@@ -124,7 +124,7 @@
var/type = current_value
var/error = ""
do
type = input(usr, "Enter type:[error]", "Type", type) as null|text
type = tgui_input_text(usr, "Enter type:[error]", "Type", type)
if (!type)
break
type = text2path(type)
@@ -229,7 +229,7 @@
var/type = current_value
var/error = ""
do
type = input(usr, "Enter type:[error]", "Type", type) as null|text
type = tgui_input_text(usr, "Enter type:[error]", "Type", type)
if (!type)
break
type = text2path(type)

View File

@@ -475,7 +475,7 @@
var/Text = href_list["adjustDamage"]
var/amount = input(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
var/amount = tgui_input_number(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0)
if(!L)
to_chat(usr, "Mob doesn't exist anymore")