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

@@ -505,14 +505,14 @@
switch(action)
if("set_range")
var/new_range = input(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius) as num
var/new_range = tgui_input_number(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius, world.maxx, 1)
if(!new_range)
return TRUE
target_radius = between(1, new_range, world.maxx)
return TRUE
if("set_input_cap")
var/new_cap = round(input(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000)) as num)
var/new_cap = round(tgui_input_number(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000)))
if(!new_cap)
input_cap = 0
return