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

Function ui_AddWindow

ui/UISystem.cpp:350–369  ·  view source on GitHub ↗

adds a window to the ui list.

Source from the content-addressed store, hash-verified

348}
349// adds a window to the ui list.
350void ui_AddWindow(UIWindow *wnd) {
351 tUIWindowNode *newnode = new tUIWindowNode;
352
353 if (!UIWindowList) {
354 // first item to add to list.
355 UIWindowList = newnode;
356 newnode->prev = NULL;
357 } else {
358 // add to existing list.
359 tUIWindowNode *node = UIWindowList;
360 while (node->next) {
361 node = node->next;
362 }
363 node->next = newnode;
364 newnode->prev = node;
365 }
366 newnode->next = NULL;
367 newnode->wnd = wnd;
368 UIWindowTail = newnode;
369}
370// removes a window from ui list.if topmost, the next topmost window has focus.
371void ui_RemoveAllWindows() {
372 int count = 0;

Callers 1

OpenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected