in4ray / firefly-sdk

Firefly - in4ray Gaming SDK
http://firefly.in4ray.com
Other
54 stars 11 forks source link

Allways center NavigationMap element #14

Closed VladimirCores closed 10 years ago

VladimirCores commented 10 years ago

Hello. I want my objects in navigation map always be at center related to the screen size, but i really do not know his size (add offset to other), because it's will be done by designer work. So how to do that, how to center object in screen of navigation map? I find one solution, by adding one quad beneath graphics, but i don't need extra unnecessary element to be render. https://dl.dropboxusercontent.com/u/24586727/Images/03.03.jpg

UPDATE: I make it by setting proper object offset inside ItemRenderer But it will be nice to have that built-in (2 parameters: size and offset in pixels or relative to screen size)

VladimirCores commented 10 years ago

Also i have lost every even element on NavigationMap at my ipad.

Updated: Sorry i was my fall, i forgot to add contextFactor to screenWidth screenWidth = (container as NavigationMap).screenWidth / contextFactor;

vstyran commented 10 years ago

Hi, please refer to http://in4ray.blogspot.com/2013/02/firefly-part-4-layouting-system.html for more info about layouting system

VladimirCores commented 10 years ago

Ok, Thank you. I got it : )