Page 1 of 1

File Requester and Ogre question:)

Posted: Wed Jan 25, 2006 19:11
by Noob24
Hello,


i am new in C++ programming and last week i gave Ogre and CEGUI a try.
Made good progress and started to create an Terrain Editor.
Now i am stuck because i cant find a File Requester in CEGUI.
To make my own i need to find a way to retreive a Directory in C++ (using VC++ Express 05, WinXP).
I searched 10 hours without any result.
Anyone could give me a hint?


A second question:
In Ogre CEGUI Tutorial, in void createScene(void):

CEGUI::PushButton* RotateButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", (CEGUI::utf8*)"Rotate");
mEditorGuiSheet->addChildWindow(RotateButton);
RotateButton->setPosition(CEGUI::Point(0.0f, 0.2));
RotateButton->setSize(CEGUI::Size(0.3f, 0.1f));
RotateButton->setText("Test");

Works nice and i got a button.

Now i wonder if its possible to change the Text of the
Button in a FrameListener.

I added a Global: CEGUI::Window* LoadButton;
And added: RotateButton->setText("OtherText"); in the FrameListener.
That causes the app. to freze. Memory Leak.

Is it possible to change text of that button?
Any clue what happens here? :?


Would be cool if anyone could help me further.

Re: File Requester and Ogre question:)

Posted: Sat Feb 04, 2006 20:06
by CrazyEddie
There is an example of a ready made file requester using CEGUI on the Ogre Wiki

Getting a directories contents is platform dependant - i.e. there is no pure C++ means for doing this without using some API of the platform, since you're on Win32 a quick search of MSDN should yield some results ;) Having said this, the above example on the Ogre Wiki already does what is required on Win32.

Setting the text should work ok, you'll need to provide some proper diagnostics and some code for people to look at - we're not magicians!

Hope this helps a little.

CE.

Re: File Requester and Ogre question:)

Posted: Mon Feb 06, 2006 07:56
by martignasse
hi Noob24,

for you'r requester question, you can download Testaskin from this thread where you'll see the above mentionned requested in action and can look at sources to see how it is pluged.

hope it help

Posted: Fri Feb 10, 2006 02:48
by Noob24
Thank you guys.
If i try that example i get a linker error like:

error LNK2019: unresolved external symbol "public: __thiscall CEGUI::CCommonFileDialog::CCommonFileDialog(void)" (??0CCommonFileDialog@CEGUI@@QAE@XZ) referenced in function "public: static class CEGUI::CCommonFileDialog & __cdecl CEGUI::CEGUISingletonX<class CEGUI::CCommonFileDialog>::getSingleton(void)" (?getSingleton@?$CEGUISingletonX@VCCommonFileDialog@CEGUI@@@CEGUI@@SAAAVCCommonFileDialog@2@XZ)


I get same error in my app as soon i put this lines in:

mEditorGuiSheet= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow", (CEGUI::utf8*)"Sheet");
mGUISystem->setGUISheet(mEditorGuiSheet);
mEditorGuiSheet->addChildWindow(CEGUI::CommonFileDialog::getSingleton().getWindow());


My VC8 Add. CEGUI Dependencies are: CEGUIBase_d.lib
I tried CEGUI which comes with Azatoth SDK and Azatoth with CEGUI 0.4.1.
Any ideas :?:

Posted: Fri Feb 10, 2006 14:35
by Noob24
Mh, in that example, i wonder what CEGUICommonFileDialog.cpp is good for.
What to do with CEGUICommonFileDialog.cpp?
Is it needed to build Demo_Gui2.cpp?

Posted: Fri Feb 10, 2006 17:09
by Noob24
Think i got it, was a simple fault in Ogres example code.
http://www.ogre3d.org/phpBB2/viewtopic. ... 718#127718