diff options
Diffstat (limited to 'src/gui/Widget.cpp')
-rw-r--r-- | src/gui/Widget.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/Widget.cpp b/src/gui/Widget.cpp index 1dc4d98..3e966e5 100644 --- a/src/gui/Widget.cpp +++ b/src/gui/Widget.cpp @@ -16,4 +16,18 @@ namespace gsr { mgl::vec2f Widget::get_position() const { return position; } + + void Widget::set_widget_as_selected_in_parent() { + if(parent_widget) { + parent_widget->selected_child_widget = this; + parent_widget->set_widget_as_selected_in_parent(); + } + } + + void Widget::remove_widget_as_selected_in_parent() { + if(parent_widget && parent_widget->selected_child_widget == this) { + parent_widget->selected_child_widget = nullptr; + parent_widget->remove_widget_as_selected_in_parent(); + } + } }
\ No newline at end of file |