MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / focus_callback

Method focus_callback

olcPixelGameEngine.h:7749–7763  ·  view source on GitHub ↗

TY Gorbit

Source from the content-addressed store, hash-verified

7747
7748 //TY Gorbit
7749 static EM_BOOL focus_callback(int eventType, const EmscriptenFocusEvent* focusEvent, void* userData)
7750 {
7751 if (eventType == EMSCRIPTEN_EVENT_BLUR)
7752 {
7753 ptrPGE->olc_UpdateKeyFocus(false);
7754 ptrPGE->olc_UpdateMouseFocus(false);
7755 }
7756 else if (eventType == EMSCRIPTEN_EVENT_FOCUS)
7757 {
7758 ptrPGE->olc_UpdateKeyFocus(true);
7759 ptrPGE->olc_UpdateMouseFocus(true);
7760 }
7761
7762 return 0;
7763 }
7764
7765 //TY Moros
7766 static EM_BOOL fullscreen_change_callback(int eventType, const EmscriptenFullscreenChangeEvent *event, void *userData)

Callers

nothing calls this directly

Calls 2

olc_UpdateKeyFocusMethod · 0.80
olc_UpdateMouseFocusMethod · 0.80

Tested by

no test coverage detected