UI (functions)/Textbox: Difference between revisions
Created page with "== WaitShowDialogue == Displays a dialogue box with text, waiting until the player completes it. Takes a string as an argument. === Arguments === Argument order is <code>UI:WaitShowDialouge(text, callbacks)</code> {| class="wikitable" |- ! Name !! Type !! Technical Type !! Purpose !! Required |- | text || String || ? || The text to display with the textbox. || Yes |- | callbacks || Lua Table || ? || A table of callbacks to be called by the textbox for customization fe..." |
No edit summary |
||
| Line 227: | Line 227: | ||
* <code>time</code>: The time for the text to fade in. | * <code>time</code>: The time for the text to fade in. | ||
== WaitDialog == | |||
Displays the currently set dialogue box and waits for the player to complete it. | |||
=== Example === | |||
<pre> | |||
UI:WaitDialog() | |||
</pre> | |||
== UI:_DummyWait == | |||
Instantly break. Used as default/invalid value when returning a yieldable value. | |||
Revision as of 03:46, 18 January 2026
WaitShowDialogue
Displays a dialogue box with text, waiting until the player completes it. Takes a string as an argument.
Arguments
Argument order is UI:WaitShowDialouge(text, callbacks)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | ? | The text to display with the textbox. | Yes |
| callbacks | Lua Table | ? | A table of callbacks to be called by the textbox for customization features. | No |
Example
UI:WaitShowDialogue("Hello World!")
WaitShowTimedDialogue
Displays a dialogue box with text, waiting until the specified time has expired.
Arguments
Argument order is UI:WaitShowTimedDialouge(text, waitTime, callbacks)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | ? | The text to display with the textbox. | Yes |
| waitTime | Integer | ? | The time for the textbox to remain on screen. Pass -1 to wait for layer input. | Yes |
| callbacks | Lua Table | ? | A table of callbacks to be called by the textbox for customization features. | No |
Example
UI:WaitShowTimedDialogue("Hello World!", 120)
TextDialogue
Sets the current dialogue text to be shown. Requires WaitDialog to actually display.
Arguments
Argument order is UI:TextDialogue(text, waitTime, callbacks)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | System.String | The text to display with the textbox. | Yes |
| waitTime | Integer | System.Int32 | The time for the textbox to remain on screen. Pass -1 to wait for layer input. | No |
| callbacks | Lua Table | NLua.LuaTable | A table of callbacks to be called by the textbox for customization features. | No |
WaitShowVoiceOver
Displays a voice over, waiting until the player completes it.
Arguments
Argument order is UI:WaitShowVoiceOver(text, expireTime, x, y, width, height, callbacks)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | System.String | The text to display with the textbox. | Yes |
| expireTime | Integer | System.Int32 | The time for the textbox to remain on screen. Pass -1 to wait for layer input. | No |
| x | Integer | System.Int32 | The starting X position of the box. | No |
| y | Integer | System.Int32 | The starting Y position of the box | No |
| width | Integer | System.Int32 | The width of the box. | No |
| height | Integer | System.Int32 | The height of the box. | No |
| callbacks | Lua Table | NLua.LuaTable | A table of callbacks to be called by the textbox for customization features. | No |
Example
UI:WaitShowVoiceOver("Hello World!", 120)
TextVoiceOver
Sets the current voice-over text to be shown. Requires WaitDialog to actually display.
Arguments
Argument order is UI:TextVoiceOver(text, expireTime, x, y, width, height, callbacks)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | System.String | The text to display with the textbox. | Yes |
| expireTime | Integer | System.Int32 | The time for the textbox to remain on screen. Pass -1 to wait for layer input. | No |
| x | Integer | System.Int32 | The starting X position of the box. | No |
| y | Integer | System.Int32 | The starting Y position of the box | No |
| width | Integer | System.Int32 | The width of the box. | No |
| height | Integer | System.Int32 | The height of the box. | No |
| callbacks | Lua Table | NLua.LuaTable | A table of callbacks to be called by the textbox for customization features. | No |
TextPopUp
Makes text pop up in the bottom-left corner by default. Displays concurrently with any other process.
Arguments
Argument order is UI:TextPopUp(text, expireTime, x, y, width, height, callbacks)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | System.String | The text to display with the textbox. | Yes |
| expireTime | Integer | System.Int32 | The time for the textbox to remain on screen. Pass -1 to wait for layer input. | No |
| x | Integer | System.Int32 | The starting X position of the box. | No |
| y | Integer | System.Int32 | The starting Y position of the box | No |
| width | Integer | System.Int32 | The width of the box. | No |
| height | Integer | System.Int32 | The height of the box. | No |
| centerH | Boolean | System.Boolean | True if the text should be centered horizontally. | No |
| centerV | Boolean | System.Boolean | True if the text should be centered vertically. | No |
WaitShowTitle
Fades in a title text, waiting until the fade-in is complete.
Arguments
Argument order is UI:WaitShowTitle(text, time)
| Name | Type | Technical Type | Purpose | Required |
|---|---|---|---|---|
| text | String | System.String | The text to display with the textbox. | Yes |
| time | Integer | System.Int32 | How long the text takes to fade in. | No |
text: The text to display.time: The time for the text to fade in.
Example
UI:WaitShowTitle("Hello World!", 60)
UI:TextShowTitle(System.String,System.Int32)
Shows text in the format of a title drop. Requires WaitDialog to actually display.
Arguments
text: The text to display.time: The time for the text to fade in.
UI:WaitHideTitle
Fades out the currently displayed title, waiting until the fade-out is complete.
Arguments
time: The time for the text to fade in.
Example
UI:WaitHideTitle(60)
UI:TextFadeTitle(System.Int32)
Fades out the text set in a title drop. Requires WaitDialog to actually fade.
Arguments
time: The time for the text to fade in.
WaitDialog
Displays the currently set dialogue box and waits for the player to complete it.
Example
UI:WaitDialog()
UI:_DummyWait
Instantly break. Used as default/invalid value when returning a yieldable value.
