Operating system or device - Godot version:
Issue description (what happened, and what was expected):
I think it would be very helpful to have ability to set Control origin point to the center, just like it's in Sprite2D node. Currently it's quite hard to make scale/rotation animations for controls, since they always will be rotated/scaled around the upper left corner.
Steps to reproduce:
Link to minimal example project (optional but very welcome):
I actually have support for this in my fork, so I could make a PR for it. Would probably like to polish it up first, but would definetly like to get it integrated since I'm using it for a lot of fancy new UI scaling features.
I think it's best to always assume, for GUI code, that the origin is in the
top left
that said, could try adding custom origin positioning for controls that you
can set using "v" like in Sprite or other nodes
On Thu, Jun 16, 2016 at 6:15 PM, SaracenOne [email protected]
wrote:
I actually have support for this in my fork, so I could make a PR for it.
Would probably like to polish it up first, but would definetly like to get
it integrated since I'm using it for a lot of fancy new UI scaling features.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5245#issuecomment-226615947,
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z2y1gjcIP1jIzxqUl3EUwwkFoNSL3ks5qMbzYgaJpZM4I3TmD
.
I mean, there is rotation and scale now, offset could work. Saracen, does
your code include offset also?
On Thu, Jun 16, 2016 at 6:23 PM, Juan Linietsky [email protected] wrote:
I think it's best to always assume, for GUI code, that the origin is in
the top left
that said, could try adding custom origin positioning for controls that
you can set using "v" like in Sprite or other nodesOn Thu, Jun 16, 2016 at 6:15 PM, SaracenOne [email protected]
wrote:I actually have support for this in my fork, so I could make a PR for it.
Would probably like to polish it up first, but would definetly like to get
it integrated since I'm using it for a lot of fancy new UI scaling features.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5245#issuecomment-226615947,
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z2y1gjcIP1jIzxqUl3EUwwkFoNSL3ks5qMbzYgaJpZM4I3TmD
.
Yeah, my implementation does make that assumption about UI positioning and treats it the same. It only adds the offset to affect the scaling and rotation point, purely asethetic from a code position, but nessecary to accomplish a lot of things you would want to do with scaling and rotation.
This was actually something I had in my first implementation, but was missing from the one which was actually added into the mainline, but it's something I forgot to mention. I still think it's very important to have to make this feature truly useful.
oh okay, if you want to make a PR adding this, also try to make sure to get
the "v" shortcut (or pivot set mode) to work to change pivot
On Thu, Jun 16, 2016 at 6:29 PM, SaracenOne [email protected]
wrote:
This was actually something I had in my first implementation, but was
missing from the one which was actually added into the mainline, but it's
something I forgot to mention. I still think it's very important to have to
make this feature truly useful.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5245#issuecomment-226619465,
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z20KB1Uz2oZgBhazTqYOJPvcy8rr8ks5qMcA_gaJpZM4I3TmD
.
Sure, I'll try to get that polished up and get a PR for it soon. I may also like to release some scripts alongside it I've written which really show off how it can be used to make really nice scalable UIs which can also adapt effectively to multiple screen resolution and aspect ratios with ease.
Saracen what happens when the controls are inside of a Container? i supose offset is ignored along with Scale and Rotation.
Has there been any progress? I need to rotate a texture frame around it's center, and it rotates around one of the corners instead...
This should be added IMO as an offset property, together with scale and
rotate, changing origin to the center is not friendly with using it as a
GUI.
On Sun, Jun 11, 2017 at 12:36 PM, Zireael07 notifications@github.com
wrote:
Has there been any progress? I need to rotate a texture frame around it's
center, and it rotates around one of the corners instead...—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5245#issuecomment-307637178,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2wLYqFLdLbuk4vqUtm9hEO8dtkmOks5sDAmDgaJpZM4I3TmD
.
This was just added, closing.
@reduz just tested, works beautifully! <3
Most helpful comment
Sure, I'll try to get that polished up and get a PR for it soon. I may also like to release some scripts alongside it I've written which really show off how it can be used to make really nice scalable UIs which can also adapt effectively to multiple screen resolution and aspect ratios with ease.