returns a result and processes input of a window in focus
| 424 | } |
| 425 | // returns a result and processes input of a window in focus |
| 426 | int 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. |
| 447 | void ui_UpdateWindows() { |
| 448 | tUIWindowNode *wndnode = UIWindowList; |
no test coverage detected