mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 00:19:20 +00:00
Use werase() instead of wclear(). This seems to fix up the funky redraw issues when using Terminal.app and using musikbox over ssh.
This commit is contained in:
parent
7b4885995b
commit
e4eb083aca
@ -37,7 +37,7 @@ bool tostr(T& t, const std::string& s) {
|
|||||||
|
|
||||||
inline static void redrawContents(IWindow &window, const std::string& text) {
|
inline static void redrawContents(IWindow &window, const std::string& text) {
|
||||||
WINDOW* c = window.GetContent();
|
WINDOW* c = window.GetContent();
|
||||||
wclear(c);
|
werase(c);
|
||||||
wprintw(c, text.c_str());
|
wprintw(c, text.c_str());
|
||||||
window.Repaint();
|
window.Repaint();
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ void ScrollAdapterBase::DrawPage(WINDOW* window, size_t index, ScrollPosition *r
|
|||||||
result->logicalIndex = 0;
|
result->logicalIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wclear(window);
|
werase(window);
|
||||||
|
|
||||||
if (this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
if (this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
||||||
return;
|
return;
|
||||||
@ -138,4 +138,4 @@ void ScrollAdapterBase::DrawPage(WINDOW* window, size_t index, ScrollPosition *r
|
|||||||
result->totalEntries = GetEntryCount();
|
result->totalEntries = GetEntryCount();
|
||||||
result->logicalIndex = index;
|
result->logicalIndex = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -379,7 +379,7 @@ IWindow* Window::GetParent() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Window::Clear() {
|
void Window::Clear() {
|
||||||
wclear(this->content);
|
werase(this->content);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::Repaint() {
|
void Window::Repaint() {
|
||||||
|
Loading…
Reference in New Issue
Block a user