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

Method NotificationScreen

game/ui/general/notificationscreen.cpp:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16{
17
18NotificationScreen::NotificationScreen(sp<GameState> state, CityView &cityView,
19 const UString &message, GameEventType eventType)
20 : Stage(), menuform(ui().getForm("notification")), eventType(eventType), state(state)
21{
22 menuform->findControlTyped<Label>("TEXT_NOTIFICATION")->setText(message);
23
24 menuform->findControl("BUTTON_PAUSE")
25 ->addCallback(FormEventType::ButtonClick, [&cityView](Event *) {
26 cityView.zoomLastEvent();
27 cityView.setUpdateSpeed(CityUpdateSpeed::Pause);
28 fw().stageQueueCommand({StageCmd::Command::POP});
29 });
30}
31
32NotificationScreen::NotificationScreen(sp<GameState> state, BattleView &battleView,
33 const UString &message, GameEventType eventType)

Callers

nothing calls this directly

Calls 7

addCallbackMethod · 0.80
findControlMethod · 0.80
stageQueueCommandMethod · 0.80
getFormMethod · 0.45
setTextMethod · 0.45
zoomLastEventMethod · 0.45
setUpdateSpeedMethod · 0.45

Tested by

no test coverage detected