=============== Item_SetScreenCoords =============== */
| 5600 | =============== |
| 5601 | */ |
| 5602 | void Item_SetScreenCoords(itemDef_t *item, float x, float y) |
| 5603 | { |
| 5604 | |
| 5605 | if (item == NULL) |
| 5606 | { |
| 5607 | return; |
| 5608 | } |
| 5609 | |
| 5610 | if (item->window.border != 0) |
| 5611 | { |
| 5612 | x += item->window.borderSize; |
| 5613 | y += item->window.borderSize; |
| 5614 | } |
| 5615 | |
| 5616 | item->window.rect.x = x + item->window.rectClient.x; |
| 5617 | item->window.rect.y = y + item->window.rectClient.y; |
| 5618 | item->window.rect.w = item->window.rectClient.w; |
| 5619 | item->window.rect.h = item->window.rectClient.h; |
| 5620 | |
| 5621 | // force the text rects to recompute |
| 5622 | item->textRect.w = 0; |
| 5623 | item->textRect.h = 0; |
| 5624 | |
| 5625 | switch ( item->type) |
| 5626 | { |
| 5627 | case ITEM_TYPE_TEXTSCROLL: |
| 5628 | { |
| 5629 | textScrollDef_t *scrollPtr = (textScrollDef_t*)item->typeData; |
| 5630 | if ( scrollPtr ) |
| 5631 | { |
| 5632 | scrollPtr->startPos = 0; |
| 5633 | scrollPtr->endPos = 0; |
| 5634 | } |
| 5635 | |
| 5636 | Item_TextScroll_BuildLines ( item ); |
| 5637 | |
| 5638 | break; |
| 5639 | } |
| 5640 | } |
| 5641 | } |
| 5642 | |
| 5643 | |
| 5644 | static void Menu_FreeGhoulItems(menuDef_t *menu) |
no test coverage detected