Skip to content

Commit

Permalink
Added a further mode to the fullscreen console toggle, now goes from …
Browse files Browse the repository at this point in the history
…one line > half height > fullheight.
  • Loading branch information
danij committed Nov 22, 2007
1 parent f55fe04 commit 0d4e1f8
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions doomsday/engine/portable/src/rend_console.c
Expand Up @@ -264,9 +264,25 @@ static void drawSideText(const char *text, int line, float alpha)
}
#endif

static __inline int consoleMinHeight(void)
{
return 1.25f * fontSy + GetConsoleTitleBarHeight() /
theWindow->height * 200;
}

void Rend_ConsoleToggleFullscreen(void)
{
ConsoleDestY = ConsoleOpenY = (ConsoleDestY == 200 ? 100 : 200);
float y;
int minHeight = consoleMinHeight();

if(ConsoleDestY == minHeight)
y = 100;
else if(ConsoleDestY == 100)
y = 200;
else
y = minHeight;

ConsoleDestY = ConsoleOpenY = y;
}

void Rend_ConsoleOpen(int yes)
Expand All @@ -290,7 +306,8 @@ void Rend_ConsoleMove(int numLines)

if(numLines < 0)
{
int minHeight = 1.25f*fontSy + GetConsoleTitleBarHeight() / theWindow->height * 200;
int minHeight = consoleMinHeight();

ConsoleOpenY -= fontSy * -numLines;
if(ConsoleOpenY < minHeight)
ConsoleOpenY = minHeight;
Expand Down

0 comments on commit 0d4e1f8

Please sign in to comment.