Did you ever created a Sierra-style game and didn't get 5 cups because the inventory GUI was different? Or, did you wonder why you're wasting so much of your screen with a giant GUI, although you sometimes only need space for 3 items?
Well.... too bad I can't help.... nah, just kidding!
The SierraInv module helps you to create a inventory GUI familar to the ones in the old Sierra-classics, wihich changes its size depending on the amount of items the player's carrying!
Also, you can add your own, completely custom GUI as an iconbar. (Just read the readme and try the demo game ;) )
Download Link:
-> http://dfoh.df.funpic.de/data/SierraInv%201.0.zip (http://dfoh.df.funpic.de/data/SierraInv%201.0.zip)
Demo game:
-> http://dfoh.df.funpic.de/data/SierraInv_Demo.7z (http://dfoh.df.funpic.de/data/SierraInv_Demo.7z)
=>Video demonstration<= (http://www.youtube.com/watch?v=Lzp8GVdtuHU)
Requirements: AGS 3.0 ; other modules/plugins: none
This is my first script module, so don't hesitate to slap me until I'm only red goo :P
At first I thought this thread was a joke or something, because AGS already comes with a sort of Sierra-style inventory. Maybe mention its automatic resizability to the thread title? :)
Thanks, did that.
Do you want me to do a video demonstration and upload it to YouTube? Are there enough sample inventory items in the demo game to test it out fully?
Say, that would be really nice! There is actually an unlimited amount of items, because you can pick up one as often as you want.
Like I said in another module thread, every module should come with a video demonstration. Just get a free recording program like CamWhateverItsCalled and upload!
Okay, video is added.
Hmm, doesn't seem to work 100%. Should this really be "version 1.0"? ;)
Some suggestions:
- use a struct and group the Set* functions together:
void SierraInv::SetUp(int MaxWidth, int MaxHeight, ...)
- the module relies on two GUIs and their controls already existing and having specific names, ideally the player should tell the module which GUI to use and it'll work from there
I'd do this:
In game_start, the user calls e.g. SierraInv.SetGui(GUI*g);
The module looks through its controls for an InvWindow and reads out/calculates all the dimensions and margins.
Using on_event/eEventAdd/LoseInventory, the module then resizes the GUI and InvWindow, repositioning all controls automatically.
Basically, a simple coordinate relation should reveal the layout of the GUI's controls and should suffice to determine the necessary changes to the other controls' positions.