UI (functions)/Functional Menus: Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
No edit summary
Imbion (talk | contribs)
No edit summary
 
Line 1: Line 1:
== UI:NameMenu(System.String,System.String,System.Int32,System.String) ==
== NameMenu ==
 


Displays the name input box.
Displays the name input box.
Line 6: Line 5:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the string value indicating the result of the menu, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=NameMenu|args=title, desc, maxLen, dfName}}


=== Arguments ===
=== Arguments ===
 
{|class="wikitable"
* <code>title</code>: The text to show above the input line.
{{ArgHeader}}
* <code>desc</code>: The text to show below the input line.
{{ArgRow
* <code>maxLength</code>: The length of the text in pixels.
|name=title
* <code>defaultName</code>: Name to start the textbox with.
|type=String
 
|techt=System.String
|purp=The text to show above the input line.
}}
{{ArgRow
|name=desc
|type=String
|techt=System.String
|purp=The text to show below the input line.
}}
{{ArgRow
|name=maxLen
|type=Integer
|techt=System.Int32
|purp=The length of the text in pixels.
}}
{{ArgRow
|name=dfName
|type=String
|techt=System.String
|purp=Name to start the textbox with.
}}
|}
== AssemblyMenu ==
== AssemblyMenu ==


Displays a menu for replacing party members with the assembly.
Displays a menu for replacing party members with the assembly.
Line 23: Line 44:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the boolean value indicating whether the team composition was changed or not, UI:ChoiceResult() must be called.


 
== ShopMenu ==
== ShopMenu(NLua.LuaTable) ==
 


Displays the Shop menu.
Displays the Shop menu.
Line 33: Line 53:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the table indicating the indices of items chosen, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=ShopMenu|args=goods}}


=== Arguments ===
=== Arguments ===
 
{|class="wikitable"
* <code>goods</code>: A table of items to be sold.  The format is { Item=InvItem, Price=int } for each item.
{{ArgHeader}}
 
{{ArgRow
|name=goods
|type=LuaTable
|techt=(NLua.LuaTable)
|purp=A table of items to be sold.  The format is { Item=InvItem, Price=int } for each item.
}}
|}
== SellMenu ==
== SellMenu ==


Displays the Sell menu.
Displays the Sell menu.
Line 47: Line 74:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the table indicating the indices of items to sell, UI:ChoiceResult() must be called.


== StorageMenu ==
== StorageMenu ==


Displays the Storage menu for which to exchange items in the inventory with.
Displays the Storage menu for which to exchange items in the inventory with.
Line 57: Line 83:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
and for execution to suspend until the menu is exited.


== WithdrawMenu ==
== WithdrawMenu ==


Displays the Storage menu for which to withdraw from.
Displays the Storage menu for which to withdraw from.


UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the menu is exited.
and for execution to suspend until the menu is exited
 


== BankMenu ==
== BankMenu ==


Displays the Bank menu.
Displays the Bank menu.
Line 76: Line 98:
and for execution to suspend until the menu is exited.
and for execution to suspend until the menu is exited.


 
== SpoilsMenu ==
== SpoilsMenu(NLua.LuaTable) ==
 


Displays the Spoils menu.
Displays the Spoils menu.
Line 85: Line 105:
and for execution to suspend until the menu is exited.
and for execution to suspend until the menu is exited.


{{FuncUsage|nmspace=UI|nm=SpoilsMenu|args=appraisalMap}}


=== Arguments ===
=== Arguments ===
 
{|class="wikitable"
* <code>appraisalMap</code>: A table of mappings from containers to items, in the format of { Box=InvItem , Item=InvItem }
{{ArgHeader}}
{{ArgRow
|name=appraisalMap
|type=LuaTable
|techt=NLua.LuaTable
|purp=A table of mappings from containers to items, in the format of { Box=InvItem , Item=InvItem
}}
|}


== AppraiseMenu ==
== AppraiseMenu ==


Displays the Appraisal menu.
Displays the Appraisal menu.
Line 97: Line 124:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the table indicating the indices of items chosen, UI:ChoiceResult() must be called.




== TutorTeamMenu(NLua.LuaFunction) ==
== TutorTeamMenu ==
 


Displays the Tutor Team menu.
Displays the Tutor Team menu.
Line 107: Line 134:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the integer representing the chosen team member, UI:ChoiceResult() must be called.


== RelearnMenu(RogueEssence.Dungeon.Character) ==
== RelearnMenu ==
 


Displays the Relearn menu for a character.
Displays the Relearn menu for a character.
Line 116: Line 143:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=RelearnMenu|args=chara}}


