Wintermute Engine > Technical forum

Put an inventory icon on the screen

(1/1)

SANNOI:
Hi!

I've already programmed the interface of my game but I've got a problem. I'm trying to put an inventory icon on the screen (like Sam'n'Max), then I've created a global entity which is my icon. In the scenes without scroll, this entity is seen without problem but in the scenes with scroll it's fixed in a point (it doesn't move with the scroll)

I put this code in the main loop of the game daemon script.


--- Code: ---global invIcon = Game.LoadEntity("interface\system\inv\inv.entity");

while(true){
  invIcon.SkipTo(60,40);
  invIcon.Active=true;

  [...]

}

--- End code ---

Can anybody(Mnemonic) help me?

Thanks

SANNOI

Mnemonic:
I don't think the entity is the right solution here, because the entities are part of the scene. A "window" would be much more suitable for this. Just create a transparent window, covering the whole screen, and the window will containt one button (-> your inventory icon).

Something like this:


--- Code: ---WINDOW
{
  X = 0
  Y = 0
  WIDTH = 800
  HEIGHT = 600
  TRANSPARENT = TRUE
 
  BUTTON
  {
    NAME = "Inventory"
    X = 20
    Y = 20
    IMAGE = "inventory_icon.bmp"
    SCRIPT = "blah.script"
  }
}

--- End code ---

You will then load the window in game.script using


--- Code: ---var WinInventoryIcon = Game.LoadWindow("blahblah.window");

--- End code ---

Navigation

[0] Message Index

Go to full version