Infotext Manager
The infotext manager provides an interface for setting and managing infotext. This is the text panel that appears below the advisor and hosts text breaking down the advisor string into game terms.
| Loaded in Campaign |
|
| Loaded in Battle |
|
| Loaded in Frontend |
|
-
infotext_manager:new() -
Creates an infotext manager. It should never be necessary for client scripts to call this directly, for an infotext manager is automatically set up whenever a
battle_managerorcampaign_manageris created.Returns:
infotext_manager
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 52
Once a infotext_manager object has been created with infotext_manager:new, functions on it may be called in the form showed below.
Example - Specification:
<infotext_manager_object>:<function_name>(<args>)
Example - Creation and Usage:
local im = infotext_manager:new() -- set up automatically by campaign or battle managers
local uic_advice_interface = im:get_uicomponent() -- calling a function on the object once created
-
infotext_manager:get_uicomponent() -
Gets a uicomponent handle to the advisor interface panel.
Returns:
uicomponentuicomponent
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 186
-
infotext_manager:get_infotext_panel() -
Gets a uicomponent handle to the infotext panel.
Returns:
uicomponentuicomponent
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 194
-
infotext_manager:attach_to_advisor([should attachboolean]) -
Attaches or detaches the infotext panel from the advisor panel. When detached, infotext may be triggered independently of advice, and the infotext panel will not close when the advisor panel is closed.
Parameters:
1
optional, default value=true
should attach
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 211
-
infotext_manager:is_attached_to_advisor() -
Returns whether the infotext panel is attached to the advisor.
Returns:
infotext is attachedboolean
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 221
-
infotext_manager:cache_and_set_detached_infotext_priority() -
After the infotext panel is undocked, sets the priority to the supplied value, and caches the value previously set. The infotext priority can later be restored with
restore_detatched_infotext_priority.
The register_topmost flag can also be set to force the infotext to topmost.Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 229
-
infotext_manager:restore_detatched_infotext_priority() -
Restores the advisor priority to a value previously cached with
cache_and_set_detached_infotext_priority.Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 252
State overrides allow calling scripts to map a given line of infotext to being shown in a different component state. This is to allow certain lines of infotext to be shown in a different configuration, or with images, such as an image of WASD keys along with text instructing the player how to move the camera.
-
infotext_manager:set_state_override(stringinfotext key, stringcomponent state override) -
Maps a state override to a infotext key. When an infotext entry with this key is shown, the state of the infotext line component is overriden to that supplied here. This is generally called somewhere at the start of the calling script, with the actual infotext line being shown later.
Parameters:
1
stringInfotext key
2
stringComponent state override. This much match the name of a state on the infotext line component (editable in UIEd)
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 285
-
infotext_manager:set_button_state_override(infotext key
string,on-click callback
function,on-display callback
[function],event name to disable button on
[string]
) -
Marks a advice infotext key with an override that causes a button to be shown if or when it's later displayed. After a particular infotext key is marked with this function, should that infotext be later displayed with
infotext_manager:add_infotextthen that infotext line will display a button instead of normal text. When the player clicks that button the supplied on-click callback is called.
Should an on-display callback be supplied to this function, that callback is called each time the infotext entry is added i.e. when the button is shown. It is passed the button uicomponent as a single argument. This callback can do processing to determine if it wants to change the state of the button e.g. make it inactive.
Should an event be supplied to this function, the button will disable when the event is received.Parameters:
1
infotext key
2
on-click callback
3
optional, default value=nil
on-display callback
4
optional, default value=nil
event name to disable button on
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 305
-
infotext_manager:add_infotext(...infotextstring) -
Adds one or more lines of infotext to the infotext panel. The infotext box will expand to the final required size and then individual infotext lines are faded on sequentially with an interval between each.
Parameters:
1
...A vararg of one or more infotext strings to be shown. Each should be a key from the
advice_info_textsdatabase table. Alternatively, afunctionmay be supplied, which will be called as the infotext is finished displaying.Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 356
-
infotext_manager:add_infotext_with_leader(...infotextstring) -
Adds one or more lines of infotext to the infotext panel, with a
topic_leader. The first string argument will be used as the topic leader text.
The infotext box will expand to the final required size and then individual infotext lines are faded on sequentially with an interval between each.Parameters:
1
...A vararg of one or more infotext strings to be shown. Each should be a key from the
advice_info_textsdatabase table. Alternatively, afunctionmay be supplied, which will be called as the infotext is finished displaying.Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 364
-
infotext_manager:add_infotext_simultaneously(...infotextstring) -
Adds one or more lines of infotext to the infotext panel. All text will appear on the infotext panel simultaneously, rather than animating on one entry at a time. The infotext box will expand to the final required size and then all infotext lines are faded on at the same time.
Parameters:
1
...A vararg of one or more infotext strings to be shown. Each should be a key from the
advice_info_textsdatabase table. Alternatively, afunctionmay be supplied, which will be called as the infotext is finished displaying.Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 373
-
infotext_manager:add_infotext_simultaneously_with_leader(...infotextstring) -
Adds one or more lines of infotext to the infotext panel, with a
topic_leader. All text will appear on the infotext panel simultaneously, rather than animating on one entry at a time. The first string argument will be used as the topic leader text.
The infotext box will expand to the final required size and then individual infotext lines are faded on sequentially with an interval between each.Parameters:
1
...A vararg of one or more infotext strings to be shown. Each should be a key from the
advice_info_textsdatabase table. Alternatively, afunctionmay be supplied, which will be called as the infotext is finished displaying.Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 381
-
infotext_manager:remove_infotext(stringinfotext key) -
Removes a line of infotext from the infotext panel, by key.
Parameters:
1
stringinfotext key
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 679
-
infotext_manager:clear_infotext() -
Clears all infotext from the infotext panel.
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 689
-
infotext_manager:set_auto_clear_timer(seconds
number,should_dismiss_advice_on_infotext_auto_hide_time_elapsed
[boolean]
) -
Clears all infotexts after the specified time. Mouse over the infotext panel will freeze the timer. A value <= 0 will cancel any current timer
Parameters:
1
seconds
2
optional, default value=false
should_dismiss_advice_on_infotext_auto_hide_time_elapsed
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 700
-
infotext_manager:hide_infotext() -
Hides all infotext from the infotext panel with an animation.
Returns:
nil
defined in ../../Warhammer/working_data/script/_lib/lib_infotext.lua, line 713