======================= UI_AdjustSaveGameListBox ======================= */ Yeah I could get fired for this... in a world of good and bad, this is bad I wish we passed in the menu item to RunScript(), oh well...
| 6472 | // Yeah I could get fired for this... in a world of good and bad, this is bad |
| 6473 | // I wish we passed in the menu item to RunScript(), oh well... |
| 6474 | void UI_AdjustSaveGameListBox( int currentLine ) |
| 6475 | { |
| 6476 | menuDef_t *menu; |
| 6477 | itemDef_t *item; |
| 6478 | |
| 6479 | // could be in either the ingame or shell load menu (I know, I know it's bad) |
| 6480 | menu = Menus_FindByName("loadgameMenu"); |
| 6481 | if( !menu ) |
| 6482 | { |
| 6483 | menu = Menus_FindByName("ingameloadMenu"); |
| 6484 | } |
| 6485 | |
| 6486 | if (menu) |
| 6487 | { |
| 6488 | item = (itemDef_s *) Menu_FindItemByName((menuDef_t *) menu, "loadgamelist"); |
| 6489 | if (item) |
| 6490 | { |
| 6491 | listBoxDef_t *listPtr = (listBoxDef_t*)item->typeData; |
| 6492 | if( listPtr ) |
| 6493 | { |
| 6494 | listPtr->cursorPos = currentLine; |
| 6495 | } |
| 6496 | |
| 6497 | item->cursorPos = currentLine; |
| 6498 | } |
| 6499 | } |
| 6500 | |
| 6501 | } |
| 6502 | |
| 6503 | /* |
| 6504 | ================= |
no test coverage detected