try to remove some "flickering" by using setActive(false)/setActive() and adding
a glFlush...
This commit is contained in:
@@ -1026,7 +1026,7 @@ xBadVal::~xBadVal() throw(){
|
||||
bool cDialog::doAnimations = false;
|
||||
|
||||
void cDialog::draw(){
|
||||
win.setActive();
|
||||
win.setActive(false);
|
||||
tileImage(win,winRect,::bg[bg]);
|
||||
if(doAnimations && animTimer.getElapsedTime().asMilliseconds() >= 500) {
|
||||
cPict::advanceAnim();
|
||||
@@ -1039,6 +1039,7 @@ void cDialog::draw(){
|
||||
iter++;
|
||||
}
|
||||
|
||||
win.setActive();
|
||||
win.display();
|
||||
}
|
||||
|
||||
|
@@ -51,7 +51,7 @@ bool cButton::isScrollable(){
|
||||
void cButton::draw(){
|
||||
rectangle from_rect, to_rect;
|
||||
|
||||
inWindow->setActive();
|
||||
inWindow->setActive(false);
|
||||
|
||||
if(visible){
|
||||
TextStyle style;
|
||||
@@ -86,6 +86,7 @@ void cButton::draw(){
|
||||
// frame default button, to provide a visual cue that it's the default
|
||||
if(key.spec && key.k == key_enter) drawFrame(2,frameStyle);
|
||||
}
|
||||
inWindow->setActive();
|
||||
}
|
||||
|
||||
bool cButton::manageFormat(eFormat prop, bool set, boost::any* val) {
|
||||
|
@@ -89,7 +89,7 @@ bool cLed::manageFormat(eFormat prop, bool set, boost::any* val) {
|
||||
void cLed::draw(){
|
||||
rectangle from_rect, to_rect;
|
||||
|
||||
inWindow->setActive();
|
||||
inWindow->setActive(false);
|
||||
|
||||
if(visible){
|
||||
TextStyle style;
|
||||
@@ -106,6 +106,8 @@ void cLed::draw(){
|
||||
to_rect.left = frame.left + 18; // Possibly could be 20
|
||||
win_draw_string(*inWindow,to_rect,lbl,wrapLabel ? eTextMode::WRAP : eTextMode::LEFT_TOP,style);
|
||||
}
|
||||
|
||||
inWindow->setActive();
|
||||
}
|
||||
|
||||
cControl::storage_t cLed::store() {
|
||||
|
Reference in New Issue
Block a user