mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
Fix back button repaint/focus quirks.
This commit is contained in:
parent
7cb3bbc9f8
commit
8f8a9f2b63
2 changed files with 8 additions and 5 deletions
|
@ -59,8 +59,9 @@ SystemStatusView::SystemStatusView() {
|
|||
};
|
||||
}
|
||||
|
||||
void SystemStatusView::set_back_visible(bool new_value) {
|
||||
button_back.hidden(!new_value);
|
||||
void SystemStatusView::set_back_enabled(bool new_value) {
|
||||
button_back.set_text(new_value ? back_text_enabled : back_text_disabled);
|
||||
button_back.set_focusable(new_value);
|
||||
}
|
||||
|
||||
void SystemStatusView::set_title(const std::string new_value) {
|
||||
|
@ -193,7 +194,7 @@ SystemView::SystemView(
|
|||
{ parent_rect.width(), static_cast<ui::Dim>(parent_rect.height() - status_view_height) }
|
||||
});
|
||||
navigation_view.on_view_changed = [this](const View& new_view) {
|
||||
this->status_view.set_back_visible(!this->navigation_view.is_top());
|
||||
this->status_view.set_back_enabled(!this->navigation_view.is_top());
|
||||
this->status_view.set_title(new_view.title());
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue