Skip to content

TrainerPanelUI ​

Inherits: PanelUI < Control

The list of lessons of a trainer: what each teaches, what it costs, a Learn button, grey with the reason when a requirement is not met, "Known" when the character has all of it. It is built in code, so a game can replace it by its own panel (the TrainerInteraction gives the offers: get_offers, learn).

Variables ​

TrainerInteractioninteractionnull
Playerlearnernull

Methods ​

voidsetup_trainer_panel( p_interaction: TrainerInteraction, player: Player )
voidrefresh()
voidclose_panel()

Variable descriptions ​

TrainerInteraction interaction = null ​

The trainer interaction the panel shows.

Player learner = null ​

The player who learns.

Method descriptions ​

void setup_trainer_panel( p_interaction: TrainerInteraction, player: Player ) ​

Fill the panel for a trainer and the player in front of it

void refresh() ​

Show the lessons again (after a purchase, or when something about the player changed)

void close_panel() ​

Closes the window.