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

Method Create

ui/UIWindow.cpp:179–200  ·  view source on GitHub ↗

create a window at the specified coords.

Source from the content-addressed store, hash-verified

177
178// create a window at the specified coords.
179void UIWindow::Create(int x, int y, int w, int h, int flags) {
180 m_FontHandle = m_WindowFont;
181 m_LockedGadget = NULL;
182 m_BackItem = UIPrimativeItem(TRANSPARENT_COLOR32).CopyUIItem();
183 m_BackColor = GR_RGB(0, 0, 0);
184 m_Flags = flags;
185 m_GadgetTail = NULL;
186 m_GadgetHead = NULL;
187 m_LastKey = 0;
188 m_LastKeyTime = 0.0f;
189 m_HoldHotkeys = false;
190 m_ResetCurGadget = false;
191 m_CurGadgetInGroup = false;
192 m_naccels = 0;
193
194 if (m_Flags & UIF_CENTER) {
195 x = UI_screen_width / 2 - w / 2;
196 y = UI_screen_height / 2 - h / 2;
197 }
198
199 UIObject::Create(x, y, w, h);
200}
201
202void UIWindow::Destroy() {
203 OnDestroy();

Callers

nothing calls this directly

Calls 3

UIPrimativeItemClass · 0.85
GR_RGBFunction · 0.50
CopyUIItemMethod · 0.45

Tested by

no test coverage detected