Picture Grid

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Darke
Just popping in
Just popping in
Posts: 2
Joined: Thu Mar 17, 2005 18:35

Picture Grid

Postby Darke » Thu Mar 17, 2005 19:09

Hello,

I'm new to CEGUI and I was looking into creating a picture 'grid' or something similar, which would essentially be a grid of several picture images from an imageSet or text-based objects. The grid would have to support a scrollbar, is selected and get selected routines, and handling mouse-based events such as double-clicking or right-clicking (this functionality already seems to be a part of the staticimage class). An optional (but very useful) feature would be the capability to drag the elements to other slots or other staticimages. The intended use is an inventory system, though this could very easily be used with text elements for calendar type applications.

After looking through the API reference for CEGUI, the only method I could find for creating such a grid with CEGUI is using several static images in a window with a grid-type background image (though I have no idea how to do the scrollbar or image dragging yet). I was wondering if there is an easier way, or if I have overlooked something else which may already allow this, since the aforementioned method seems like it would require a lot of tweaking to get it to function properly... and it seems a little much for something that's so common in many games and applications.

Thanks much
-de

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Picture Grid

Postby CrazyEddie » Thu Mar 17, 2005 19:57

If you're on the 0.2.x line of code, then it's definately a totall roll-your-own job. If you're on HEAD (still a bit unstable, probably), then there is a DragContainer widget which offers generic drag/drop support, a ScrollablePane which could handle the scrolling aspects for you, you'd still need to implement the grid layout yourself (and obviously handle the drag/drop events) but it would be fairly simple.

Another alternative is a custom ListboxItem used with the MultiColumnList (aka Grid) widget. Though you would need to implement all your own input handling for those for the time being. Some upcoming changes will solve this deficiency also, though it's a little way off and as such is of no immediate use ;)

CE

User avatar
Darke
Just popping in
Just popping in
Posts: 2
Joined: Thu Mar 17, 2005 18:35

Re: Picture Grid

Postby Darke » Thu Mar 17, 2005 20:17

Thanks for the information, CE. I am using 0.2.x but I may just give the other branch a try since it sounds like it might save a lot of time.

Take care
-de


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests