Add panel::forceUpdate()
This commit is contained in:
parent
dfaeadfbb9
commit
5a9273e11b
@ -361,6 +361,7 @@ void board::start(){
|
||||
i = ++i % PANELS_LENGTH;
|
||||
|
||||
OVERLAY->_title = PANELS[i]->_title;
|
||||
OVERLAY->forceUpdate();
|
||||
|
||||
last_panel = start;
|
||||
}
|
||||
|
@ -5,3 +5,13 @@
|
||||
//
|
||||
|
||||
#include "panel.hpp"
|
||||
|
||||
using namespace dashboard::panel;
|
||||
|
||||
void panel::forceUpdate(){
|
||||
if(_texture == nullptr)
|
||||
initTexture();
|
||||
|
||||
update();
|
||||
update_texture();
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ namespace dashboard::panel {
|
||||
virtual ~panel() = default;
|
||||
|
||||
virtual void draw() = 0;
|
||||
|
||||
void forceUpdate();
|
||||
|
||||
//in milliseconds
|
||||
size_t _time_on_screen = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user