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

Function Item_UpdatePosition

code/ui/ui_shared.cpp:6453–6476  ·  view source on GitHub ↗

================= Item_UpdatePosition ================= */ FIXME: consolidate this with nearby stuff

Source from the content-addressed store, hash-verified

6451*/
6452// FIXME: consolidate this with nearby stuff
6453void Item_UpdatePosition(itemDef_t *item)
6454{
6455 float x, y;
6456 menuDef_t *menu;
6457
6458 if (item == NULL || item->parent == NULL)
6459 {
6460 return;
6461 }
6462
6463 menu = (menuDef_t *) item->parent;
6464
6465 x = menu->window.rect.x;
6466 y = menu->window.rect.y;
6467
6468 if (menu->window.border != 0)
6469 {
6470 x += menu->window.borderSize;
6471 y += menu->window.borderSize;
6472 }
6473
6474 Item_SetScreenCoords(item, x, y);
6475
6476}
6477
6478/*
6479=================

Callers 3

Menu_OrbitItemByNameFunction · 0.70
Item_PaintFunction · 0.70

Calls 1

Item_SetScreenCoordsFunction · 0.70

Tested by

no test coverage detected