MCPcopy Create free account
hub / github.com/ZDoom/Raze / C_ToggleConsole

Function C_ToggleConsole

source/common/console/c_console.cpp:714–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712}
713
714void 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
745void C_HideConsole ()
746{

Callers 6

HollyCheatFunction · 0.85
DEFINE_ACTION_FUNCTIONFunction · 0.85
C_HandleKeyFunction · 0.85
CCMDFunction · 0.85
ScreenJobResponderFunction · 0.85
CCMDFunction · 0.85

Calls 1

C_FlushDisplayFunction · 0.85

Tested by

no test coverage detected