| 712 | } |
| 713 | |
| 714 | void C_ToggleConsole () |
| 715 | { |
| 716 | int togglestate; |
| 717 | if (gamestate == GS_INTRO) // blocked |
| 718 | { |
| 719 | return; |
| 720 | } |
| 721 | if (gamestate == GS_MENUSCREEN) |
| 722 | { |
| 723 | if (sysCallbacks.ToggleFullConsole) sysCallbacks.ToggleFullConsole(); |
| 724 | togglestate = c_down; |
| 725 | } |
| 726 | else if (!chatmodeon && (ConsoleState == c_up || ConsoleState == c_rising) && menuactive == MENU_Off) |
| 727 | { |
| 728 | ConsoleState = c_falling; |
| 729 | HistPos = NULL; |
| 730 | TabbedLast = false; |
| 731 | TabbedList = false; |
| 732 | togglestate = c_falling; |
| 733 | } |
| 734 | else if (gamestate != GS_FULLCONSOLE && gamestate != GS_STARTUP) |
| 735 | { |
| 736 | ConsoleState = c_rising; |
| 737 | C_FlushDisplay(); |
| 738 | togglestate = c_rising; |
| 739 | } |
| 740 | else return; |
| 741 | // This must be done as an event callback because the client code does not control the console toggling. |
| 742 | if (sysCallbacks.ConsoleToggled) sysCallbacks.ConsoleToggled(togglestate); |
| 743 | } |
| 744 | |
| 745 | void C_HideConsole () |
| 746 | { |
no test coverage detected