Flip flop between being able to see the text showing the Force Point has or hasn't been allocated (Used by Force Power Allocation screen)
| 4598 | |
| 4599 | // Flip flop between being able to see the text showing the Force Point has or hasn't been allocated (Used by Force Power Allocation screen) |
| 4600 | static void UI_SetPowerTitleText ( qboolean showAllocated ) |
| 4601 | { |
| 4602 | menuDef_t *menu; |
| 4603 | itemDef_t *item; |
| 4604 | |
| 4605 | menu = Menu_GetFocused(); // Get current menu |
| 4606 | |
| 4607 | if (!menu) |
| 4608 | { |
| 4609 | return; |
| 4610 | } |
| 4611 | |
| 4612 | if (showAllocated) |
| 4613 | { |
| 4614 | // Show the text saying the force point has been allocated |
| 4615 | item = (itemDef_s *) Menu_FindItemByName(menu, "allocated_text"); |
| 4616 | if (item) |
| 4617 | { |
| 4618 | item->window.flags |= WINDOW_VISIBLE; |
| 4619 | } |
| 4620 | |
| 4621 | // Hide text saying the force point needs to be allocated |
| 4622 | item = (itemDef_s *) Menu_FindItemByName(menu, "allocate_text"); |
| 4623 | if (item) |
| 4624 | { |
| 4625 | item->window.flags &= ~WINDOW_VISIBLE; |
| 4626 | } |
| 4627 | } |
| 4628 | else |
| 4629 | { |
| 4630 | // Hide the text saying the force point has been allocated |
| 4631 | item = (itemDef_s *) Menu_FindItemByName(menu, "allocated_text"); |
| 4632 | if (item) |
| 4633 | { |
| 4634 | item->window.flags &= ~WINDOW_VISIBLE; |
| 4635 | } |
| 4636 | |
| 4637 | // Show text saying the force point needs to be allocated |
| 4638 | item = (itemDef_s *) Menu_FindItemByName(menu, "allocate_text"); |
| 4639 | if (item) |
| 4640 | { |
| 4641 | item->window.flags |= WINDOW_VISIBLE; |
| 4642 | } |
| 4643 | } |
| 4644 | } |
| 4645 | |
| 4646 | #ifndef JK2_MODE |
| 4647 | static int UI_CountForcePowers( void ) { |
no test coverage detected