================= Menu_HandleMouseMove ================= */
| 9314 | ================= |
| 9315 | */ |
| 9316 | void Menu_HandleMouseMove(menuDef_t *menu, float x, float y) |
| 9317 | { |
| 9318 | int i, pass; |
| 9319 | qboolean focusSet = qfalse; |
| 9320 | |
| 9321 | itemDef_t *overItem; |
| 9322 | if (menu == NULL) |
| 9323 | { |
| 9324 | return; |
| 9325 | } |
| 9326 | |
| 9327 | if (!(menu->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) |
| 9328 | { |
| 9329 | return; |
| 9330 | } |
| 9331 | |
| 9332 | if (itemCapture) |
| 9333 | { |
| 9334 | //Item_MouseMove(itemCapture, x, y); |
| 9335 | return; |
| 9336 | } |
| 9337 | |
| 9338 | if (g_waitingForKey || g_editingField) |
| 9339 | { |
| 9340 | return; |
| 9341 | } |
| 9342 | |
| 9343 | // FIXME: this is the whole issue of focus vs. mouse over.. |
| 9344 | // need a better overall solution as i don't like going through everything twice |
| 9345 | for (pass = 0; pass < 2; pass++) |
| 9346 | { |
| 9347 | for (i = 0; i < menu->itemCount; i++) |
| 9348 | { |
| 9349 | // turn off focus each item |
| 9350 | // menu->items[i].window.flags &= ~WINDOW_HASFOCUS; |
| 9351 | |
| 9352 | if (!(menu->items[i]->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) |
| 9353 | { |
| 9354 | continue; |
| 9355 | } |
| 9356 | |
| 9357 | if (menu->items[i]->window.flags & WINDOW_INACTIVE) |
| 9358 | { |
| 9359 | continue; |
| 9360 | } |
| 9361 | |
| 9362 | if (menu->items[i]->disabled) |
| 9363 | { |
| 9364 | continue; |
| 9365 | } |
| 9366 | |
| 9367 | // items can be enabled and disabled based on cvars |
| 9368 | if (menu->items[i]->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(menu->items[i], CVAR_ENABLE)) |
| 9369 | { |
| 9370 | continue; |
| 9371 | } |
| 9372 | |
| 9373 | if (menu->items[i]->cvarFlags & (CVAR_SHOW | CVAR_HIDE) && !Item_EnableShowViaCvar(menu->items[i], CVAR_SHOW)) |
no test coverage detected