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

Method eventOccurred

game/ui/debugtools/imagepreview.cpp:41–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39void ImagePreview::finish() {}
40
41void ImagePreview::eventOccurred(Event *e)
42{
43 menuform->eventOccured(e);
44
45 if (e->type() == EVENT_KEY_DOWN)
46 {
47 if (e->keyboard().KeyCode == SDLK_ESCAPE)
48 {
49 fw().stageQueueCommand({StageCmd::Command::POP});
50 return;
51 }
52 }
53
54 if (e->type() == EVENT_FORM_INTERACTION &&
55 e->forms().EventFlag == FormEventType::TextEditFinish)
56 {
57 updateImage();
58 }
59}
60
61void ImagePreview::update() { menuform->update(); }
62

Callers

nothing calls this directly

Calls 3

typeMethod · 0.80
stageQueueCommandMethod · 0.80
eventOccuredMethod · 0.45

Tested by

no test coverage detected