Sign in to follow this  

C# Enums

Recommended Posts

Hi everyone, I'm making a game using XNA, and for my main menu, I have an enum (MenuSelection) that holds values such as "New Game", "Multiplayer", "Options", and "Exit". I create a MenuSelection object, called mMenuSelection. The user selects a menu option by using the up and down arrow keys. To change the selection, I use mMenuSelection++ or mMenuSelection--, and this works, but my problem is that I don't know how to figure out what the int value of the current selection is. I have a totalOptions int variable that stores the total number of menu options. I want to check to see if the selected option is the last option. Sorry if this doesn't make sense, but I'm in a hurry and don't have time to proofread. Thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this