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 battle
Loaded in Campaign loaded in campaign
Back to top

Creation

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 or campaign_manager is created.

Returns:

  1. infotext_manager

defined in ../working_data/script/_lib/lib_infotext.lua, line 40

Back to top

Usage

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
Back to top

UI Component

infotext_manager:get_uicomponent()

Gets a uicomponent handle to the infotext panel

Returns:

  1. uicomponent

defined in ../working_data/script/_lib/lib_infotext.lua, line 128

Back to top

Modified Time

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 or battle_manager:slow_game_over_time (1 = normal speed, 0.5 = half speed etc)

Returns:

  1. nil

defined in ../working_data/script/_lib/lib_infotext.lua, line 144

Back to top

State Overrides

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:

  1. nil

defined in ../working_data/script/_lib/lib_infotext.lua, line 167

Back to top

Manipulation

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:

  1. 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:

  1. nil

defined in ../working_data/script/_lib/lib_infotext.lua, line 381

infotext_manager:clear_infotext()

Clears all infotext from the infotext panel.

Returns:

  1. nil

defined in ../working_data/script/_lib/lib_infotext.lua, line 393

Last updated 07/02/21 06:39:14