[Behaviour]-Dock

Post your completed addons to share with the community

Post » Wed Apr 12, 2017 1:52 am

Awesome!! Thanks!
Check out my projects on my Google Play page.
B
27
S
11
G
1
Posts: 23
Reputation: 2,011

Post » Wed Apr 26, 2017 12:05 am

@Yaottabyte - I just noticed that apparently when you use the "set object dock to right" at runtime, that it results in the object having a X/Y of NaN and a width / height of blank.

Also, is it possible to have the object align based on the origin point of the sprite? right now it seems to align in the middle regardless of where the origin is set.

Thanks!
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Mon May 01, 2017 6:15 pm

@Yaottabyte - bump?
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Sat May 06, 2017 8:13 am

Hi @justifun im so sorry for late response, i was unable to get connected to internet lately... well i reviewed plugin functionality and for me it works good... you refers to changing edge docking during runtime, or do you mean set the edge in the editor and on start of layout its fails to dock object?... or maybe you could send me a .capx with the fail... ¿did you dowloaded the last version?

Edit: i forgot mention this, this plugin takes always the the last position of object as reference for docking and saves it internally, so when you disable the behavior its returns to that last position. If you sets param "keep size" to Enabled, the object wont be resized when docking and its will move to the chosen edge using actual coordinates as reference, e.g. if you docks to right and object is currently positioned at x=100, y=200, and have width = 100 and height = 50, will dock to the right at same Y coord in this case 200, and will have x = viewportrigth - width.
B
7
S
2
G
1
Posts: 82
Reputation: 1,058

Post » Sat May 06, 2017 8:59 am

I'll put together an example but it was when I tried to use the runtime action to set it. However I think what's happening is that since it's already docked to the left and keep size is on. That when I try to dock it to the right it gets confused or something.

So to repro it. Set to dock to left in the properties panel with keep size on. Then on start of layout set dock to right via an action.

The debug screen will show a x and y position value of NaN and the object disappears.
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Sun May 07, 2017 5:12 am

@Ya0ttabyte- so i did some tests,

It seems that if the object is set to start on the left as its default docking location, then you try and switch it to the right side via actions it will break.
even if you try and use the action "set dock to none" first,

so it appears as if the action to change a docking location as an action is broken.
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Wed May 24, 2017 4:51 pm

@Yaottabyte - any chance you can take a look at this plz?

thx
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest