Jump to content
  • Advertisement
Sign in to follow this  
Dasil

C# Enums

This topic is 3019 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!