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

Proportional scaling in IDE #6160

Open
Bouh opened this issue Jan 8, 2024 · 8 comments
Open

Proportional scaling in IDE #6160

Bouh opened this issue Jan 8, 2024 · 8 comments
Labels
✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop

Comments

@Bouh
Copy link
Collaborator

Bouh commented Jan 8, 2024

Description

Its very common in IDE and drawing app, to use ALT + the handles on a sprite to rescale the sprite on both side at same time based on the center.
While Shift is scalling on all side from the top left corner.

Here I'm requesting for the Alt use.

Presently with Shift in GDevelop:
ss

Expected with Alt (example from Figma):
Animation

@Bouh Bouh added ✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop labels Jan 8, 2024
@al-humea
Copy link

al-humea commented Feb 8, 2024

Hey 👋
Me and @blqis are students at the Paris 8 University (France) and we'd love to be assigned to this task as part of our "free software development" course !

@Bouh
Copy link
Collaborator Author

Bouh commented Feb 8, 2024

Hi @al-humea I think you can take it, no one has started to work on it yet.

@D8H
Copy link
Collaborator

D8H commented Mar 1, 2024

Object instances are resized by the InstancesResizer class:

export default class InstancesResizer {

The shift key is checked by shouldResizeProportionally:

const proportional =
forceProportional || this.keyboardShortcuts.shouldResizeProportionally();
this.instancesResizer.resizeBy(
selectedInstances,
sceneDeltaX,
sceneDeltaY,
grabbingLocation,
proportional,
this.keyboardShortcuts.shouldNotSnapToGrid()
);

But, personally, I think this issue may not really a "good 1st issue" as the scene editor is a bit hard to grasp.

@D8H
Copy link
Collaborator

D8H commented Mar 1, 2024

Actually, this feature already exists. You can use Shift to scale an instance proportionally.

@Bouh
Copy link
Collaborator Author

Bouh commented Mar 1, 2024

Actually, this feature already exists. You can use Shift to scale an instance proportionally.

No, sorry, Shift doesn't do the same thing.
Try more editors than GDevelop, Figma for example, or Photoshop.
I'm talking about Alt use resizing on both side from the center, not Shift that resize proportionally from the origin point mostly on top left corner in GD.

Expected with Alt (example from Figma):
Animation

Presently with Shift in GDevelop:
ss

@sundhar010
Copy link

If no one is working on this I would like to give it a try.

@DavidMLPalma
Copy link
Contributor

Hi @sundhar010 !
Are you working on this or can my friend and I give it a go?

@sundhar010
Copy link

Hi @sundhar010 ! Are you working on this or can my friend and I give it a go?

Sure

LeonardoAlvess added a commit to LeonardoAlvess/GDevelop that referenced this issue May 22, 2024
While holding the Alt key and resizing an instance, both sides are resized. This was achieved by doubling the scaling factor and updating the new X and Y coordinates without using a fixedPoint.
Closes issue 4ian#6160

Co-authored-by:  David Palma <david.palma@tecnico.ulisboa.pt>
LeonardoAlvess added a commit to LeonardoAlvess/GDevelop that referenced this issue May 22, 2024
While holding the Alt key and resizing an instance, both sides are
 resized. This was achieved by doubling the scaling factor and
 updating the new X and Y coordinates without using a fixedPoint.
Closes issue 4ian#6160

Co-authored-by:  David Palma <david.palma@tecnico.ulisboa.pt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop
Projects
None yet
Development

No branches or pull requests

5 participants