tags:

views:

849

answers:

1

I'm trying to develop an app using XNA and for state management I'm using the sample provided by the XNA Creators Club here - http://creators.xna.com/en-US/samples/gamestatemanagement

My app will be something like this:

IntroScreen --> Menu --> AppScreen
                     | 
                     |-> SomeOtherScreen
                     |
                     |-> CreditsScreen
                     |
                     |-> Exit

The AppScreen will show more info about a item that was selected from a listbox in Menu So in Menu i have a list whit lots of items(about 1000) and the users selects one and when he clicks a button the AppScreen will come showing that item and additional info about it.
Now my question is how can i pass a parameter(the item id) to the AppScreen from the Menu?

Anybody having experience with XNA that can point me into the right direction?
Thanks.

+1  A: 

The same way you would with any other object. If you have a single copy to the app screen then have the Selected event also set up item number. If you create a new app screen then have the ctor take the item number.

mlk