whoward69
DLL Minion
Provides a summary bar in the top panel (to the left of the turn/help/menu items) that permits entries to be added in a modular fashion.
Entries may be "minimised" by right-clicking on them
Uses the techniques found in Utils - Modular DiploCorner, so an understanding of how that works is an advantage to using the components in this mod.
The following LuaEvent is supported
* LuaEvents.SummaryBarAddin.Add(function OnSummaryBarAddin(tab) ... end)
adds a new tab to the Summary Bar
tab is an associative array with the following entries
The click and rclick functions receive two parameters
The callback function receives one parameter
The following use the components of this mod
Entries may be "minimised" by right-clicking on them
Uses the techniques found in Utils - Modular DiploCorner, so an understanding of how that works is an advantage to using the components in this mod.
The following LuaEvent is supported
* LuaEvents.SummaryBarAddin.Add(function OnSummaryBarAddin(tab) ... end)
adds a new tab to the Summary Bar
tab is an associative array with the following entries
- id - the string that uniquely identifies the tab
- text - the string (or TXT_KEY_) or a function returning a string to display in the summary bar
- tip - the string (or TXT_KEY_) or a function returning a string to display when the mouse is over the tab
- short - (optional) the string (or TXT_KEY_) to display when the tab is "minimised"
- small - (optional) true to default to the short text
- click - (optional) function to call when the tab is clicked (there is no default click action)
- rclick - (optional) function to call when the tab is right-clicked (the default right-click action is to switch between minimised and normal mode)
- priority - (optional) integer determining placement, 1 is right-most (priorities 1 thru 10 are reserved)
- callback - (optional) function that is called when the tab is created
The click and rclick functions receive two parameters
- iButtonOffsetX - being the left-hand edge of the control
- button - being the actual control
The callback function receives one parameter
- button - being the actual control
The following use the components of this mod
- UI - Summary City States - basic example showing the number of City States met and/or conquered
- UI - Summary Barbarians - basic example showing the number of known barbarian camps and units
- UI - Summary Specialists - basic example showing progress towards Great People
- UI - Summary Luxuries - intermediate example showing the number of luxuries available, either locally or by trade
- UI - Summary Shipping - intermediate example showing ship tonnage for each maritime civilization, with a popup options menu
- UI - Summary Clock - intermediate example showing a Clock - illustrates how to receive the created control into your own mod