MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ui_ProcessFocusedWindow

Function ui_ProcessFocusedWindow

ui/UISystem.cpp:426–445  ·  view source on GitHub ↗

returns a result and processes input of a window in focus

Source from the content-addressed store, hash-verified

424}
425// returns a result and processes input of a window in focus
426int ui_ProcessFocusedWindow() {
427 int res = -1;
428 int res2;
429 // no input processing, just render frame
430 // process the window in focus.
431 // process at least once regardless of input (for user processes.)
432 // get keys. get mouse while real events (non ui manuipulated) are there.
433 ui_MousePoll(false);
434 if (UIWindowFocus) {
435 UI_input.b1_count = 0; // button one state reset.
436 ui_KeyPoll();
437 ui_MousePoll(true);
438 do {
439 res2 = UIWindowFocus->Process();
440 if (res2 != -1)
441 res = res2;
442 } while (ui_MousePoll(true));
443 }
444 return res;
445}
446// updates all visible windows.
447void ui_UpdateWindows() {
448 tUIWindowNode *wndnode = UIWindowList;

Callers 1

ui_DoFrameFunction · 0.85

Calls 3

ui_MousePollFunction · 0.85
ui_KeyPollFunction · 0.85
ProcessMethod · 0.45

Tested by

no test coverage detected