Fix stuck cursor in Advanced Scene Importer

Display an Arrow mouse cursor, while the mouse is moved within the
`SubViewportContainer` of the Advanced Scene Importer.
This commit is contained in:
Markus Sauermann 2023-11-09 12:50:13 +01:00
parent e5bacbc471
commit 75b4ea05a4

View file

@ -1046,6 +1046,9 @@ void SceneImportSettings::_viewport_input(const Ref<InputEvent> &p_input) {
(*rot_x) = CLAMP((*rot_x), -Math_PI / 2, Math_PI / 2);
_update_camera();
}
if (mm.is_valid() && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CURSOR_SHAPE)) {
DisplayServer::get_singleton()->cursor_set_shape(DisplayServer::CursorShape::CURSOR_ARROW);
}
Ref<InputEventMouseButton> mb = p_input;
if (mb.is_valid() && mb->get_button_index() == MouseButton::WHEEL_DOWN) {
(*zoom) *= 1.1;