Battle UI Manager

The battle ui manager provides helper functions related to the UI for battle scripts. It is primarily of use for help page scripts that wish to highlight bits of the UI with a pulsing effect. In this respect, it performs the same function as the campaign_ui_manager.

By convention, the battle ui manager may be accessed at the global variable buim when in battle.

Loaded in Campaign Loaded in Campaign
Loaded in Battle Loaded in Battle
Loaded in Frontend Loaded in Frontend
Back to top

Creation

battle_ui_manager:new(battle_manager battle manager)

Creates a battle_ui_manager. It should never be necessary for a client script to need to call this directly, as the battle_manager creates this object and stores it internally. Instead retrieve the battle_ui_manager from the battle_manager with battle_manager:get_battle_ui_manager. By convention, the battle ui manager is also found at the global variable buim.

Parameters:

1

battle_manager

battle manager

Returns:

  1. battle_ui_manager

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 49

Back to top

Panel Status

battle_ui_manager:is_panel_open(string panel name)

Returns whether a ui panel with the supplied name is currently open.

Parameters:

1

string

panel name

Returns:

  1. boolean is panel open

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 121

battle_ui_manager:is_esc_menu_open()

Returns whether the escape menu is currently open.

Returns:

  1. boolean is esc menu open

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 133

battle_ui_manager:get_open_fullscreen_panel()

Returns the name of a fullscreen panel that's open, or false if no panels are open. If more than one fullscreen panel is open then the name of one is returned at random.

Returns:

  1. string open fullscreen panel

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 141

Back to top

Pulse Strength Constants

battle_ui_manager:get_panel_pulse_strength()

Returns the panel pulse strength constant the battle_ui_manager stores internally. This value determines the strength of the pulse highlighting effect on large UI elements like panels.

Returns:

  1. number

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 165

battle_ui_manager:get_button_pulse_strength()

Returns the button pulse strength constant the battle_ui_manager stores internally. This value determines the strength of the pulse highlighting effect on small UI elements like buttons.

Returns:

  1. number

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 173

Back to top

Unhighlighting

battle_ui_manager:register_unhighlight_callback(function callback to call)

Allows registration of a function to be called when battle_ui_manager:unhighlight_all_for_tooltips is called.

Parameters:

1

function

callback to call

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 191

battle_ui_manager:unhighlight_all_for_tooltips()

Calls all functions currently registered with battle_ui_manager:register_unhighlight_callback. This is intended to be used to unhighlight all currently-highlighted UI elements, when the mouse cursor is moved off of a help page link.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 205

Back to top

Help Page Highlighting Permitted

battle_ui_manager:set_help_page_link_highlighting_permitted([boolean enable highlighting])

Enables/disables the scripted behaviour which pulses a highlight over various elements of the UI when the mouse cursor is placed over related words on Help Pages.

Parameters:

1

boolean

optional, default value=true

enable highlighting

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 226

battle_ui_manager:get_help_page_link_highlighting_permitted()

Returns whether help page link highlighting is permitted. This is true by default, unless it's been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted

Returns:

  1. boolean highlighting enabled

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 237

Back to top

Specific Component Highlighting

battle_ui_manager:highlight_advice_history_buttons(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the advice history buttons.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 257

battle_ui_manager:highlight_advisor_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the advice button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 291

battle_ui_manager:highlight_advisor(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the advisor.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 316

battle_ui_manager:highlight_army_abilities(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights any army abilities buttons.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 366

battle_ui_manager:highlight_army_abilities_meter(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights any army abilities buttons.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 400

battle_ui_manager:highlight_army_panel(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the army panel.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 435

battle_ui_manager:highlight_balance_of_power(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the balance of power bar.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 459

battle_ui_manager:highlight_drop_equipment_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the drop equipment button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 483

battle_ui_manager:highlight_fire_at_will_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the fire-at-will button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 515

battle_ui_manager:highlight_formations_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the formations button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 547

battle_ui_manager:highlight_game_guide_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the game guide button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 571

battle_ui_manager:highlight_group_button(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the group button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 595

battle_ui_manager:highlight_guard_button(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the guard button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 619

battle_ui_manager:highlight_lore_panel(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the lore panel.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 643

battle_ui_manager:highlight_melee_mode_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the melee mode button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 667

battle_ui_manager:highlight_power_reserve_bar(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the power reserve bar.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 691

battle_ui_manager:highlight_radar_map(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the radar map.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 715

battle_ui_manager:highlight_realm_of_souls(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the realm of souls bar.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 739

battle_ui_manager:highlight_skirmish_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the skirmish button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 763

battle_ui_manager:highlight_spells(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights any spells buttons.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 795

battle_ui_manager:highlight_supplies(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the supplies.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 823

battle_ui_manager:highlight_tactical_map_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the tactical map button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 848

battle_ui_manager:highlight_time_controls(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the time controls buttons.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 871

battle_ui_manager:highlight_time_limit(boolean enable highlight, [number pulse strength], [boolean force])

Pulse-highlights the time limit.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 921

battle_ui_manager:highlight_unit_abilities(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights any unit abilities buttons.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 946

battle_ui_manager:highlight_unit_cards(
  
boolean enable highlight,
  [number
pulse strength],
  [boolean
force],
  [boolean
highlight health],
  [boolean
highlight ammo],
  [boolean
highlight xp],
  [boolean
highlight status]
)

Pulse-highlights the unit cards.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

4

boolean

optional, default value=false

Only highlight/unhighlight the health bar of unit cards.

5

boolean

optional, default value=false

Only highlight/unhighlight the ammunition bar of unit cards.

6

boolean

optional, default value=false

Only highlight/unhighlight the experience icon of unit cards.

7

boolean

optional, default value=false

Only highlight/unhighlight the status tab of unit cards.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 977

battle_ui_manager:highlight_unit_details_button(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the unit details button.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 1062

battle_ui_manager:highlight_unit_details_panel(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the unit details panel.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 1087

battle_ui_manager:highlight_unit_portrait_panel(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the unit portrait panel.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 1115

battle_ui_manager:highlight_victory_locations(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the victory locations.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 1149

battle_ui_manager:highlight_victory_tickets(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the victory tickets.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 1174

battle_ui_manager:highlight_winds_of_magic_panel(
  boolean
enable highlight,
  [number
pulse strength],
  [boolean
force]
)

Pulse-highlights the winds of magic panel.

Parameters:

1

boolean

Set to true to enable the highlight, false to disable

2

number

optional, default value=nil

Override pulse strength

3

boolean

optional, default value=false

Enable the highlight even if highlighting has been disabled with battle_ui_manager:set_help_page_link_highlighting_permitted.

Returns:

  1. nil

defined in ../../warhammer/working_data/script/_lib/lib_battle_ui.lua, line 1199

Last updated 7/9/2024 11:45:05 AM