================= Item_UpdatePosition ================= */ FIXME: consolidate this with nearby stuff
| 6451 | */ |
| 6452 | // FIXME: consolidate this with nearby stuff |
| 6453 | void 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 | ================= |
no test coverage detected