Adds TGUI say and TGUI input. (#17471)

* i alone am the honoured one

* THROUGHOUT HEAVEN AND EARTH I ALONE AM THE HONOURED ONE

* hollow point

* nanana

* ssss

* tgsay final touches

* stuff

* tgui inputs

* help

* carpal tunnel syndrome

* ffff

* again and again and again and again

* hehehehe

* dsada

* readd sanitize

* whoops

* dsad

* nah fuck that

* sd

* fix

* ow

* remove prefs for testmerging

* oops

* oops 2

* fix that

* f

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-10-11 23:26:59 +02:00
committed by GitHub
co-authored by Matt Atlas
parent 518c843e00
commit 54dc8a0860
185 changed files with 2203 additions and 632 deletions
@@ -329,7 +329,7 @@
var/obj/item/integrated_circuit/input/choice
if(available_inputs)
var/selection = input(user, "What do you want to interact with?", "Interaction") as null|anything in input_selection
var/selection = tgui_input_list(user, "What do you want to interact with?", "Interaction", input_selection)
if(selection)
var/index = input_selection.Find(selection)
choice = available_inputs[index]
@@ -144,20 +144,20 @@ list[](
linked -= their_io
/datum/integrated_io/proc/ask_for_data_type(mob/user, var/default, var/list/allowed_data_types = list("string","number","null"))
var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in allowed_data_types
var/type_to_use = tgui_input_list(user, "Please choose a type to use.", "[src] type setting", allowed_data_types)
if(!holder.check_interactivity(user))
return
var/new_data = null
switch(type_to_use)
if("string")
new_data = sanitize(input("Now type in a string.","[src] string writing", istext(default) ? default : null) as null|text, MAX_MESSAGE_LEN, 1, 0, 1)
new_data = tgui_input_text(user, "Now type in a string.", "[src] string writing", istext(default) ? default : "", MAX_MESSAGE_LEN)
if(istext(new_data) && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
return new_data
if("number")
new_data = input("Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num
new_data = tgui_input_number(user, "Now type in a number.", "[src] number writing", isnum(default) ? default : 0)
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
return new_data