Add ability to cancel rotation from viewport rotation gizmo

This commit is contained in:
Robert Yevdokimov
2025-01-09 16:56:29 -05:00
parent 6f3cc27423
commit a8f3c9727e
2 changed files with 34 additions and 5 deletions

View File

@@ -85,6 +85,7 @@ class ViewportRotationControl : public Control {
Vector2i orbiting_mouse_start;
int orbiting_index = -1;
int focused_axis = -2;
bool gizmo_activated = false;
const float AXIS_CIRCLE_RADIUS = 8.0f * EDSCALE;
@@ -413,6 +414,7 @@ private:
// so one cursor is the real cursor, while the other can be an interpolated version.
Cursor cursor; // Immediate cursor
Cursor camera_cursor; // That one may be interpolated (don't modify this one except for smoothing purposes)
Cursor previous_cursor; // Storing previous cursor state for canceling purposes
void scale_fov(real_t p_fov_offset);
void reset_fov();