MCPcopy Create free account
hub / github.com/Cpasjuste/pplay / onInput

Method onInput

src/main.cpp:157–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool Main::onInput(c2d::Input::Player *players) {
158
159 if (messageBox->isVisible()) {
160 // don't handle input if message box is visible
161 return false;
162 }
163
164 unsigned int keys = players[0].keys;
165
166 if (keys & EV_QUIT) {
167 if (player->isFullscreen()) {
168 player->setFullscreen(false);
169 filer->setVisibility(Visibility::Visible, true);
170 } else {
171 quit();
172 }
173 }
174
175 return Renderer::onInput(players);
176}
177
178void Main::onUpdate() {
179 unsigned int keys = getInput()->getKeys(0);

Callers

nothing calls this directly

Calls 3

isFullscreenMethod · 0.80
setFullscreenMethod · 0.80
setVisibilityMethod · 0.45

Tested by

no test coverage detected