=== Arguments ===
=== Arguments ===
{|class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=chara
|type=Dungeon Character
|techt=RogueEssense.Dungeon.Character
|purp=The character to relearn skills
}}
|}


* <code>chara</code>: The character to relearn skills
== LearnMenu ==
 
== LearnMenu(RogueEssence.Dungeon.Character,System.String) ==
 


Displays the Learn menu for a character to replace an existing skill with a new one.
Displays the Learn menu for a character to replace an existing skill with a new one.
Line 130: Line 165:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=LearnMenu|args=chara, skill}}


=== Arguments ===
=== Arguments ===
{|class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=chara
|type=Dungeon Character
|techt=RogueEssense.Dungeon.Character
|purp=The character to relearn skills
}}
{{ArgRow
|name=skill
|type=String
|techt=System.String
|purp=The new skill
}}
|}


* <code>chara</code>: The character to relearn skills
== ForgetMenu ==
* <code>skillNum</code>: The new skill
 
== ForgetMenu(RogueEssence.Dungeon.Character) ==
 


Displays the Forget menu for a character to forget a skill.
Displays the Forget menu for a character to forget a skill.
Line 145: Line 193:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
and for execution to suspend until the choice is returned.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.
Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=ForgetMenu|args=chara}}


=== Arguments ===
=== Arguments ===
{|class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=chara
|type=Dungeon Character
|techt=RogueEssense.Dungeon.Character
|purp=The character to forget
}}
|}


* <code>chara</code>: The character to relearn skills
== ShowPromoteMenu ==
 
== UI:ShowPromoteMenu ==
 


Displays the Promote menu to choose a team member to promote.
Displays the Promote menu to choose a team member to promote.
Line 159: Line 215:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
Then to recover the integer representing the chosen team slot, UI:ChoiceResult() must be called.


 
== CanSwapMenu ==
== CanSwapMenu(NLua.LuaTable) ==
 
 
TODO
TODO


 
== SwapMenu ==
== SwapMenu(NLua.LuaTable,NLua.LuaTable) ==
 


TODO
TODO


 
== TributeMenu ==
== TributeMenu(System.Int32) ==
 


TODO
TODO


 
== ShowMusicMenu ==
== ShowMusicMenu(NLua.LuaTable) ==
 


Displays the Music menu to browse music for the game.
Displays the Music menu to browse music for the game.
Line 187: Line 235:
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
and for execution to suspend until the choice is returned.
Then to recover the string representing the chosen song, UI:ChoiceResult() must be called.
Then to recover the string representing the chosen song, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=ShowMusicMenu|args=spoilerUnlocks}}


=== Arguments ===
=== Arguments ===
{|class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=spoilerUnlocks
|type=LuaTable
|techt=NLua.LuaTable
|purp=A lua table of strings representing progression flags that have been completed.<br>Any ogg file that uses this tag as a spoiler tag will display in the menu only if the flag has been passed.
}}
|}


* <code>spoilerUnlocks</code>: A lua table of strings representing progression flags that have been completed.
== DungeonChoice ==
            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.


Ask to enter a destintion via character dialogue to the player.
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
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.
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.
The Yes/No menu returns 1 for yes, and 0 for no.


 
{{FuncUsage|nmspace=UI|nm=DungeonChoice|args=name,dest}}
=== Arguments ===
=== Arguments ===
{|class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=name
|type=String
|techt=System.String
|purp=Name of the destination
}}
{{ArgRow
|name=dest
|type=ZoneLoc
|techt=RogueEssence.Dungeon.ZoneLoc
|purp=The zone location ID of the destination.
}}
|}


* <code>name</code>: Name of the destination
== DestinationMenu ==
* <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.


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,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
and for execution to suspend until the choice is returned.
Then to recover the ZoneLoc indicating the chosen destination, UI:ChoiceResult() must be called.
Then to recover the ZoneLoc indicating the chosen destination, UI:ChoiceResult() must be called.


{{FuncUsage|nmspace=UI|nm=DestinationMenu|args=destinations}}


=== Arguments ===
=== Arguments ===
{|class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=destinations
|type=LuaTable
|techt=NLua.LuaTable
|purp=A lua table representing the list of destinations with each element in the format of { Name=string, Dest=ZoneLoc }
}}
|}


* <code>destinations</code>: A lua table representing the list of destinations with each element in the format of { Name=string, Dest=ZoneLoc }
== ChooseMonsterMenu ==
 
