inventory, save and load game issues.

Started by geork, Fri 11/09/2009 18:42:04

Previous topic - Next topic

geork

 Hey all!
  Is there a way of calling up save game GUI, load game GUI and Inventory GUI without the buttons not working from GlobalScript.ash? I have the following code:
Code: ags

   else if(upcount == 5){
   gInventory.Visible = true;
  // switch to the Use cursor (to select items with)
  mouse.Mode = eModeInteract;
  // But, override the appearance to look like the arrow
  mouse.UseModeGraphic(eModePointer);
   }
   else if(upcount == 6){
    gSaveGame.Visible = true;
  // Get the list of save games
  lstSaveGamesList.FillSaveGameList();
  if (lstSaveGamesList.ItemCount > 0)
  {
    // If there is at least one, set the default text
    // to be the first game's name
    txtNewSaveName.Text = lstSaveGamesList.Items[0];
  }
  else
  {
    // No save games yet, default empty text.
    txtNewSaveName.Text = "";
  }
  mouse.UseModeGraphic(eModePointer);
  gIconbar.Visible = false;
   }
   else if(upcount == 7){
    gRestoreGame.Visible = true;
  lstRestoreGamesList.FillSaveGameList();
  mouse.UseModeGraphic(eModePointer);
  gIconbar.Visible = false;
   }

all the code inside these upcount ifs is copied from show_save_game_dialog, show_restore_game_dialog and show_inventory_window. the problem is I cannot call any of these functions (so I had to copy script) and don't know how to call the closing functions. Is there any way I can call the GUI and have the custome buttons work?
       Thanks.

RickJ

 All GUI events are handled in the Global script.      I'm not sure what else you are asking or why?

geork

 Sorry about that...the answere was I had to put the variable back to 0 :(
   Sorry to waste forum space, I was in a panic at the time
   Thanks again anyway

SMF spam blocked by CleanTalk