create a window at the specified coords.
| 177 | |
| 178 | // create a window at the specified coords. |
| 179 | void 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 | |
| 202 | void UIWindow::Destroy() { |
| 203 | OnDestroy(); |
nothing calls this directly
no test coverage detected