MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Display_MouseMove

Function Display_MouseMove

code/ui/ui_shared.cpp:9420–9449  ·  view source on GitHub ↗

================= Display_MouseMove ================= */

Source from the content-addressed store, hash-verified

9418=================
9419*/
9420qboolean Display_MouseMove(void *p, int x, int y)
9421{
9422 int i;
9423 menuDef_t *menu = (menuDef_t *) p;
9424
9425 if (menu == NULL)
9426 {
9427 menu = Menu_GetFocused();
9428 if (menu)
9429 {
9430 if (menu->window.flags & WINDOW_POPUP)
9431 {
9432 Menu_HandleMouseMove(menu, x, y);
9433 return qtrue;
9434 }
9435 }
9436
9437 for (i = 0; i < menuCount; i++)
9438 {
9439 Menu_HandleMouseMove(&Menus[i], x, y);
9440 }
9441 }
9442 else
9443 {
9444 menu->window.rect.x += x;
9445 menu->window.rect.y += y;
9446 Menu_UpdatePosition(menu);
9447 }
9448 return qtrue;
9449}
9450
9451/*
9452=================

Callers 4

_UI_MouseEventFunction · 0.70
Item_ListBox_HandleKeyFunction · 0.70
Menu_HandleKeyFunction · 0.70

Calls 3

Menu_GetFocusedFunction · 0.70
Menu_HandleMouseMoveFunction · 0.70
Menu_UpdatePositionFunction · 0.70

Tested by

no test coverage detected