/** * @brief Check if a point is over a window from the stack * @sa IN_Parse */ bool UI_IsMouseOnWindow (void) { const uiNode_t *hovered; if (UI_GetMouseCapture() != NULL) return true; if (ui_global.windowStackPos != 0) { if (WINDOWEXTRADATA(ui_global.windowStack[ui_global.windowStackPos - 1]).dropdown) return true; } hovered = UI_GetHoveredNode(); if (hovered) { /* else if it is a render node */ if (UI_Node_IsBattleScape(hovered)) { return false; } return true; } return true; }
static void UI_BeforeDeletingNode (const uiNode_t* node) { if (UI_GetHoveredNode() == node) { UI_InvalidateMouse(); } }