• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

5 replies to this topic

### #1MrPhoenix  Members

Posted 18 July 2013 - 06:38 PM

im trying to figure out the logic to use for my navigation for my application!

im trying to copy the look and feel of the ps3 xmb interface

Im just trying to do the X-Axis part of it now!

this is my concept for the x-axis navigation but it fails as of right now!

http://pastebin.com/kXriyJgY

### #2MrPhoenix  Members

Posted 18 July 2013 - 08:13 PM

anyone ?????????

### #3Khatharr  Members

Posted 18 July 2013 - 08:29 PM

Calm down, man. Give people a chance to see it.

I'm looking at it now.

----------------------------------------

What's stopping you from doing this the way you want? You have written in the comment there a suggestion for a better method, but you're not implementing it. I'd actually suggest against using a separate function to calculate the position in this case. It's not complex enough to merit it.

Looking at the switch statements, your base x offset is 116, and it increases inversely to navX in steps of 150.

That is:

base_ox = 166 + ((4 - navX) * 150);

Is that where you're caught?

Edited by Khatharr, 18 July 2013 - 08:46 PM.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

### #4MrPhoenix  Members

Posted 18 July 2013 - 09:27 PM

it dont work like that, all the icon are together and move together,

navX is the current selection on the x axis grid

#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include "functions.h"
#include "controls.h"

extern SDL_Surface *screen;
extern navX,navY;
SDL_Surface *themeRes[11];

void interfaceTheme(void)
{
themeRes[0] = IMG_Load("Resource/theme/basic/icon_user.png"); // user icon
themeRes[1] = IMG_Load("Resource/theme/basic/icon_player.png"); // player/user sub icon
themeRes[2] = IMG_Load("Resource/theme/basic/icon_newuser.png"); // new user icon
themeRes[3] = IMG_Load("Resource/theme/basic/icon_music.png"); // main music icon
themeRes[4] = IMG_Load("Resource/theme/basic/icon_music_album_default.png"); // group music icon
themeRes[5] = IMG_Load("Resource/theme/basic/icon_music_default.png"); // default song icon
themeRes[6] = IMG_Load("Resource/theme/basic/icon_usb.png"); // default usb icon
themeRes[7] = IMG_Load("Resource/theme/basic/icon_network.png"); // default network icon
themeRes[8] = IMG_Load("Resource/theme/basic/icon_setting.png"); // settings icon
themeRes[9] = IMG_Load("Resource/theme/basic/icon_update.png"); // update icon
themeRes[10] = IMG_Load("Resource/theme/basic/icon_poweroff.png"); // poweroff icon
}

void OrbisInterface(void)
{

SDL_FillRect(screen,NULL,0x000000);

blit(166 + ((4 - navX) * 150),125,themeRes[0],screen);
blit(166 + ((4 - navX) * 150),125,themeRes[2],screen);
blit(166 + ((4 - navX) * 150),125,themeRes[8],screen);
blit(166 + ((4 - navX) * 150),125,themeRes[7],screen);

SDL_Flip(screen);

}


### #5MrPhoenix  Members

Posted 18 July 2013 - 10:30 PM

sorry figured out blit(166 + ((input - navX) * 150),125,themeRes[0],screen);  input was the icon number thanks

### #6Khatharr  Members

Posted 19 July 2013 - 01:57 AM

sorry figured out blit(166 + ((input - navX) * 150),125,themeRes[0],screen);  input was the icon number thanks

Closer... If that works for you then I suppose it's fine.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.