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 43
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 135
-
infotext_manager:set_time_speed(number
time speed)
-
Sets the speed of time. To be called when modifying the speed of time in battle. This is automatically called when
battle_manager:modify_battle_speed
is called on thebattle_manager
interface.Parameters:
1
number
Time speed, accepts the same values as
battle: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 151
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(
infotext key
string,
component state override
string,
should_set_text_to_all_states If a state override exists for given component_id
[boolean]
) -
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)
3
boolean
optional, default value=true
setting should_set_text_to_all_states to false will use the default text of the state
Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 174
-
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 209
-
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 402
-
infotext_manager:clear_infotext()
-
Clears all infotext from the infotext panel.
Returns:
nil
defined in ../working_data/script/_lib/lib_infotext.lua, line 414