mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +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:
@@ -66,7 +66,7 @@
|
||||
return
|
||||
|
||||
if(length(H.cards) > 1)
|
||||
var/confirm = alert("Are you sure you want to put your [length(H.cards)] cards back into the deck?", "Return Hand", "Yes", "No")
|
||||
var/confirm = tgui_alert(user, "Are you sure you want to put your [length(H.cards)] cards back into the deck?", "Return Hand", list("Yes", "No"))
|
||||
if(confirm == "No" || !Adjacent(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
for(var/datum/playingcard/P in H.cards)
|
||||
@@ -191,9 +191,8 @@
|
||||
for(var/mob/living/player in viewers(3))
|
||||
if(!player.incapacitated())
|
||||
players += player
|
||||
var/maxcards = clamp(length(cards), 1, 10)
|
||||
var/dcard = input("How many card(s) do you wish to deal? You may deal up to [maxcards] cards.") as num
|
||||
if(dcard > maxcards)
|
||||
var/dcard = tgui_input_number(usr, "How many card(s) do you wish to deal? You may deal up to [length(cards)] cards.", "Deal Cards", max_value = length(cards))
|
||||
if(!dcard)
|
||||
return
|
||||
var/mob/living/M = tgui_input_list(usr, "Who do you wish to deal [dcard] card(s)?", "Deal Card", players)
|
||||
if(!usr || !src || !M || !Adjacent(usr))
|
||||
@@ -453,7 +452,7 @@
|
||||
var/mob/living/carbon/user = usr
|
||||
|
||||
var/maxcards = min(length(cards), 5)
|
||||
var/discards = input("How many cards do you want to discard? You may discard up to [maxcards] card(s)") as num
|
||||
var/discards = tgui_input_number(usr, "How many cards do you want to discard? You may discard up to [maxcards] card(s)", "Discard Cards", max_value = maxcards)
|
||||
if(discards > maxcards)
|
||||
return
|
||||
for(var/i in 1 to discards)
|
||||
|
||||
Reference in New Issue
Block a user