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 Battle | |
Loaded in Campaign |
-
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_manager
orcampaign_manager
is created.Returns:
infotext_manager
defined in ../working_data/script/_lib/lib_infotext.lua, line 40
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_infotext = im:get_uicomponent() -- calling a function on the object once created
-
infotext_manager:get_uicomponent()
-
Gets a uicomponent handle to the infotext panel
Returns:
uicomponent
defined in ../working_data/script/_lib/lib_infotext.lua, line 128
-
infotext_manager:set_time_speed(number
time speed)
-
Sets the speed of time. To be called when modifying the speed of time in battle.
Parameters:
1
number
Time speed, accepts the same values as
modify_battle_speed
orbattle_manager:slow_game_over_time
(1 = normal speed, 0.5 = half speed etc)Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 144
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(string
infotext key, string
component 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
string
Infotext key
2
string
Component state override. This much match the name of a state on the infotext line component (editable in UIEd)
Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 167
-
infotext_manager:add_infotext(object
first param, ...
additional infotext strings)
-
Adds one or more lines of infotext to the infotext panel. Supply one or more string infotext keys. Upon calling
add_infotext
, the infotext box expands to the final required size, and then individual infotext lines are faded on sequentially. The first argument may optionally be an initial delay - this is useful when triggering infotext at the same time as advice, as it gives the advisor an amount of time to animate on-screen before infotext begins to display, which looks more refined.Parameters:
1
object
Can be a string key from the advice_info_texts table, or a number specifying an initial delay (ms in battle, s in campaign) after the panel animates onscreen and the first infotext item is shown.
2
...
Additional infotext strings to be shown.
add_infotext
fades each of them on to the infotext panel in a visually-pleasing sequence.Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 192
-
infotext_manager:remove_infotext(string
infotext key)
-
Removes a line of infotext from the infotext panel, by key.
Parameters:
1
string
infotext key
Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 381
-
infotext_manager:clear_infotext()
-
Clears all infotext from the infotext panel.
Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 393