mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-28 23:59:40 +01:00
ALL runtimes
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
// return tgui_input_list(user, message, title, buttons, timeout, autofocus)
|
||||
|
||||
// Client does NOT have tgui_input on: Returns regular input
|
||||
if(!usr.client.prefs.tgui_input_mode || strict_byond)
|
||||
if(!user.client.prefs.tgui_input_mode || strict_byond)
|
||||
if(length(buttons) == 2)
|
||||
return alert(user, message, title, buttons[1], buttons[2])
|
||||
if(length(buttons) == 3)
|
||||
@@ -64,7 +64,7 @@
|
||||
/// The lifespan of the tgui_modal, after which the window will close and delete itself.
|
||||
var/timeout
|
||||
/// The bool that controls if this modal should grab window focus
|
||||
var/autofocus
|
||||
var/autofocus
|
||||
/// Boolean field describing if the tgui_modal was closed by the user.
|
||||
var/closed
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
/datum/tgui_alert/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
if(timeout)
|
||||
.["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS))
|
||||
data["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS))
|
||||
return data
|
||||
|
||||
/datum/tgui_alert/tgui_act(action, list/params)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
else
|
||||
return
|
||||
/// Client does NOT have tgui_input on: Returns regular input
|
||||
if(!usr.client.prefs.tgui_input_mode && !strict_modern)
|
||||
if(!user.client.prefs.tgui_input_mode && !strict_modern)
|
||||
return input(user, message, title, default) as null|anything in items
|
||||
var/datum/tgui_list_input/input = new(user, message, title, items, default, timeout)
|
||||
input.tgui_interact(user)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
else
|
||||
return
|
||||
// Client does NOT have tgui_input on: Returns regular input
|
||||
if(!usr.client.prefs.tgui_input_mode)
|
||||
if(!user.client.prefs.tgui_input_mode)
|
||||
var/input_number = input(user, message, title, default) as null|num
|
||||
return clamp(round_value ? round(input_number) : input_number, min_value, max_value)
|
||||
var/datum/tgui_input_number/number_input = new(user, message, title, default, max_value, min_value, timeout, round_value)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
else
|
||||
return
|
||||
// Client does NOT have tgui_input on: Returns regular input
|
||||
if(!usr.client.prefs.tgui_input_mode)
|
||||
if(!user.client.prefs.tgui_input_mode)
|
||||
if(encode)
|
||||
if(multiline)
|
||||
return stripped_multiline_input(user, message, title, default, max_length)
|
||||
|
||||
Reference in New Issue
Block a user