Add panel::forceUpdate()

This commit is contained in:
Tyler Perkins 2021-12-22 20:21:05 -05:00
parent dfaeadfbb9
commit 5a9273e11b
3 changed files with 13 additions and 0 deletions

View File

@ -361,6 +361,7 @@ void board::start(){
i = ++i % PANELS_LENGTH;
OVERLAY->_title = PANELS[i]->_title;
OVERLAY->forceUpdate();
last_panel = start;
}

View File

@ -5,3 +5,13 @@
//
#include "panel.hpp"
using namespace dashboard::panel;
void panel::forceUpdate(){
if(_texture == nullptr)
initTexture();
update();
update_texture();
}

View File

@ -26,6 +26,8 @@ namespace dashboard::panel {
virtual void draw() = 0;
void forceUpdate();
//in milliseconds
size_t _time_on_screen = 0;
std::string _title;