mirror of
https://github.com/godotengine/godot.git
synced 2026-02-07 19:32:36 +00:00
Optimize files that #include input.h header
This commit is contained in:
@@ -115,7 +115,7 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
|
||||
grabbing_spinner_dist_cache += diff_x * grabbing_spinner_speed;
|
||||
|
||||
if (!grabbing_spinner && Math::abs(grabbing_spinner_dist_cache) > 4 * grabbing_spinner_speed * EDSCALE) {
|
||||
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
|
||||
Input::get_singleton()->set_mouse_mode(Input::MouseMode::MOUSE_MODE_CAPTURED);
|
||||
grabbing_spinner = true;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ void EditorSpinSlider::_grab_start() {
|
||||
void EditorSpinSlider::_grab_end() {
|
||||
if (grabbing_spinner_attempt) {
|
||||
if (grabbing_spinner) {
|
||||
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
|
||||
Input::get_singleton()->set_mouse_mode(Input::MouseMode::MOUSE_MODE_VISIBLE);
|
||||
Input::get_singleton()->warp_mouse(grabbing_spinner_mouse_pos);
|
||||
mouse_over_grabber = true;
|
||||
queue_redraw();
|
||||
@@ -493,7 +493,7 @@ void EditorSpinSlider::_notification(int p_what) {
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
if (grabbing_spinner) {
|
||||
grabber->hide();
|
||||
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
|
||||
Input::get_singleton()->set_mouse_mode(Input::MouseMode::MOUSE_MODE_VISIBLE);
|
||||
Input::get_singleton()->warp_mouse(grabbing_spinner_mouse_pos);
|
||||
grabbing_spinner = false;
|
||||
grabbing_spinner_attempt = false;
|
||||
|
||||
Reference in New Issue
Block a user