MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / MessageLogScreen

Method MessageLogScreen

game/ui/general/messagelogscreen.cpp:20–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18{
19
20MessageLogScreen::MessageLogScreen(sp<GameState> state, CityView &cityView)
21 : Stage(), menuform(ui().getForm("messagelog")), state(state)
22{
23 auto listbox = menuform->findControlTyped<ListBox>("LISTBOX_MESSAGES");
24 for (EventMessage message : state->messages)
25 {
26 listbox->addItem(createMessageRow(message, state, cityView));
27 }
28 this->update();
29 listbox->scroller->scrollMax();
30}
31
32MessageLogScreen::MessageLogScreen(sp<GameState> state, BattleView &battleView)
33 : Stage(), menuform(ui().getForm("messagelog")), state(state)

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
scrollMaxMethod · 0.80
getFormMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected