creating a loadfile button


22-08-2007 13:04:55

hi there,
how can i get quickgui to do the following:

i want to have a button that opens a file from the HD. i should get a window with all files from current folder and be able to surf the hd..

how hard is it ?


22-08-2007 18:58:44

As far as the code to navigate through directories, I'm not sure how that is done, or if it is OS specific. For the basic interface of an OpenFileWindow, most of it can be created with the current widget set, but one thing I would need are a MultiColumnList and ScrollBars. It would take some work, including figuring out what design you want. I'd like to make this, but there are a lot of things prior to this I'm working on. Maybe in another release or two I'll tackle this, or look into it at least.


22-08-2007 22:06:28

For directory navigation you might want to use boost filesystem library, which is entirely portable:


22-08-2007 22:36:03

Wow, thanks for the link Zini! I will definately be looking into this after v0.9.6 release. Finally, an easy way to work with the file system. :)


22-08-2007 23:41:22

Regarding the open file dialogue, I am not so sure, if it would be a good idea to include it into QuickGUI.

Now I know, that games are not the only type of applications, which are using Ogre as a rendering engine. But I guess games make up a major share and your average game won't need these otherwise commonly used windows (the open file dialogue is only one example, you could probably add a font picker, a colour picker and some more).

I am not trying to tell you how to design your library, but if I were you, I would put the open file dialogue (and other higher level GUI elements of this kind) into a separate library, which acts as an addon to QuickGUI. Thus you would still have a compact core library (IMHO QuickGUI 's compactness makes up a lot of its attractiveness), which could be used without any additional complexity or dependencies.


28-08-2007 15:11:35

well i never used boost, not sure how that would work.

so what i would need to do is create a few lists with directories/files and put them in quickGUI.

ive noticed you have a Menu in some screeshots with File, etc tabs..
thought that would do the job..
i guess this will need some thinking..