[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:
Aylong
2024-02-19 11:55:01 +00:00
committed by GitHub
co-authored by Aylong S34N
parent 0d5986fc5c
commit ac5add482f
168 changed files with 2310 additions and 1066 deletions
+1 -1
View File
@@ -93,7 +93,7 @@
if(istype(I, /obj/item/stack) && precise_insertion)
var/atom/current_parent = parent
var/obj/item/stack/S = I
requested_amount = input(user, "How much do you want to insert?", "Inserting [S.singular_name]s") as num|null
requested_amount = tgui_input_number(user, "How much do you want to insert?", "Inserting [S.singular_name]s", max_value = S.amount)
if(isnull(requested_amount) || (requested_amount <= 0))
return
if(QDELETED(I) || QDELETED(user) || QDELETED(src) || parent != current_parent || user.incapacitated() || !in_range(current_parent, user) || user.l_hand != I && user.r_hand != I)
+1 -1
View File
@@ -51,7 +51,7 @@
change_name(H) //time for a new name!
/datum/component/spooky/proc/change_name(mob/living/carbon/human/H)
var/t = stripped_input(H, "Enter your new skeleton name", H.real_name, null, MAX_NAME_LEN)
var/t = tgui_input_text(H, "Enter your new skeleton name", H.real_name, max_length = MAX_NAME_LEN)
if(!t)
t = "spooky skeleton"
H.real_name = t
+4 -4
View File
@@ -1433,7 +1433,7 @@
return
var/mob/living/carbon/human/H = current
var/gear = alert("Agent or Scientist Gear","Gear","Agent","Scientist")
var/gear = alert("Agent or Scientist Gear", "Gear", "Agent", "Scientist")
if(gear)
if(gear=="Agent")
H.equipOutfit(/datum/outfit/abductor/agent)
@@ -1666,9 +1666,9 @@
SSticker.mode.update_wiz_icons_added(src)
/datum/mind/proc/make_Abductor()
var/role = alert("Abductor Role ?","Role","Agent","Scientist")
var/team = input("Abductor Team ?","Team ?") in list(1,2,3,4)
var/teleport = alert("Teleport to ship ?","Teleport","Yes","No")
var/role = alert("Abductor Role?", "Role", "Agent", "Scientist")
var/team = input("Abductor Team?", "Team?") in list(1,2,3,4)
var/teleport = alert("Teleport to ship?", "Teleport", "Yes", "No")
if(!role || !team || !teleport)
return
+1 -1
View File
@@ -67,7 +67,7 @@
to_chat(user, "You switch [src] to [change_voice ? "" : "not "]change your voice on syndicate communications.")
/obj/item/encryptionkey/syndicate/all_channels/AltClick(mob/user)
var/new_name = stripped_input(user, "Enter new fake agent name...", "New name")
var/new_name = tgui_input_text(user, "Enter new fake agent name...", "New name")
if(!new_name)
return
fake_name = copytext(new_name, 1, MAX_NAME_LEN + 1)
+1 -1
View File
@@ -17,7 +17,7 @@
/obj/effect/proc_holder/spell/alien_spell/whisper/cast(list/targets, mob/living/carbon/user)
var/mob/living/target = targets[1]
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
var/msg = tgui_input_text(user, "Message:", "Alien Whisper")
if(!msg)
revert_cast(user)
return
+1 -1
View File
@@ -42,7 +42,7 @@
var/mob/living/carbon/human/target = targets[1]
spawn(0) // allows cast to complete even if recipient ignores the prompt
if(alert(target, "[user] wants to bless you, in the name of [user.p_their()] religion. Accept?", "Accept Blessing?", "Yes", "No") == "Yes") // prevents forced conversions
if(tgui_alert(target, "[user] wants to bless you, in the name of [user.p_their()] religion. Accept?", "Accept Blessing?", list("Yes", "No")) == "Yes") // prevents forced conversions
user.visible_message("[user] starts blessing [target] in the name of [SSticker.Bible_deity_name].", "<span class='notice'>You start blessing [target] in the name of [SSticker.Bible_deity_name].</span>")
if(do_after(user, 150, target = target))
user.visible_message("[user] has blessed [target] in the name of [SSticker.Bible_deity_name].", "<span class='notice'>You have blessed [target] in the name of [SSticker.Bible_deity_name].</span>")