[DONE] Panel Sprites - Edit Points

Sticking Panel sprites to object1 and Changing the Size of object1 lets the panel sprite scale wrong since you need to put the center and origin point (of the panel sprite) on top of each other to make it scale correct.

But on panel sprites there is no way to change the points, I know its almost not possible but an option to put the origin and center point on top of each other (up leftt) could be possible.

@davy solved the problem
[DONE] Panel Sprites - Edit Points - #9 by davy

3 Likes

This is very needed, there is no way to tween sticked panel sprites sizes without it bugging around. This happens on fonts too.

1 Like

For context, how exactly would you imagine a custom point working on a panel sprite?

Iā€™m not sure I could see how itā€™d be possible. The dimensions are not fixed on panel sprites, and therefore the center canā€™t be a fixed point/defined point. Likewise the origin would change as its adjusted (being one of the only objects that can extend to the left without being moved)

1 Like

I didnā€™t quite understand. So even an option to set the center to the top left (where the origin point is) wouldnā€™t be possible? An option to automaticly set the points always on the top left bounding box.

I use 9patch sprites and fonts for buttons and frames, these are often sticked to insivible sprites used as anchors to move and resize multiple objects at once for making different animations.

1 Like

You are right, Kenabi.

Lack of relative positioning for points quickly became a limitation for me while working with panel sprites and text.

Unity has this, and more: Unity - Manual: Sprite Editor

Itā€™s been ages since I used Unity, but I thought on 9-splice you could only modify their pivot points for the 3D camera or how theyā€™re sorted? Iā€™m not seeing details on your link about custom origins or rotational info for 9-splice but if you have links to the specifics thatā€™d be amazing as Iā€™d love that feature as well.

I know PixiJS has the concept of Anchors (percentage relative/non-fixed pivots) but only for base sprites (not tiled/panel sprites). Is Unityā€™s solution for panel/9-slice sprites similar to that?

For text, I actually wonder if they could apply the methods for Anchors to at least Bitmap Text, since thatā€™s rendered as a sprite as far as I know, where as Text/BBText are using the Browser/OSā€™s text renderer.

We all seem to agree that it would be a good feature for Gdevelop, so the extent of Unityā€™s support is irrelevant no?

Pivots can exist for any object which has boundaries, regardless of the rendering technology. 9-patch resolves to a rectangle in the end, just like a regular sprite.

I definitely agree. The PixiJS concept of Anchors (Relational percentage) could work for things without fixed dimensions like Tiled Sprites/Panel Sprites/Bitmap text, I was just wanting to see context from another engine to potentially make it easier for the devs to implement the logic.

Since PixiJS anchors donā€™t support other object types outside of base sprites, itā€™d be custom functions. Not end of the world in complexity or anything, but something maintained by the renderer devs (rather than custom functions by the GDevelop team or contributors) is always preferred.

To come back to the initial need, it seems that what you want is a fix to the Sticker extension. I did a quick fix that probably doesnā€™t solve any issue this extension may have but should fix what you described.
Please try with Sticker 0.5.1 and let us now if you still have issues.

1 Like

Great stuff, it works as how I wanted it to be.

Thank you very much sir!