Actually fix the console scrolling issue. We just let pdcurses do it for us, PROPERLY!

This commit is contained in:
/dev/urandom 2016-08-30 21:35:58 +02:00
parent 125e9c4795
commit 3271a6d510
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -279,11 +279,12 @@ namespace Components
raw(); raw();
noecho(); noecho();
Console::OutputWindow = newpad(OUTPUT_HEIGHT, Console::Width); Console::OutputWindow = newpad(Console::Height - 1, Console::Width);
Console::InputWindow = newwin(1, Console::Width, Console::Height - 1, 0); Console::InputWindow = newwin(1, Console::Width, Console::Height - 1, 0);
Console::InfoWindow = newwin(1, Console::Width, 0, 0); Console::InfoWindow = newwin(1, Console::Width, 0, 0);
scrollok(Console::OutputWindow, true); scrollok(Console::OutputWindow, true);
idlok(Console::OutputWindow, true);
scrollok(Console::InputWindow, true); scrollok(Console::InputWindow, true);
nodelay(Console::InputWindow, true); nodelay(Console::InputWindow, true);
keypad(Console::InputWindow, true); keypad(Console::InputWindow, true);
@ -308,9 +309,6 @@ namespace Components
wrefresh(Console::InfoWindow); wrefresh(Console::InfoWindow);
wrefresh(Console::InputWindow); wrefresh(Console::InputWindow);
// 4 Lines do not autoscroll/are multiline -> skip 4 lines when initializing
Console::ScrollOutput(4);
Console::RefreshOutput(); Console::RefreshOutput();
} }
@ -346,11 +344,6 @@ namespace Components
const char* p = message; const char* p = message;
while (*p != '\0') while (*p != '\0')
{ {
if (*p == '\n')
{
Console::ScrollOutput(1);
}
if (*p == '^') if (*p == '^')
{ {
char color; char color;