mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 23:39:29 -05:00
Remove unfinished Widget last child focus code.
This commit is contained in:
parent
31499fea5d
commit
2b6bc03408
@ -49,9 +49,6 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) {
|
||||
// return;
|
||||
// }
|
||||
if( !new_focus_widget->focusable() ) {
|
||||
// New widget is not focusable. Does it have a preferred child that
|
||||
// can receive focus?
|
||||
set_focus_widget(new_focus_widget->last_child_focus());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -67,7 +64,6 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) {
|
||||
if( focus_widget() ) {
|
||||
focus_widget()->on_focus();
|
||||
focus_widget()->set_dirty();
|
||||
focus_widget()->parent()->set_last_child_focus(focus_widget());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,15 +138,6 @@ bool Widget::has_focus() {
|
||||
return (context().focus_manager().focus_widget() == this);
|
||||
}
|
||||
|
||||
Widget* Widget::last_child_focus() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Widget::set_last_child_focus(Widget* const child) {
|
||||
// Ignore.
|
||||
(void)child;
|
||||
}
|
||||
|
||||
bool Widget::on_key(const KeyEvent event) {
|
||||
(void)event;
|
||||
return false;
|
||||
|
@ -85,8 +85,6 @@ public:
|
||||
bool focusable() const;
|
||||
void set_focusable(const bool value);
|
||||
bool has_focus();
|
||||
virtual Widget* last_child_focus() const;
|
||||
virtual void set_last_child_focus(Widget* const child);
|
||||
|
||||
virtual void paint(Painter& painter) = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user