MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IConsoleResize

Function IConsoleResize

src/console_gui.cpp:408–423  ·  view source on GitHub ↗

Change the size of the in-game console window after the screen size changed, or the window state changed. */

Source from the content-addressed store, hash-verified

406
407/** Change the size of the in-game console window after the screen size changed, or the window state changed. */
408void IConsoleResize(Window *w)
409{
410 switch (_iconsole_mode) {
411 case ICONSOLE_OPENED:
412 w->height = _screen.height / 3;
413 w->width = _screen.width;
414 break;
415 case ICONSOLE_FULL:
416 w->height = _screen.height - ICON_BOTTOM_BORDERWIDTH;
417 w->width = _screen.width;
418 break;
419 default: return;
420 }
421
422 MarkWholeScreenDirty();
423}
424
425/** Toggle in-game console between opened and closed. */
426void IConsoleSwitch()

Callers 2

OnKeyPressMethod · 0.85
RelocateAllWindowsFunction · 0.85

Calls 1

MarkWholeScreenDirtyFunction · 0.85

Tested by

no test coverage detected