Ok, this is stupid...I've created a billion-well alot-of quit guis, and they all worked, this one when you click on any of the buttons they don't do anything??? What do I keep over looking lol? Here's the script..Smack me when you find my stupid mistake please 8):
if (interface == ICONBAR) {
if (button == 4) { // show inventory
show_inventory_window();
}
else if (button == 5) { // use selected inventory
if (character[ GetPlayerCharacter() ].activeinv >= 0)
SetCursorMode(4);
}
else if (button == 6) // save game
SaveGameDialog();
else if (button == 7) // load game
RestoreGameDialog();
else if (button == 8) // quit
GUIOn(QUITGUI);
else if (button == 9) // about
Display("Just Another Day[[Copyright (c) 2001-2005 Jonathan Hayes");
} // end if interface ICONBAR
if (interface == INVENTORY) {
// They clicked a button on the Inventory GUI
if (button == 1) {
// They pressed SELECT, so switch to the Get cursor
SetCursorMode (MODE_USE);
// But, override the appearance to look like the arrow
SetMouseCursor (6);
}
if (button == 2) {
// They pressed LOOK, so switch to that mode
SetActiveInventory(-1);
SetCursorMode(MODE_LOOK);
}
if (button == 3) {
// They pressed the OK button, close the GUI
GUIOff (INVENTORY);
SetDefaultCursor();
}
if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
// scroll down
game.top_inv_item = game.top_inv_item + game.items_per_line;
}
if ((button == 5) && (game.top_inv_item > 0)){
// scroll up
game.top_inv_item = game.top_inv_item - game.items_per_line;
}
if (interface == QUITGUI) {
if (button == 0) {
QuitGame (0);
}
if (button == 2) {
GUIOff (QUITGUI);
}
if (button == 1) {
Display("WHAT!? ARE YOU TRYING TO CHEAT!!! Save often");
GUIOff (QUITGUI);
}
}
}
Oh, and that smiley-in the script-is supposed to be an 8...