mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Implement properties that recursively disables children's focus & mouse filter.
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com> Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
This commit is contained in:
parent
f2cc3f1275
commit
a49ca33a7f
8 changed files with 212 additions and 18 deletions
|
|
@ -89,12 +89,12 @@ void Slider::gui_input(const Ref<InputEvent> &p_event) {
|
|||
}
|
||||
} else if (scrollable) {
|
||||
if (mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) {
|
||||
if (get_focus_mode() != FOCUS_NONE) {
|
||||
if (get_focus_mode_with_recursive() != FOCUS_NONE) {
|
||||
grab_focus();
|
||||
}
|
||||
set_value(get_value() + get_step());
|
||||
} else if (mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) {
|
||||
if (get_focus_mode() != FOCUS_NONE) {
|
||||
if (get_focus_mode_with_recursive() != FOCUS_NONE) {
|
||||
grab_focus();
|
||||
}
|
||||
set_value(get_value() - get_step());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue