You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix unintended SpinBox mouse capture
(cherry picked from commit ae2cf8eb38)
This commit is contained in:
@@ -300,7 +300,6 @@ SpinBox::SpinBox() {
|
|||||||
line_edit->connect("text_entered", this, "_text_entered", Vector<Variant>(), CONNECT_DEFERRED);
|
line_edit->connect("text_entered", this, "_text_entered", Vector<Variant>(), CONNECT_DEFERRED);
|
||||||
line_edit->connect("focus_exited", this, "_line_edit_focus_exit", Vector<Variant>(), CONNECT_DEFERRED);
|
line_edit->connect("focus_exited", this, "_line_edit_focus_exit", Vector<Variant>(), CONNECT_DEFERRED);
|
||||||
line_edit->connect("gui_input", this, "_line_edit_input");
|
line_edit->connect("gui_input", this, "_line_edit_input");
|
||||||
drag.enabled = false;
|
|
||||||
|
|
||||||
range_click_timer = memnew(Timer);
|
range_click_timer = memnew(Timer);
|
||||||
range_click_timer->connect("timeout", this, "_range_click_timeout");
|
range_click_timer->connect("timeout", this, "_range_click_timeout");
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ class SpinBox : public Range {
|
|||||||
void _line_edit_input(const Ref<InputEvent> &p_event);
|
void _line_edit_input(const Ref<InputEvent> &p_event);
|
||||||
|
|
||||||
struct Drag {
|
struct Drag {
|
||||||
float base_val;
|
float base_val = 0;
|
||||||
bool allowed;
|
bool allowed = false;
|
||||||
bool enabled;
|
bool enabled = false;
|
||||||
Vector2 capture_pos;
|
Vector2 capture_pos;
|
||||||
float diff_y;
|
float diff_y = 0;
|
||||||
} drag;
|
} drag;
|
||||||
|
|
||||||
void _line_edit_focus_exit();
|
void _line_edit_focus_exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user