xboxscene.org forums

Author Topic: Xbox App  (Read 54 times)

webscripter

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Xbox App
« on: February 21, 2004, 03:54:00 AM »

How could you make a GUI for the xbox.  I want to make an app for a game (like HCE) running on the xbox but I'm not shure how to make the buttons, etc.  like on HCE.  Do I just place buttons, text,... on my screen using directx and then switch from one to another using the gamepad or is there an easier way?
Logged

heinrich

  • Archived User
  • Hero Member
  • *
  • Posts: 2274
Xbox App
« Reply #1 on: February 23, 2004, 11:59:00 AM »

A basic menu is pretty simple: (psuedo code)

int menu_position = 1;


If menu_postion == 1; color = red; else color = blue;
output first menu item;

If menu_postion == 2; color = red; else color = blue;
output second menu item;

If menu_postion == 3; color = red; else color = blue;
output third menu item;


getinput()
If (up.button.pressed && menu >1)
menu_position += 1;
else if (down.button.pressed && menu <3)
menu_position -+= 1;
else if (a.button.pressed)
switch (menu_position)
case 1: gotofirstmenushit();
break;
case 2: 2nd menu shit
break;
case 3: 4rd menu shit
break;
default: you fucked up somewhere
Logged

webscripter

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Xbox App
« Reply #2 on: February 23, 2004, 12:05:00 PM »

tnx, this helps.
so I just draw the buttons on screen using direct3d and use the color int?
btw, I'm currently downloading the xdk but I'm not sure of what functions I can use in my program, does it have an included tutorial of what functions are available?  I need to know what function to use to read/write ini's.
Logged

heinrich

  • Archived User
  • Hero Member
  • *
  • Posts: 2274
Xbox App
« Reply #3 on: February 23, 2004, 12:16:00 PM »

CODE
m_pArial18BitmapFont->SetTextColor(D3DCOLOR_XRGB(255,255,255));

If you are using actual images, you could just have an 'up' image, and 'down' image, one for selected, the other for not.  I havent ran HCE, so I totally lost as to its UI.

there are some good tutorials over at xfactordev.net and some of the guys in #xfactor on efnet are wonderful resources (just ignore kl0wn tongue.gif)

there are also several open source games that you might want to look at.
Logged

webscripter

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Xbox App
« Reply #4 on: February 24, 2004, 12:22:00 AM »

so I don't have to use MS's ini api?  I can just search for [sectionx] and [sectionx+1] and search in between them?
Logged

webscripter

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Xbox App
« Reply #5 on: February 24, 2004, 10:26:00 AM »

ok, I found a way:
I search the strings of the .ini file until I find the [section] string.
I still have a question:
if i have something like this:
[section]
name = name1
width = 100
height = 100

[section]
name = name2
...

I already coded to find the right section if you know the name.  My question is how you can retrieve the value if you search for height or something?
Logged

webscripter

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Xbox App
« Reply #6 on: February 24, 2004, 09:11:00 PM »

tongue.gif
Logged