Editing Mod API Reference:UI
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 100: | Line 100: | ||
'''UI.InterceptNextTerritoryClick''': Added in [[Mod_API_Reference:IsVersionOrHigher|5.17.0]]. After calling this function, the next time the player clicks a territory on the map, your mod will be notified of the click. After calling this, you should also instruct the player to click a territory, and it's also a good idea to let them know they can move dialogs out of the way to see the map. | '''UI.InterceptNextTerritoryClick''': Added in [[Mod_API_Reference:IsVersionOrHigher|5.17.0]]. After calling this function, the next time the player clicks a territory on the map, your mod will be notified of the click. After calling this, you should also instruct the player to click a territory, and it's also a good idea to let them know they can move dialogs out of the way to see the map. | ||
− | * '''Callback''' ''function'': Pass a function that will be called on the next click. This function will be passed a [[Mod_API_Reference:TerritoryDetails|TerritoryDetails]] object, which can be used to get the Territory ID or the name of the territory that was clicked. This function can also be called with nil if the intercept request is cancelled, which can happen if another mod calls UI.InterceptNextTerritoryClick before a territory is clicked | + | * '''Callback''' ''function'': Pass a function that will be called on the next click. This function will be passed a [[Mod_API_Reference:TerritoryDetails|TerritoryDetails]] object, which can be used to get the Territory ID or the name of the territory that was clicked. This function can also be called with nil if the intercept request is cancelled, which can happen if another mod calls UI.InterceptNextTerritoryClick before a territory is clicked. |
'''UI.InterceptNextBonusLinkClick''': Added in [[Mod_API_Reference:IsVersionOrHigher|5.17.0]]. After calling this function, the next time the player clicks a bonus link on the map, your mod will be notified of the click. After calling this, you should also instruct the player to click a bonus link, and it's also a good idea to let them know they can move dialogs out of the way to see the map. | '''UI.InterceptNextBonusLinkClick''': Added in [[Mod_API_Reference:IsVersionOrHigher|5.17.0]]. After calling this function, the next time the player clicks a bonus link on the map, your mod will be notified of the click. After calling this, you should also instruct the player to click a bonus link, and it's also a good idea to let them know they can move dialogs out of the way to see the map. | ||
− | * '''Callback''' ''function'': Pass a function that will be called on the next click. This function will be passed a [[Mod_API_Reference:BonusDetails|BonusDetails]] object, which can be used to get the bonus ID or the name of the bonus that was clicked. This function can also be called with nil if the intercept request is cancelled, which can happen if another mod calls UI.InterceptNextBonusLinkClick before a bonus link is clicked | + | * '''Callback''' ''function'': Pass a function that will be called on the next click. This function will be passed a [[Mod_API_Reference:BonusDetails|BonusDetails]] object, which can be used to get the bonus ID or the name of the bonus that was clicked. This function can also be called with nil if the intercept request is cancelled, which can happen if another mod calls UI.InterceptNextBonusLinkClick before a bonus link is clicked. |
[[Category:Mod API Reference]] | [[Category:Mod API Reference]] |