= 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.


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,
UI:WaitForChoice() must be called afterwards for the menu to be actually displayed,
and for execution to suspend until the choice is returned.
and for execution to suspend until the choice is returned.
Then to recover the string indicating the chosen species, UI:ChoiceResult() must be called.
Then to recover the string indicating the chosen species, UI:ChoiceResult() must be called.


 
{{FuncUsage|nmspace=UI|nm=ChooseMonsterMenu|args=title, choices, exitWithMenu, exitWithCancel, slotsPerPage}}
=== Arguments ===
=== Arguments ===
 
{|class="wikitable"
* <code>title</code>: The title of the menu
{{ArgHeader}}
* <code>choices</code>: A lua table of choices with each element being a MonsterID.
{{ArgRow
* <code>canMenu</code>: If set to true, the Menu Button exits the menu if pressed.
|name=title
* <code>canCancel</code>: If set to true, the Cancel Button exits the menu if pressed.
|type=String
* <code>slotsPerPage</code>: Slots to display per page
|techt=System.String
|purp=The title of the menu
}}
{{ArgRow
|name=choices
|type=LuaTable
|techt=NLua.LuaTable
|purp=A lua table of choices with each element being a MonsterID.
}}
{{ArgRow
|name=exitWithMenu
|type=Boolean
|techt=System.Boolean
|purp=If set to true, the Menu Button exits the menu if pressed.
}}
{{ArgRow
|name=exitWithCancel
|type=Boolean
|techt=System.Boolean
|purp=If set to true, the Cancel Button exits the menu if pressed.
}}
{{ArgRow
|name=slotsPerPage
|type=Integer
|techt=System.Int32
|purp=Slots to display per page
}}
|}

Latest revision as of 16:59, 18 January 2026

NameMenu

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.

Argument order is UI:NameMenu(title, desc, maxLen, dfName).

Arguments

Name Type Technical Type Purpose
title String System.String The text to show above the input line.
desc String System.String The text to show below the input line.
maxLen Integer System.Int32 The length of the text in pixels.
dfName String System.String 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

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.

Argument order is UI:ShopMenu(goods).

Arguments

Name Type Technical Type Purpose
goods LuaTable (NLua.LuaTable) 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

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.

Argument order is UI:SpoilsMenu(appraisalMap).

Arguments

Name Type Technical Type Purpose
appraisalMap LuaTable NLua.LuaTable 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

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

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.

Argument order is UI:RelearnMenu(chara).

Arguments

Name Type Technical Type Purpose
chara Dungeon Character RogueEssense.Dungeon.Character The character to relearn skills

LearnMenu

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.

Argument order is UI:LearnMenu(chara, skill).

Arguments

Name Type Technical Type Purpose
chara Dungeon Character RogueEssense.Dungeon.Character The character to relearn skills
skill String System.String The new skill

ForgetMenu

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.

Argument order is UI:ForgetMenu(chara).

Arguments

Name Type Technical Type Purpose
chara Dungeon Character RogueEssense.Dungeon.Character The character to forget

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

TODO

SwapMenu

TODO

TributeMenu

TODO

ShowMusicMenu

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.

Argument order is UI:ShowMusicMenu(spoilerUnlocks).

Arguments

Name Type Technical Type Purpose
spoilerUnlocks LuaTable NLua.LuaTable 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.

DungeonChoice

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.

Argument order is UI:DungeonChoice(name,dest).

Arguments

Name Type Technical Type Purpose
name String System.String Name of the destination
dest ZoneLoc RogueEssence.Dungeon.ZoneLoc The zone location ID of the destination.

DestinationMenu

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.

Argument order is UI:DestinationMenu(destinations).

Arguments

Name Type Technical Type Purpose
destinations LuaTable NLua.LuaTable A lua table representing the list of destinations with each element in the format of { Name=string, Dest=ZoneLoc }

ChooseMonsterMenu

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.

Argument order is UI:ChooseMonsterMenu(title, choices, exitWithMenu, exitWithCancel, slotsPerPage).

Arguments

Name Type Technical Type Purpose
title String System.String The title of the menu
choices LuaTable NLua.LuaTable A lua table of choices with each element being a MonsterID.
exitWithMenu Boolean System.Boolean If set to true, the Menu Button exits the menu if pressed.
exitWithCancel Boolean System.Boolean If set to true, the Cancel Button exits the menu if pressed.
slotsPerPage Integer System.Int32 Slots to display per page