Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zoom controls to Sprite2DPlugin converter preview #84353

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented Nov 2, 2023

Implements partially godotengine/godot-proposals#8294
Sprite2D's convert tool's preview is hard to make out details if you want to use it for pixel art on a high resolution display:
kuva
Or high resolution assets on a standard resolution display:
kuva
Also in either case studying closer details is hard without zoom function.

This pr implements zooming controls for the preview. Also the initial view is zoomed in so that the whole texture is in view:
zooming

@KoBeWi
Copy link
Member

KoBeWi commented Nov 5, 2023

You need to setup ViewPanner:

case NOTIFICATION_ENTER_TREE:
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
uv_panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aXu-AP
Copy link
Contributor Author

aXu-AP commented Nov 7, 2023

Rebased now.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 4, 2024
@akien-mga akien-mga merged commit 8a716e3 into godotengine:master Jan 4, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants