ID:268351
 
I have tried searching, but could not think of the right words to search for, and came up with irrelevant information. Is there a way to change the name of the cancel button when doing "input("x") as null|text"
I don't think so, or at least if there is it is not documented anywhere I have seen.

I would like to see input and alert merged in the future so that we can have both a few buttons to press and a list to choose from or text field to type in. Such an input window could allow us to do things such as the following:
mob/verb/say()
var/list/input_data = input("What would you like to say?","Say","Say it","Shout it","Whisper it")as text
var
message=input_data[1]
button_press=input_data[2]
switch(button_press)
if("Say it")view()<<"[name]: [message]"
if("Shout it")world<<"[name]: [message]"
if("Whisper it")
var/list/players=list()
for(var/mob/M in oview(1))
if(M.client)players+=M
var/target=input("Whisper to who?","Whisper","Ok","Cancel")in players
if(target[2]=="Ok")
target[1]<<"[name]: [message]"

If we could do something like that, it would easily solve your problem. Unfortunately, for some reason I keep procrastinating when it comes to posting my ideas in the Q&A section; so I have not suggested it yet. Hopefully we have a format like that in the future.

Also, that example assumes the function returns a list. It could return a list with two elements when both the alert and input functions are used (this would force people to use "as text" after input since it would no longer be implied), but it could return a list of one element or simply the text, number or reference selected. Or perhaps a list with one of the indexes being set to null if not used, however that could cause some problems since players are allowed to choose null in some uses of input.

To reiterate the answer though: no, I don't think it is possible.