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

Method eventOccurred

game/ui/general/loadingscreen.cpp:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53void LoadingScreen::finish() {}
54
55void LoadingScreen::eventOccurred(Event *e)
56{
57 if (!state)
58 {
59 return;
60 }
61 if (e->type() == EVENT_GAME_STATE)
62 {
63 auto gameEvent = dynamic_cast<GameEvent *>(e);
64 if (!gameEvent)
65 {
66 LogError("Invalid game state event");
67 return;
68 }
69 if (!gameEvent->message().empty())
70 {
71 state->logEvent(gameEvent);
72 }
73 switch (gameEvent->type)
74 {
75 default:
76 break;
77 }
78 }
79}
80
81void LoadingScreen::update()
82{

Callers

nothing calls this directly

Calls 4

typeMethod · 0.80
emptyMethod · 0.80
messageMethod · 0.80
logEventMethod · 0.80

Tested by

no test coverage detected