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

Function Menu_UpdatePosition

code/ui/ui_shared.cpp:5682–5704  ·  view source on GitHub ↗

=============== Menu_UpdatePosition =============== */

Source from the content-addressed store, hash-verified

5680===============
5681*/
5682void Menu_UpdatePosition(menuDef_t *menu)
5683{
5684 int i;
5685 float x, y;
5686
5687 if (menu == NULL)
5688 {
5689 return;
5690 }
5691
5692 x = menu->window.rect.x;
5693 y = menu->window.rect.y;
5694 if (menu->window.border != 0)
5695 {
5696 x += menu->window.borderSize;
5697 y += menu->window.borderSize;
5698 }
5699
5700 for (i = 0; i < menu->itemCount; i++)
5701 {
5702 Item_SetScreenCoords(menu->items[i], x, y);
5703 }
5704}
5705
5706/*
5707===============

Callers 2

Menu_PostParseFunction · 0.70
Display_MouseMoveFunction · 0.70

Calls 1

Item_SetScreenCoordsFunction · 0.70

Tested by

no test coverage detected