Hi,
I'm implementing a open file dialog ( doesn't seem to exist one from the get go, correct? ). I'd love to get some feedback since I'm totaly green with CEGUI, to make sure that I'm going about this correctly and that it meshes with the general architecture of CEGUI.
I should probably start out by creating a layout file defining the different basic elements right? This seems pretty straightforward. Now the tricky part after I got the layout going is that I need to integrate it with the code back end. There doesn't seem to be any framework for dialogs, so how would one go about this? Inheritance from FrameWindow would probably grant me all the functionality I would need to contain and manage the sub elements. This doesn't feel correct at all though, I just want to create an object which take cares of the different events and updates the sub elements, and is managed by CEGUI. What is the correct way to implement such a dialog in CEGUI?
Open file dialog
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi
Yeah there are no "higher-level" elements such as common dialogs in CEGUI at present.
The way I would suggest you go about this is to have a new class that represents the dialog (not subclassed from anything in CEGUI, we're not an application framework in the same manner as MFC or similar). This new class would oversee loading the layout as needed, attaching to the current gui sheet (if you're going that route). The class would subscribe handlers to the various sub-components of the dialog to hear about user interaction and deal with those accordingly. The class would provide member functions to set the title, the initial directory and what have you, and also to fetch the current status of the dialog, and - obviously - get get the selected file and or directory
You might also like to look at the common file dialog that exists on the Ogre Wiki - here
CE.
Yeah there are no "higher-level" elements such as common dialogs in CEGUI at present.
The way I would suggest you go about this is to have a new class that represents the dialog (not subclassed from anything in CEGUI, we're not an application framework in the same manner as MFC or similar). This new class would oversee loading the layout as needed, attaching to the current gui sheet (if you're going that route). The class would subscribe handlers to the various sub-components of the dialog to hear about user interaction and deal with those accordingly. The class would provide member functions to set the title, the initial directory and what have you, and also to fetch the current status of the dialog, and - obviously - get get the selected file and or directory
You might also like to look at the common file dialog that exists on the Ogre Wiki - here
CE.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Here's another link, showing a folder selector:
http://www.cegui.org.uk/wiki/index.php/Folder_Selector
http://www.cegui.org.uk/wiki/index.php/Folder_Selector
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: No registered users and 7 guests