mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
[READY] TGUI Input Collection (#23891)
* List Input refresh * Modal Alerts * Text Input * Number Input * Split Button * Renaming * Alert converts * Text Input Conversion (Part 1) And TextArea Autofocus + maxLength * Text Input Conversion (Part 2) * AAAAAAAAAAAAAAAAAAAA * I'm FUCKED * @GDNgit review changes * "'" fixes * Revert TGUI Alert from admin delete * NumberInput Window size * CRASH if empty list * Update code/modules/tgui/tgui_input/list_input.dm * TGUI Rebuild * TGUI Rebuild * Update code/modules/paperwork/faxmachine.dm * _char * compile * Rebuild --------- Co-authored-by: Aylong <69762909+Aylong220@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
@@ -256,7 +256,7 @@
|
||||
return
|
||||
var/amount = 1
|
||||
if(params["multiple"])
|
||||
var/num_input = input(user, "Amount", "How many crates? ([MULTIPLE_CRATE_MAX] Max)") as null|num
|
||||
var/num_input = tgui_input_number(user, "Amount", "How many crates?", max_value = MULTIPLE_CRATE_MAX)
|
||||
if(!num_input || (!is_public && !is_authorized(user)) || ..()) // Make sure they dont walk away
|
||||
return
|
||||
amount = clamp(round(num_input), 1, MULTIPLE_CRATE_MAX)
|
||||
@@ -264,7 +264,7 @@
|
||||
if(!istype(P))
|
||||
return
|
||||
var/timeout = world.time + (60 SECONDS) // If you dont type the reason within a minute, theres bigger problems here
|
||||
var/reason = input(user, "Reason", "Why do you require this item?","") as null|text
|
||||
var/reason = tgui_input_text(user, "Reason", "Why do you require this item?", encode = FALSE)
|
||||
if(world.time > timeout || !reason || (!is_public && !is_authorized(user)) || ..())
|
||||
// Cancel if they take too long, they dont give a reason, they aint authed, or if they walked away
|
||||
return
|
||||
@@ -431,8 +431,8 @@
|
||||
var/attempt_pin = pin
|
||||
if(customer_account.security_level != ACCOUNT_SECURITY_ID && !attempt_pin)
|
||||
//if pin is not given, we'll prompt them here
|
||||
attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
if(!Adjacent(user))
|
||||
attempt_pin = tgui_input_number(user, "Enter pin code", "Vendor transaction")
|
||||
if(!Adjacent(user) || !attempt_pin)
|
||||
return FALSE
|
||||
var/is_admin = is_admin(user)
|
||||
if(!account_database.try_authenticate_login(customer_account, attempt_pin, TRUE, FALSE, is_admin))
|
||||
|
||||
Reference in New Issue
Block a user