mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 04:18:36 +00:00
A couple minor changes to make screen updates more efficient.
This commit is contained in:
parent
7016c2aac2
commit
17b56ddbab
@ -94,20 +94,21 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
Colors::Init();
|
||||
|
||||
using musik::core::audio::Transport;
|
||||
Transport tp;
|
||||
tp.SetVolume(0.01);
|
||||
|
||||
using musik::core::LibraryFactory;
|
||||
LibraryPtr library = LibraryFactory::Libraries().at(0);
|
||||
|
||||
//MainLayout mainLayout(tp, library);
|
||||
LibraryLayout libraryLayout(library);
|
||||
MainLayout mainLayout(tp, library);
|
||||
//LibraryLayout libraryLayout(library);
|
||||
|
||||
int ch;
|
||||
timeout(IDLE_TIMEOUT_MS);
|
||||
bool quit = false;
|
||||
|
||||
ILayout* layout = &libraryLayout;
|
||||
ILayout* layout = &mainLayout;
|
||||
IWindow* focused = layout->GetFocus();
|
||||
IInput* input = dynamic_cast<IInput*>(focused);
|
||||
IScrollable* scrollable = dynamic_cast<IScrollable*>(focused);
|
||||
|
@ -137,9 +137,10 @@ void Window::Create() {
|
||||
wbkgd(this->content, COLOR_PAIR(this->contentColor));
|
||||
}
|
||||
|
||||
wrefresh(this->frame);
|
||||
touchwin(this->content);
|
||||
wrefresh(this->content);
|
||||
wnoutrefresh(this->frame);
|
||||
wnoutrefresh(this->content);
|
||||
doupdate();
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,8 +169,9 @@ void Window::Clear() {
|
||||
|
||||
void Window::Repaint() {
|
||||
if (this->frame && this->content) {
|
||||
wrefresh(this->frame);
|
||||
wrefresh(this->content);
|
||||
wnoutrefresh(this->frame);
|
||||
wnoutrefresh(this->content);
|
||||
doupdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,3 +6,4 @@
|
||||
#endif
|
||||
|
||||
#include <curses.h>
|
||||
#include <panel.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user