This tutorial will cover arrays, I'm basically going to show you how to right a menu system using arrays. Of course, this is just text, not the menu itself. "Think I'd give you that much code?"
Variables:
selected = 1; // Option selected
page = 0; // in 2D arrays it's wise to create a variable for the page number.
Array:
menu[0,0] = 3; // The max options for the array
menu[0,1] = "Stats";
menu[0,2] = "Save";
menu[0,3] = "Quit";
Drawing the array:
for (i=0; i<=menu[page,0]; i+=1)
{
draw_text(x,y+(i*16)-16,string(menu[page,i]
}
If you want to color your text, for the selected option, just use a simple method like this.
if (selected = i)
{
draw_set_color(c_aqua);
}
else
{
draw_set_color(c_white);
}
^. Place above draw_text.
Example of such a menu: