Update UI occasionally to stop main menu flicker

This commit is contained in:
Huntereb 2019-12-08 19:44:39 -05:00
parent 050f0276ca
commit 5515df5d78
2 changed files with 4 additions and 0 deletions

View file

@ -117,11 +117,13 @@ namespace inst::ui {
this->startNetwork(); this->startNetwork();
return; return;
} else { } else {
mainApp->CallForRender(); // If we re-render a few times during this process the main screen won't flicker
sourceString = " over local network"; sourceString = " over local network";
this->pageInfoText->SetText("Select what files you want to install from the server, then press the Plus button!"); this->pageInfoText->SetText("Select what files you want to install from the server, then press the Plus button!");
this->butText->SetText("\ue0e0 Select File \ue0e3 Select All \ue0ef Install File(s) \ue0e1 Cancel "); this->butText->SetText("\ue0e0 Select File \ue0e3 Select All \ue0ef Install File(s) \ue0e1 Cancel ");
this->drawMenuItems(true); this->drawMenuItems(true);
this->menu->SetSelectedIndex(0); this->menu->SetSelectedIndex(0);
mainApp->CallForRender();
this->infoImage->SetVisible(false); this->infoImage->SetVisible(false);
this->menu->SetVisible(true); this->menu->SetVisible(true);
} }

View file

@ -77,10 +77,12 @@ namespace inst::ui {
mainApp->LoadLayout(mainApp->mainPage); mainApp->LoadLayout(mainApp->mainPage);
return; return;
} else { } else {
mainApp->CallForRender(); // If we re-render a few times during this process the main screen won't flicker
this->pageInfoText->SetText("Select what files you want to install over USB, then press the Plus button!"); this->pageInfoText->SetText("Select what files you want to install over USB, then press the Plus button!");
this->butText->SetText("\ue0e0 Select File \ue0e3 Select All \ue0ef Install File(s) \ue0e1 Cancel "); this->butText->SetText("\ue0e0 Select File \ue0e3 Select All \ue0ef Install File(s) \ue0e1 Cancel ");
this->drawMenuItems(true); this->drawMenuItems(true);
this->menu->SetSelectedIndex(0); this->menu->SetSelectedIndex(0);
mainApp->CallForRender();
this->infoImage->SetVisible(false); this->infoImage->SetVisible(false);
this->menu->SetVisible(true); this->menu->SetVisible(true);
} }