Page 1 of 1

Need a piece of advice : how to make an inventory ?

Posted: Wed Dec 07, 2005 20:53
by Ceacy
Hi,
I would like to make an interface for a container in a rpg, and, thus, i'm looking for a widget like a combodroplist, but with images instead of text for the items, agenced in rows and colums (like on the picture). Does this kind of widgets exist ?
Image

In addition, how can i make a menu appear when i click right onto an item, whereas another action is performed when i left click on it ?

Thanks,

Ceacy.

Re: Need a piece of advice : how to make an inventory ?

Posted: Thu Dec 08, 2005 12:18
by martignasse
hi,

the widget type you'r searching for don't exist for now :(
You'll have to create it from the combodroplist by specialysing the item type.

note that if you can wait for the 0.5 version, CEGUI will be greatly extended in this erea.

For the way to manage click actions on you'r items, you have to subscribe event for these actions (leftclick and rightclic) and do what you want in there callback fonction (like puping a menu or whatever).

is it enough for a start ?

Re: Need a piece of advice : how to make an inventory ?

Posted: Thu Dec 08, 2005 16:48
by Ceacy
Yes, thanks ;)
I will try to use Drag&Drop containers, with static images in, instead of a combodroplist.