. Find weapons allocation screen BEGIN button and make active/inactive
| 5495 | |
| 5496 | //. Find weapons allocation screen BEGIN button and make active/inactive |
| 5497 | static void UI_WeaponAllocBeginButton(qboolean activeFlag) |
| 5498 | { |
| 5499 | menuDef_t *menu; |
| 5500 | menu = Menu_GetFocused(); // Get current menu |
| 5501 | |
| 5502 | if (!menu) |
| 5503 | { |
| 5504 | return; |
| 5505 | } |
| 5506 | |
| 5507 | int weap = Cvar_VariableIntegerValue( "weapon_menu" ); |
| 5508 | |
| 5509 | // Find begin button |
| 5510 | itemDef_t *item; |
| 5511 | item = Menu_GetMatchingItemByNumber(menu, weap, "beginmission"); |
| 5512 | |
| 5513 | if (item) |
| 5514 | { |
| 5515 | // Make it active |
| 5516 | if (activeFlag) |
| 5517 | { |
| 5518 | item->window.flags &= ~WINDOW_INACTIVE; |
| 5519 | } |
| 5520 | else |
| 5521 | { |
| 5522 | item->window.flags |= WINDOW_INACTIVE; |
| 5523 | } |
| 5524 | } |
| 5525 | } |
| 5526 | |
| 5527 | // If we have both weapons and the throwable weapon, turn on the begin mission button, |
| 5528 | // otherwise, turn it off |
no test coverage detected