Can customize the graphics of default inventory?

Started by ras_maxim, Tue 15/06/2004 13:30:45

Previous topic - Next topic

ras_maxim

??? Please answer

Ashen

Yes, but make sure AGS is actually using the inventory GUI. You need to check the 'function show_inventory_window' part of the global script, otherwise it uses the internal one you can't edit.
Change it to:

function show_inventory_window () {
  GUIOn (INVENTORY); 
  // switch to the Use cursor (to select items with)
  SetCursorMode (MODE_USE);
  // But, override the appearance to look like the arrow
  SetMouseCursor (6);
}
I know what you're thinking ... Don't think that.

TerranRich

Status: Trying to come up with some ideas...

ras_maxim

Thank you I'll try
Please don't lock this topic yet

TerranRich

Status: Trying to come up with some ideas...

ras_maxim

ok that was simple
but i dont like the default inventory script
How do I change cursor from "inventory item" mode to "pick up an item from inventory" mode by clicking anywhere in the blank inventory GUI field?

Scorpiorus

Putting the following lines at the top of the main global script should do the trick:

function on_event(int event, int data) {

   if (event == GUI_MUP) {
      if (GetGuiAt(mouse.x, mouse.y)==INVENTORY) {
         if (GetGUIObjectAt(mouse.x, mouse.y)<=0) {
            if (GetInvAt (mouse.x, mouse.y)==-1) {
               if (character[GetPlayerCharacter()].activeinv!=-1) {
                  SetActiveInventory(-1);
                  SetCursorMode (MODE_USE);
                  SetMouseCursor (6);
               }
            }
         }
      }
   }

}

But keep in mind, it won't work if you click somewhere between the inventory items.

ras_maxim

Thanks! I am going to be permanent user of AGS..  :)
That wasnt too hard but I couldnt figure it out for myself.:P  Now I have one more question: can I make the game time "freeze" when invrntory GUI is on?

Scorpiorus

Well, if INVENTORY gui's visible property is set to PopUpModal then it automatically pauses the game.

SMF spam blocked by CleanTalk