From 070007d0a151b873b0791e7ee66cb57117658663 Mon Sep 17 00:00:00 2001 From: Micky Date: Mon, 1 Jul 2024 10:26:13 +0200 Subject: [PATCH] Restore cursor change when using Color Picker --- scene/gui/color_picker.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index a2aee353f99d..1234ef4febd0 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -1514,6 +1514,7 @@ void ColorPicker::_pick_button_pressed() { add_child(picker_window, false, INTERNAL_MODE_FRONT); } picker_window->popup(); + Input::get_singleton()->set_default_cursor_shape(Input::CURSOR_CROSS); } void ColorPicker::_pick_finished() { @@ -1529,6 +1530,7 @@ void ColorPicker::_pick_finished() { is_picking_color = false; set_process_internal(false); picker_window->hide(); + Input::get_singleton()->set_default_cursor_shape(Input::CURSOR_ARROW); } void ColorPicker::_pick_button_pressed_legacy() { @@ -1545,7 +1547,6 @@ void ColorPicker::_pick_button_pressed_legacy() { picker_texture_rect = memnew(TextureRect); picker_texture_rect->set_anchors_preset(Control::PRESET_FULL_RECT); picker_window->add_child(picker_texture_rect); - picker_texture_rect->set_default_cursor_shape(CURSOR_POINTING_HAND); picker_texture_rect->connect(SceneStringName(gui_input), callable_mp(this, &ColorPicker::_picker_texture_input)); picker_preview = memnew(Panel); @@ -1604,6 +1605,8 @@ void ColorPicker::_pick_button_pressed_legacy() { picker_window->set_size(screen_rect.size); picker_preview->set_size(screen_rect.size / 10.0); // 10% of size in each axis. picker_window->popup(); + + Input::get_singleton()->set_default_cursor_shape(Input::CURSOR_CROSS); } void ColorPicker::_picker_texture_input(const Ref &p_event) {