UI (functions): Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
Some cleanup progress
Imbion (talk | contribs)
Replaced content with "{{Hat Note|More functions: Script Reference''}} The UI functions control UI elements, such as textboxes. Each UI function is run by using <code>UI:[function]</code> == Textbox == {{subpage|UI (functions)/Textbox}} {{:UI (functions)/Textbox/Table}} === Textbox Settings === {{subpage|UI (functions)/Textbox Settings}} {{:UI (functions)/Textbox Settings/Table}} == Background == {{subpage|UI (functions)/Background}} {{:UI (functions)/Background/Table}} == Speaker..."
Tag: Replaced
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Hat Note|More functions: [[Script Reference]]''}}
The UI functions control UI elements, such as textboxes. Each UI function is run by using <code>UI:[function]</code>
The UI functions control UI elements, such as textboxes. Each UI function is run by using <code>UI:[function]</code>


== WaitInput ==
== Textbox ==
 
{{subpage|UI (functions)/Textbox}}
Waits for the player to press a button, before continuing the game's script.
{{:UI (functions)/Textbox/Table}}
 
 
== 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 features. || No
|-
|}
 
=== Example ===
 
<pre>
 
UI:WaitShowDialogue("Hello World!")
 
</pre>
 
== WaitShowTimedDialogue ==
 
 
Displays a dialogue box with text, waiting until the specified time has expired.
 
 
=== Arguments ===
Argument order is <code>UI:WaitShowTimedDialouge(text, waitTime, callbacks)</code>
{| class="wikitable"
|-
! 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 ===
 
<pre>
 
UI:WaitShowTimedDialogue("Hello World!", 120)
 
</pre>
 
== TextDialogue ==
 
 
Sets the current dialogue text to be shown. Requires WaitDialog to actually display.
 
=== Arguments ===
Argument order is <code>UI:TextDialogue(text, waitTime, callbacks)</code>
{| class="wikitable"
|-
! 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 <code>UI:WaitShowVoiceOver(text, expireTime, x, y, width, height, callbacks)</code>
{| class="wikitable"
|-
! 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 ===
 
<pre>
 
UI:WaitShowVoiceOver("Hello World!", 120)
 
</pre>
 
== TextVoiceOver ==
 
 
Sets the current voice-over text to be shown.  Requires WaitDialog to actually display.
 
 
=== Arguments ===
Argument order is <code>UI:TextVoiceOver(text, expireTime, x, y, width, height, callbacks)</code>
{| class="wikitable"
|-
! 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 <code>UI:TextPopUp(text, expireTime, x, y, width, height, callbacks)</code>
{| class="wikitable"
|-
! 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 <code>UI:WaitShowTitle(text, time)</code>
{| class="wikitable"
|-
! 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
|}
 
* <code>text</code>: The text to display.
* <code>time</code>: The time for the text to fade in.
 
=== Example ===
<pre>
 
UI:WaitShowTitle("Hello World!", 60)
 
</pre>
 
== UI:TextShowTitle(System.String,System.Int32) ==
Shows text in the format of a title drop.  Requires WaitDialog to actually display.
 
 
=== Arguments ===
 
* <code>text</code>: The text to display.
* <code>time</code>: The time for the text to fade in.
 
== UI:WaitHideTitle ==
 
 
Fades out the currently displayed title, waiting until the fade-out is complete.
 
 
=== Arguments ===
 
* <code>time</code>: The time for the text to fade in.
 
=== Example ===
 
<pre>
 
UI:WaitHideTitle(60)
 
</pre>
 
== UI:TextFadeTitle(System.Int32) ==
 
 
Fades out the text set in a title drop.  Requires WaitDialog to actually fade.
 
 
=== Arguments ===
 
* <code>time</code>: The time for the text to fade in.
 
== UI:WaitShowBG ==
 
 
Fades in a chosen background image, with a chosen framerate, at a certain fade time, waiting until the fade-in is complete.
 
 
=== Arguments ===
 
* <code>bg</code>: The background to show, from the list of BG textures.
* <code>frameTime</code>: Framerate of the image animation.
* <code>fadeInTime</code>: Time taken to fade in the image.
 
=== Example ===
 
<pre>
 
UI:WaitShowBG("TestBG", 3, 60)
 
</pre>
 
== UI:ShowBG(System.String,System.Int32,System.Int32) ==
 
 
Sets an image to display.  Requires WaitDialog to actually display.
 
 
=== Arguments ===
 
* <code>bg</code>: The background to show, from the list of BG textures.
* <code>frameTime</code>: Framerate of the image animation.
* <code>fadeInTime</code>: Time taken to fade in the image.
 
== UI:WaitHideBG ==
 
 
Fades out the current background image, waiting until the fade-out is complete.
 
 
=== Arguments ===
 
* <code>time</code>: Time taken to fade out the image.
 
=== Example ===
 
<pre>
 
UI:WaitHideBG(60)
 
</pre>
 
== UI:FadeBG(System.Int32) ==
 
 
Prepares a fade-out of the current image.  Requires WaitDialog to actually display.
 
 
=== Arguments ===
 
* <code>time</code>: Time taken to fade out the image.
 
== UI:ResetSpeaker(System.Boolean) ==
 
 
Clears the current speaker, so none is displayed the next time TextDialogue is called.
This also resets any custom dialogue box positions, portrait positions, and choice positions.
 
 
=== Arguments ===
 
* <code>keysound</code>: If turned on, the text from the dialogue boxes make sounds.  Default is on.
 
== UI:SetSpeaker(System.String,System.Boolean,System.String,System.Int32,System.String,RogueEssence.Data.Gender) ==
 
 
Sets the speaker to be displayed during the following calls to the TextDialogue functions.  It resets speaker emotion.
 
 
=== Arguments ===
 
* <code>name</code>: Speaker name.
* <code>keysound</code>: Plays sounds when text appears.
* <code>specie</code>: Species of the speaker
* <code>form</code>: Form of the speaker
* <code>skin</code>: Skin of the speaker
* <code>gender</code>: Gender of the speaker
 
== UI:SetSpeaker(RogueEssence.Ground.GroundChar,System.Boolean) ==
 
 
Sets the speaker to be displayed during the following calls to the TextDialogue functions.  It resets speaker emotion.
 
 
=== Arguments ===
 
* <code>chara</code>: Character to set as speaker. This is a character in a ground map.
* <code>keysound</code>: Plays sounds when text appears.
 
== UI:SetSpeaker(RogueEssence.Dungeon.Character,System.Boolean) ==
 
 
Sets the speaker to be displayed during the following calls to the TextDialogue functions.  It resets speaker emotion.
 
 
=== Arguments ===
 
* <code>chara</code>: Character to set as speaker. This is a character in a dungeon map.
* <code>keysound</code>: Plays sounds when text appears.
 
== UI:SetSpeakerReverse(System.Boolean) ==
 
 
Reverses the speaker orientation to face left instead of right.  This depends on the boolean passed in.
 
 
=== Arguments ===
 
* <code>reverse</code>: Faces right if false, left if true.
 
== UI:SetChoiceLoc(System.Int32,System.Int32) ==
 
 
Sets the position of the choices for a question dialog.
 
 
=== Arguments ===
 
* <code>x</code>: The X position
* <code>y</code>: The Y position
 
== UI:ResetChoiceLoc ==
 
 
Sets the position of the choices for a question dialog back to default.
 
 
== UI:SetBounds(System.Int32,System.Int32,System.Int32,System.Int32) ==
 
 
Sets the position and size of the dialogue box.
 
 
=== Arguments ===
 
* <code>x</code>: The X position of the box
* <code>y</code>: The Y position of the box
* <code>width</code>: Width of the box
* <code>height</code>: Height of the box
 
== UI:SetSe(System.String,System.Int32) ==
 
 
Sets the speaker sound effect and speak frames played in the TextDialogue functions.
 
 
=== Arguments ===
 
* <code>newSe</code>: The sound effect of the box
* <code>speakTime</code>: The amount of frames to wait between each sound effect
 
=== Example ===
 
<pre>
 
UI:SetSe("Battle/_UNK_DUN_Water_Drop", 3)
 
</pre>
 
== UI:SetSe(System.String) ==
 
 
Sets the speaker sound effect played in the TextDialogue functions.
 
 
=== Arguments ===
 
* <code>newSe</code>: The sound effect of the box
 
=== Example ===
 
<pre>
 
UI:SetSe("Menu/Unknown-3")
 
</pre>
 
== UI:SetSpeakTime(System.Int32) ==
 
 
Sets the speak frames played in the TextDialogue functions.
 
 
=== Arguments ===
 
* <code>speakTime</code>: The amount of frames to wait between each sound effect
 
=== Example ===
 
<pre>
 
UI:SetSpeakTime(10)
 
</pre>
 
== UI:ResetSe ==
 
 
Resets to the default speaker sound effect and speaker frames.
 
 
== UI:ResetBounds ==
 
 
Resets the position and size of the dialogue box.
 
 
== UI:SetSpeakerLoc(System.Int32,System.Int32) ==
 
 
Sets the position of the speaker in a dialogue box.
 
 
=== Arguments ===
 
* <code>x</code>: The X position
* <code>y</code>: The Y position
 
== UI:ResetSpeakerLoc ==
 
 
Resets the position of the speaker in a dialogue box.
 
 
== UI:SetSpeakerEmotion(System.String,System.Boolean) ==
 
 
Sets the emotion of the speaker in the dialogue box.
 
 
=== Arguments ===
 
* <code>emo</code>: Emotion to display
* <code>reverse</code>: Faces right if false, left if true.
 
== UI:SetCenter(System.Boolean,System.Boolean) ==
 
 
Sets the centering of the text in the textbox.
 
 
=== Arguments ===
 
* <code>centerH</code>: Horizontal centering
* <code>centerV</code>: Vertical centering
 
== UI:SetAutoFinish(System.Boolean) ==
 
 
Makes the text automatically finish when it shows up.
 
 
=== Arguments ===
 
* <code>autoFinish</code>: Auto-finishes text if true.
 
== 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.
 
 
== UI:ChoiceMenuYesNo(System.String,System.Boolean,NLua.LuaTable) ==
 
 
Ask a question answered by yes or no via character dialogue to the player.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.
 
The Yes/No menu returns 1 for yes, and 0 for no.
 
 
=== Arguments ===
 
* <code>message</code>: Question to be asked to the user.
* <code>bdefaultstono</code>: Whether the cursor starts on no by default
* <code>callbacks</code>: The Lua table of callbacks for the textbox to call.
 
== UI:NameMenu(System.String,System.String,System.Int32,System.String) ==
 
 
Displays the name input box.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the string value indicating the result of the menu, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>title</code>: The text to show above the input line.
* <code>desc</code>: The text to show below the input line.
* <code>maxLength</code>: The length of the text in pixels.
* <code>defaultName</code>: Name to start the textbox with.
 
== AssemblyMenu ==
 
 
Displays a menu for replacing party members with the assembly.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the boolean value indicating whether the team composition was changed or not, UI:ChoiceResult() must be called.
 
 
== ShopMenu(NLua.LuaTable) ==
 
 
Displays the Shop menu.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the table indicating the indices of items chosen, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>goods</code>: A table of items to be sold.  The format is { Item=InvItem, Price=int } for each item.
 
== SellMenu ==
 
 
Displays the Sell menu.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the table indicating the indices of items to sell, UI:ChoiceResult() must be called.
 
 
== StorageMenu ==
 
 
Displays the Storage menu for which to exchange items in the inventory with.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
 
 
== WithdrawMenu ==
 
 
Displays the Storage menu for which to withdraw from.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
 
 
== BankMenu ==
 
 
Displays the Bank menu.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
 
 
== SpoilsMenu(NLua.LuaTable) ==
 
 
Displays the Spoils menu.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
 
 
=== Arguments ===
 
* <code>appraisalMap</code>: A table of mappings from containers to items, in the format of { Box=InvItem , Item=InvItem }
 
== AppraiseMenu ==
 
 
Displays the Appraisal menu.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the table indicating the indices of items chosen, UI:ChoiceResult() must be called.
 
 
== TutorTeamMenu(NLua.LuaFunction) ==
 
 
Displays the Tutor Team menu.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen team member, UI:ChoiceResult() must be called.
 
 
== RelearnMenu(RogueEssence.Dungeon.Character) ==
 
 
Displays the Relearn menu for a character.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>chara</code>: The character to relearn skills
 
== LearnMenu(RogueEssence.Dungeon.Character,System.String) ==
 
 
Displays the Learn menu for a character to replace an existing skill with a new one.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>chara</code>: The character to relearn skills
* <code>skillNum</code>: The new skill
 
== ForgetMenu(RogueEssence.Dungeon.Character) ==
 
 
Displays the Forget menu for a character to forget a skill.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>chara</code>: The character to relearn skills
 
== UI:ShowPromoteMenu ==
 
 
Displays the Promote menu to choose a team member to promote.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen team slot, UI:ChoiceResult() must be called.
 
 
== CanSwapMenu(NLua.LuaTable) ==
 
 
TODO
 
 
== SwapMenu(NLua.LuaTable,NLua.LuaTable) ==
 
 
TODO
 
 
== TributeMenu(System.Int32) ==
 
 
TODO
 
 
== ShowMusicMenu(NLua.LuaTable) ==
 
 
Displays the Music menu to browse music for the game.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the string representing the chosen song, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>spoilerUnlocks</code>: A lua table of strings representing progression flags that have been completed.
            Any ogg file that uses this tag as a spoiler tag will display in the menu only if the flag has been passed.
 
== UI:DungeonChoice(System.String,RogueEssence.Dungeon.ZoneLoc) ==
 
 
Ask to enter a destintion via character dialogue to the player.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.
 
The Yes/No menu returns 1 for yes, and 0 for no.
 
 
=== Arguments ===
 
* <code>name</code>: Name of the destination
* <code>dest</code>: The ZoneLoc location of the destination.
 
== UI:DestinationMenu(NLua.LuaTable,System.Object) ==
 
 
Marks the start of a choice menu for choosing destinations, showing a preview of restrictions and requirements for dungeons.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the ZoneLoc indicating the chosen destination, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>destinations</code>: A lua table representing the list of destinations with each element in the format of { Name=string, Dest=ZoneLoc }
 
== UI:ServersMenu ==
 
 
TODO
 
 
== UI:ContactsMenu ==
 
 
TODO
 
 
== UI:SOSMenu ==
 
 
TODO
 
 
== UI:AOKMenu ==
 
 
TODO
 
 
== UI:PeersMenu ==
 
 
TODO
 
 
== UI:ShowConnectMenu ==
 
 
TODO
 
 
== UI:CurrentActivityMenu ==
 
 
TODO
 
 
== UI:ChooseMonsterMenu(System.String,NLua.LuaTable,System.Boolean,System.Boolean,System.Int32) ==
 
 
Marks the start of a choice menu for choosing monsters, showing a preview of their appearances via portrait.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the string indicating the chosen species, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>title</code>: The title of the menu
* <code>choices</code>: A lua table of choices with each element being a MonsterID.
* <code>canMenu</code>: If set to true, the Menu Button exits the menu if pressed.
* <code>canCancel</code>: If set to true, the Cancel Button exits the menu if pressed.
* <code>slotsPerPage</code>: Slots to display per page
 
== UI:SetCustomMenu(RogueEssence.Menu.InteractableMenu) ==
 
 
Displays a custom menu of the caller's choice.
 
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
 
 
== UI:BeginChoiceMenu(System.String,NLua.LuaTable,System.Object,System.Object,NLua.LuaTable) ==
 
 
Marks the start of a multi-choice menu.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>message</code>: The question to ask the user.
* <code>choicesPairs</code>: A table of choices.  Each choice can be either a string, or { string, bool } representing the text and enabled status.
* <code>defaultChoice</code>: The cursor starts on this choice.
* <code>cancelChoice</code>: This choice is chosen if the player presses the cancel button.
* <code>callbacks</code>: The Lua table of callbacks for the textbox to call.
 
== UI:BeginMultiPageMenu(System.Int32,System.Int32,System.Int32,System.String,NLua.LuaTable,System.Int32,System.Object,System.Object) ==
 
 
Marks the start of a multi-paged choice menu.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.
 
 
=== Arguments ===
 
* <code>x</code>: X position of the menu
* <code>y</code>: Y position of the menu
* <code>width</code>: Width of the menu
* <code>title</code>: Height of the menu
* <code>choicesPairs</code>: A table of choices.  Each choice can be either a string, or { string, bool } representing the text and enabled status.
* <code>linesPerPage</code>: Number of choices per page
* <code>defaultChoice</code>: The cursor starts on this choice.
* <code>cancelChoice</code>: This choice is chosen if the player presses the cancel button.
 
== UI:ChoiceResult ==
 
 
Get the result of the last choice menu
 
 
=== Returns ===
 
The result of the choice
 
== UI:GetChoiceAction(System.Object) ==
 
 
It's complicated.
 
 
=== Arguments ===
 
* <code>obj</code>: None
 
== UI:WaitForChoice ==
 
 
Displays the currently set choice menu and waits for the player's selection to complete.


=== Textbox Settings ===
{{subpage|UI (functions)/Textbox Settings}}
{{:UI (functions)/Textbox Settings/Table}}


=== Example ===
== Background ==
{{subpage|UI (functions)/Background}}
{{:UI (functions)/Background/Table}}


<pre>
== Speakers ==
{{subpage|UI (functions)/Speakers}}
{{:UI (functions)/Speakers/Table}}


UI:WaitForChoice()
=== Speaker Settings ===
{{subpage|UI (functions)/Speaker Settings}}
{{:UI (functions)/Speaker Settings/Table}}


</pre>
== Choice Menu ==
{{subpage|UI (functions)/Choice Menu}}
{{:UI (functions)/Choice Menu/Table}}


== UI:__WaitForChoice ==
== Functional Menus ==
{{subpage|UI (functions)/Functional Menus}}
{{:UI (functions)/Functional Menus/Table}}


== Rescue Menus ==
{{subpage|UI (functions)/Rescue Menus}}
{{:UI (functions)/Rescue Menus/Table}}


Wait for choice and then CLEAN UP m_curchoice
== Custom Menus ==
{{subpage|UI (functions)/Custom Menus}}
{{:UI (functions)/Custom Menus/Table}}


[[Category:Function]]
[[Category:Scripting]]

Latest revision as of 03:52, 18 January 2026

More functions: Script Reference

The UI functions control UI elements, such as textboxes. Each UI function is run by using UI:[function]

Textbox

Function Description
WaitShowDialogue Displays a dialogue box with text, waiting until the player completes it.
WaitShowTimedDialogue Displays a dialogue box with text, waiting until the specified time has expired.
TextDialogue Sets the current dialogue text to be shown. Requires WaitDialog to actually display.
WaitShowVoiceOver Displays a voice over, waiting until the player completes it.
TextVoiceOver Sets the current voice-over text to be shown. Requires WaitDialog to actually display.
TextPopUp Makes text pop up in the bottom-left corner by default.
WaitShowTitle Fades in a title text, waiting until the fade-in is complete.
TextShowTitle Shows text in the format of a title drop. Requires WaitDialog to actually display.
WaitHideTitle Fades out the currently displayed title, waiting until the fade-out is complete.
TextFadeTitle Fades out the text set in a title drop. Requires WaitDialog to actually fade.
WaitDialog Displays the currently set dialogue box and waits for the player to complete it.
_DummyWait Instantly break. Used as default/invalid value when returning a yieldable value.

Textbox Settings

Function Description
SetBounds Sets the position and size of the dialogue box.
ResetBounds Resets the position and size of the dialogue box.
SetCenter Sets the centering of the text in the textbox.
SetAutoFinish Makes the text automatically finish when it shows up.

Background

Function Description
WaitShowBG Fades in a chosen background image, with a chosen framerate, at a certain fade time, waiting until the fade-in is complete.
ShowBG Sets an image to display. Requires WaitDialog to actually display.
WaitHideBG Fades out the current background image, waiting until the fade-out is complete.
FadeBG Prepares a fade-out of the current image. Requires WaitDialog to actually display.

Speakers

Function Description
ResetSpeaker Clears the current speaker, so none is displayed the next time TextDialogue is called.
SetSpeaker Sets the speaker to be displayed during the following calls to the TextDialogue functions. It resets speaker emotion.
SetSpeakerReverse Reverses the speaker orientation to face left instead of right. This depends on the boolean passed in.

Speaker Settings

Function Description
SetSe Sets the speaker sound effect and speak frames played in the TextDialogue functions.
SetSpeakTime Sets the speak frames played in the TextDialogue functions.
ResetSe Resets to the default speaker sound effect and speaker frames.
SetSpeakerLoc Sets the position of the speaker in a dialogue box.
ResetSpeakerLoc Resets the position of the speaker in a dialogue box.
SetSpeakerEmotion Sets the emotion of the speaker in the dialogue box.

Choice Menu

Function Description
SetChoiceLoc Sets the position of the choices for a question dialog.
ResetChoiceLoc Sets the position of the choices for a question dialog back to default.
ChoiceMenuYesNo Ask a question answered by yes or no via character dialogue to the player.
BeginChoiceMenu Marks the start of a multi-choice menu.
BeginMultiPageMenu Marks the start of a multi-paged choice menu.
ChoiceResult Get the result of the last choice menu
GetChoiceAction (undocumented)
WaitForChoice Displays the currently set choice menu and waits for the player's selection to complete.
__WaitForChoice Wait for choice and then CLEAN UP m_curchoice

Functional Menus

Function Description
NameMenu Displays the name input box.
AssemblyMenu Displays a menu for replacing party members with the assembly.
ShopMenu Displays the Shop menu.
SellMenu Displays the Sell menu.
StorageMenu Displays the Storage menu for which to exchange items in the inventory with.
WithdrawMenu Displays the Storage menu for which to withdraw from.
BankMenu Displays the Bank menu.
SpoilsMenu Displays the Spoils menu.
AppraiseMenu Displays the Appraisal menu.
TutorTeamMenu Displays the Tutor Team menu.
RelearnMenu Displays the Relearn menu for a character.
LearnMenu Displays the Learn menu for a character to replace an existing skill with a new one.
ForgetMenu Displays the Forget menu for a character to forget a skill.
ShowPromoteMenu Displays the Promote menu to choose a team member to promote.
CanSwapMenu (Undocumented)
SwapMenu (Undocumented)
TributeMenu (Undocumented)
ShowMusicMenu Displays the Music menu to browse music for the game.
DungeonChoice Ask to enter a destintion via character dialogue to the player.
DestinationMenu Marks the start of a choice menu for choosing destinations, showing a preview of restrictions and requirements for dungeons.
ChooseMonsterMenu Marks the start of a choice menu for choosing monsters, showing a preview of their appearances via portrait.

Rescue Menus

Function Description
ServersMenu undocumented
ContactsMenu undocumented
SOSMenu undocumented
AOKMenu undocumented
PeersMenu undocumented
ShowConnectMenu undocumented

Custom Menus

Function Description
SetCustomMenu Displays a custom menu of the caller's choice.
BeginMultiPageMenu Marks the start of a multi-paged choice menu.