I'm using a list box to enable the player to choose music he wants to hear. the music is "picked up" during the game and may be in diffrent order for a diffrent game.
I know I can get the number of the choice the user made and it's text, but how can I compare it to the possebilities I have to know which music to play? is there a string compare function? any other way?
Sting Compare
if (StrComp(string1, string2)==0) { // Strings were equal
}
else { // Strings were NOT equal
}
List Box Text
string buf;
int item;
item = ListBoxGetSelected(GUI, LIST);
ListBoxGetText(GUI, LIST, item, buf);
if (StrComp(buf, "something")==0) { // Strings were equal
}
else { // Strings were NOT equal
}
Hope this is helpful. If not come back and ask more questions.