Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: En garde! on Thu 07/04/2005 15:10:19

Title: Inventory GUI not working [SOLVED]
Post by: En garde! on Thu 07/04/2005 15:10:19
Okaay... now I'm trying to make an inventory GUI. It's in mouse ypos, it has an icon to pop up an iconbar, and an inventory window.

(http://img92.exs.cx/img92/7278/pic0013vl.jpg) (http://www.imageshack.us)

When the player clicks on a hotspot, I make it run a script on any click to give the character an inventory item.

Guess what. Nothing happens.

So... what is this inventory window missing? Here's the script for the GUI

  if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
   
     if (button == 0) {
      // They pressed the OK button, close the GUI
      GUIOn (ICONBAR);
      SetDefaultCursor();


What am I supposed to add. Feel free to tell me how stupid I am as long as you explain this to me.


Title: Re: Inventory GUI not working
Post by: Sam. on Thu 07/04/2005 15:26:32
what i "THINK" it might be, is that your inventory window, is not tall enough to contain the items, the inventory boutnds are too big and therefore will not display your items, at the start of your script (of memory) put SetInventoryBounds(height, width) and set height to a pixel smaller than the height of your inventory, also, make sure that all of your inventory items are smaller than the height of your inventory window.
Title: Re: Inventory GUI not working
Post by: En garde! on Thu 07/04/2005 16:35:48
Yeah, that was it, thanks.