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

Function ui_RemoveWindow

ui/UISystem.cpp:383–410  ·  view source on GitHub ↗

removes a window from ui list.

Source from the content-addressed store, hash-verified

381}
382// removes a window from ui list.
383void ui_RemoveWindow(UIWindow *wnd) {
384 tUIWindowNode *node = UIWindowList;
385 bool found_wnd = false;
386 while (node) {
387 if (node->wnd == wnd) {
388 // we found a node.
389 if (node->prev) {
390 node->prev->next = node->next;
391 }
392 if (node->next) {
393 node->next->prev = node->prev;
394 }
395 if (node == UIWindowList) {
396 UIWindowList = NULL;
397 UIWindowList = node->next;
398 }
399 if (node == UIWindowTail) {
400 UIWindowTail = NULL;
401 UIWindowTail = node->prev;
402 }
403 delete node;
404 found_wnd = true;
405 break;
406 }
407 node = node->next;
408 }
409 ASSERT(found_wnd);
410}
411// Procedure to find which window should gain focus in the
412// first check what window contains mouse pointer and save that window
413// check if keystroke,

Callers 2

ui_RemoveAllWindowsFunction · 0.85
CloseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected