in4ray / firefly-sdk

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

2D Rows NavigationMap #13

Closed VladimirCores closed 10 years ago

VladimirCores commented 10 years ago

Hello. I just use your framework for some tests. So i need to make a two dimention grid with vertical scroll (for columns) and horizontal scroll (for rows). I try to create one Vertical NavigationMap with Horizantal NavigationMap as an elements (DataRenderer) but i have no result on scrolling horizontally. Is it possible at all to build that type of component with existing one or it must to be new one? Here is my code: https://dl.dropboxusercontent.com/u/24586727/2dNavigator.jpg

vstyran commented 10 years ago

Hi,

For now navigation map can move only in one direction. To cover your needs you can try to use two navigation maps like in example below:

hMap = new NavigationMap(); hMap.screenWidth = GameGlobals.stageSize.x; hMap.numScreens = Math.ceil(gameModel.levels.length/15); hMap.duration = 500; hMap.sensitivity = 20;

vMap = new NavigationMap(Direction.VERTICAL); vMap.screenHeight = GameGlobals.stageSize.y; vMap.numScreens = 2; vMap.duration = 500; vMap.sensitivity = 20; addElement(vMap, $width(100).pct, $height(100).pct); vMap.addElement(hMap, $width(GameGlobals.stageSize.x).px, $height(GameGlobals.stageSize.y).px, $y(0).rcpx);

VladimirCores commented 10 years ago

Thank you for your response. I tried it, it works, but it does not cover my needs.

rzarich commented 10 years ago

I've closed this issue due we haven't implemented this yet.