mirror of
https://github.com/godotengine/godot.git
synced 2024-11-15 16:43:10 +00:00
Fix unintended SpinBox mouse capture
This commit is contained in:
parent
1f5669d8d4
commit
ae2cf8eb38
@ -280,7 +280,6 @@ SpinBox::SpinBox() {
|
||||
line_edit->connect("text_entered", callable_mp(this, &SpinBox::_text_entered), Vector<Variant>(), CONNECT_DEFERRED);
|
||||
line_edit->connect("focus_exited", callable_mp(this, &SpinBox::_line_edit_focus_exit), Vector<Variant>(), CONNECT_DEFERRED);
|
||||
line_edit->connect("gui_input", callable_mp(this, &SpinBox::_line_edit_input));
|
||||
drag.enabled = false;
|
||||
|
||||
range_click_timer = memnew(Timer);
|
||||
range_click_timer->connect("timeout", callable_mp(this, &SpinBox::_range_click_timeout));
|
||||
|
@ -52,11 +52,11 @@ class SpinBox : public Range {
|
||||
void _line_edit_input(const Ref<InputEvent> &p_event);
|
||||
|
||||
struct Drag {
|
||||
float base_val;
|
||||
bool allowed;
|
||||
bool enabled;
|
||||
float base_val = 0;
|
||||
bool allowed = false;
|
||||
bool enabled = false;
|
||||
Vector2 capture_pos;
|
||||
float diff_y;
|
||||
float diff_y = 0;
|
||||
} drag;
|
||||
|
||||
void _line_edit_focus_exit();
|
||||
|
Loading…
Reference in New Issue
Block a user