Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nykomic

Pages: [1]
1
Support / Re: scrollable area "next element"
« on: June 09, 2014, 06:36:01 pm »
I've made a quick made extension to add snapping few months ago
It needs some code cleaning and fix but you know... :)

http://bit.ly/1hAV5S6

@unikronsoftware: You can do what you want with, and don't know if it's quick to include in 2DToolkit

2
Support / UIScrollableArea content length with UILayoutContainerSizer
« on: March 20, 2014, 01:55:44 pm »
I have a tk2dUIScrollableArea with content layout container that contains 3 UI Layout (fixed size - ex: 200px)

[Editor mode]
When i click on "Calculate content length", I have the "GetRendererBoundsInChildren" length = ex: 500px because my last sprite on the third UILayout do not stick to right side (there is 100px of "empty space").

It is not correct for me, I expect the length of all UILayout (+margin)
So : 3x200px = 600px
In [Play Mode] if I regenerate the tk2dUILayoutContainerSizer, it changes my tk2dUIScrollableArea 's content length to 600px.
This is correct.

In other words, I think there is 2 modes :
- manual UIScrollable Area => must return GetRendererBoundsInChildren
- UILayout based UIScrollable Area => must return UILayout container sizer length (regardless sprite renderer) (If I choose to have 10*200px  UILayouts empty, I expect 2000px as length)

As a workaround I set content length manually with play mode value.
What do you think ? Is it normal or not ? There is another way ?

And some features ideas :
- get/set an explicit size for a tk2dUILayout (currently we can move the bounds but we do not know exactly the size)
- like InterfaceBuilder, can choose if the sprite must be scaled/stretch (x/y) or not (centered) (UILayout Edit Mode)
(see attached file : http://www.techotopia.com/images/0/04/Iphone_autosize_margins_set.jpg)

Thanks!

ps: sorry for my english ;)

----------- EDIT
Erf, I just see that I have correct values if i regenerate UILayout container sizer in Editor mode too.
So I must be careful to not click on "Calculate content length" ^^

Pages: [1]