summaryrefslogtreecommitdiffstats
path: root/editor/gui
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-12 09:27:42 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-12 09:27:42 -0600
commit9374e8da3282eaa3fd410877107b60b86f7911e7 (patch)
tree620a8f907d7e61890e96d986f07dbd94bb88127a /editor/gui
parent1cbe9715eaa43af86c49e9eab171775bdec07972 (diff)
parent5862da6f90b0038b070f89a6fa3cea9e3a645dfa (diff)
downloadredot-engine-9374e8da3282eaa3fd410877107b60b86f7911e7.tar.gz
Merge pull request #97946 from WhalesState/editor-spin-slider
Fix `EditorSpinSlider` grabber `TextureRect` doesn't follow parent when scrolling.
Diffstat (limited to 'editor/gui')
-rw-r--r--editor/gui/editor_spin_slider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/gui/editor_spin_slider.cpp b/editor/gui/editor_spin_slider.cpp
index 27b6bbafb7..712e91faca 100644
--- a/editor/gui/editor_spin_slider.cpp
+++ b/editor/gui/editor_spin_slider.cpp
@@ -437,7 +437,7 @@ void EditorSpinSlider::_draw_spin_slider() {
Vector2 scale = get_global_transform_with_canvas().get_scale();
grabber->set_scale(scale);
grabber->reset_size();
- grabber->set_position(get_global_position() + (grabber_rect.get_center() - grabber->get_size() * 0.5) * scale);
+ grabber->set_position((grabber_rect.get_center() - grabber->get_size() * 0.5) * scale);
if (mousewheel_over_grabber) {
Input::get_singleton()->warp_mouse(grabber->get_position() + grabber_rect.size);
@@ -731,7 +731,7 @@ EditorSpinSlider::EditorSpinSlider() {
grabber = memnew(TextureRect);
add_child(grabber);
grabber->hide();
- grabber->set_as_top_level(true);
+ grabber->set_z_index(1);
grabber->set_mouse_filter(MOUSE_FILTER_STOP);
grabber->connect(SceneStringName(mouse_entered), callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
grabber->connect(SceneStringName(mouse_exited), callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));