Fixed issue #11893 (SpinBox Capturing mouse)
To prevent the SpinBox from capturing mouse, added a "drag.allowed" variable that is set to true only when clicking inside the control. Entering the control with the left mouse button pressed will not trigger drag anymore. Also modified the value update code when dragging so it does not modify the base_val.
This commit is contained in:
committed by
RodZill4
parent
fa024537a3
commit
0838eca063
@ -54,10 +54,10 @@ class SpinBox : public Range {
|
||||
|
||||
struct Drag {
|
||||
float base_val;
|
||||
bool allowed;
|
||||
bool enabled;
|
||||
Vector2 from;
|
||||
Vector2 mouse_pos;
|
||||
Vector2 capture_pos;
|
||||
float diff_y;
|
||||
} drag;
|
||||
|
||||
void _line_edit_focus_exit();
|
||||
|
||||
Reference in New Issue
Block a user