mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-16 11:11:17 +00:00
Move UI dirty tracking out of application main.cpp.
This commit is contained in:
@@ -28,6 +28,20 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
static bool ui_dirty = true;
|
||||
|
||||
void dirty_set() {
|
||||
ui_dirty = true;
|
||||
}
|
||||
|
||||
void dirty_clear() {
|
||||
ui_dirty = false;
|
||||
}
|
||||
|
||||
bool is_dirty() {
|
||||
return ui_dirty;
|
||||
}
|
||||
|
||||
constexpr size_t to_string_max_length = 16;
|
||||
|
||||
static char* to_string_dec_uint_internal(
|
||||
@@ -155,7 +169,7 @@ void Widget::set_parent(Widget* const widget) {
|
||||
|
||||
void Widget::set_dirty() {
|
||||
flags.dirty = true;
|
||||
dirty_event();
|
||||
dirty_set();
|
||||
}
|
||||
|
||||
bool Widget::dirty() const {
|
||||
|
@@ -37,7 +37,9 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
extern void dirty_event();
|
||||
void dirty_set();
|
||||
void dirty_clear();
|
||||
bool is_dirty();
|
||||
|
||||
// TODO: Move these somewhere else!
|
||||
// TODO: Allow l=0 to not fill/justify? Already using this way in ui_spectrum.hpp...
|
||||
|
Reference in New Issue
Block a user