mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 16:47:32 +00:00
Savestate ! RDS (only PSN) tx
This commit is contained in:
@@ -356,14 +356,23 @@ void Button::set_text(const std::string value) {
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
void Button::set_style(const Style* new_style) {
|
||||
if( new_style != style_ ) {
|
||||
style_ = new_style;
|
||||
set_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
std::string Button::text() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void Button::paint(Painter& painter) {
|
||||
const auto r = screen_rect();
|
||||
|
||||
if (style_ == nullptr) style_ = &style();
|
||||
|
||||
const auto paint_style = (has_focus() || flags.highlighted) ? style().invert() : style();
|
||||
const auto paint_style = (has_focus() || flags.highlighted) ? style_->invert() : *(style_);
|
||||
|
||||
painter.draw_rectangle(r, style().foreground);
|
||||
|
||||
|
Reference in New Issue
Block a user