tgui_say
The tgui say modal. This initializes an input window which hides until the user presses one of the speech hotkeys. Once something is entered, it will delegate the speech to the proper channel.
Vars | |
client | The user who opened the window |
---|---|
hurt_phrases | Injury phrases to blurt out |
max_length | Max message length |
window | The modal window |
window_open | Boolean for whether the tgui_say was opened by the user. |
Procs | |
New | Creates the new input window to exist in the background. |
alter_entry | Alters text when players are injured. Adds text, trims left and right side |
close | Closes the window serverside. Closes any open chat bubbles regardless of preference. Logs the event. |
delegate_speech | Delegates the speech to the proper channel. |
force_say | Force say handler. Sends a message to the say modal to send its current value. |
handle_entry | Handles text entry and forced speech. |
initialize | After a brief period, injects the scripts into the window to listen for open commands. |
load | Ensures nothing funny is going on window load. Minimizes the window, sets max length, closes all typing and thinking indicators. This is triggered as soon as the window sends the "ready" message. |
on_message | The equivalent of ui_act, this waits on messages from the window and delegates actions. |
open | Sets the window as "opened" server side, though it is already visible to the user. We do this to set local vars & start typing (if enabled and in an IC channel). Logs the event. |
start_thinking | Sets the mob as "thinking" - with indicator and the TRAIT_THINKING_IN_CHARACTER trait |
start_typing | Handles the user typing. After a brief period of inactivity, signals the client mob to revert to the "thinking" icon. |
stop_thinking | Removes typing/thinking indicators and flags the mob as not thinking |
stop_typing | Remove the typing indicator after a brief period of inactivity or during say events. If the user was typing IC, the thinking indicator is shown. |
Var Details
client
The user who opened the window
hurt_phrases
Injury phrases to blurt out
max_length
Max message length
window
The modal window
window_open
Boolean for whether the tgui_say was opened by the user.
Proc Details
New
Creates the new input window to exist in the background.
alter_entry
Alters text when players are injured. Adds text, trims left and right side
Arguments: payload - a string list containing entry & channel Returns: string - the altered entry
close
Closes the window serverside. Closes any open chat bubbles regardless of preference. Logs the event.
delegate_speech
Delegates the speech to the proper channel.
Arguments: entry - the text to broadcast channel - the channel to broadcast in Returns: boolean - on success or failure
force_say
Force say handler. Sends a message to the say modal to send its current value.
handle_entry
Handles text entry and forced speech.
Arguments: type - a string "entry" or "force" based on how this function is called payload - a string list containing entry & channel Returns: boolean - success or failure
initialize
After a brief period, injects the scripts into the window to listen for open commands.
load
Ensures nothing funny is going on window load. Minimizes the window, sets max length, closes all typing and thinking indicators. This is triggered as soon as the window sends the "ready" message.
on_message
The equivalent of ui_act, this waits on messages from the window and delegates actions.
open
Sets the window as "opened" server side, though it is already visible to the user. We do this to set local vars & start typing (if enabled and in an IC channel). Logs the event.
Arguments: payload - A list containing the channel the window was opened in.
start_thinking
Sets the mob as "thinking" - with indicator and the TRAIT_THINKING_IN_CHARACTER trait
start_typing
Handles the user typing. After a brief period of inactivity, signals the client mob to revert to the "thinking" icon.
stop_thinking
Removes typing/thinking indicators and flags the mob as not thinking
stop_typing
Remove the typing indicator after a brief period of inactivity or during say events. If the user was typing IC, the thinking indicator is shown.