Okay, lets say I've got an enum eMusicBand declared:
enum eMusicBand
{
BAND_SickOfItAll,
BAND_BadBrains,
BAND_MinorThreat,
BAND_Cro-Mags,
BAND_Fugazi,
};
I've got a eMusicBand variable 'CurrentBand' and I've got a button in a UWindow, and now, if someone clicks the button, I want 'CurrentBand' to take the 'next' value, e.g. if CurrentBand==BAND_BadBrains , this would be BAND_MinorThreat. Is there a way to do this, except, of course, to write a long switch statement like
Switch (CurrentBand)
{
Case BAND_MinorThreat:
CurrentBand = BAND_CroMags;
break;
...
}
I mean, something like CurrentBand++ (doesn't work of course), I thought this should be possible, since each item in an enum does have an int value...
Thanks in advantage,
RiP
enum eMusicBand
{
BAND_SickOfItAll,
BAND_BadBrains,
BAND_MinorThreat,
BAND_Cro-Mags,
BAND_Fugazi,
};
I've got a eMusicBand variable 'CurrentBand' and I've got a button in a UWindow, and now, if someone clicks the button, I want 'CurrentBand' to take the 'next' value, e.g. if CurrentBand==BAND_BadBrains , this would be BAND_MinorThreat. Is there a way to do this, except, of course, to write a long switch statement like
Switch (CurrentBand)
{
Case BAND_MinorThreat:
CurrentBand = BAND_CroMags;
break;
...
}
I mean, something like CurrentBand++ (doesn't work of course), I thought this should be possible, since each item in an enum does have an int value...
Thanks in advantage,
RiP