File Requester and Ogre question:)

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Noob24
Just popping in
Just popping in
Posts: 4
Joined: Wed Jan 25, 2006 17:02

File Requester and Ogre question:)

Postby Noob24 » Wed Jan 25, 2006 19:11

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.

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

Re: File Requester and Ogre question:)

Postby CrazyEddie » Sat Feb 04, 2006 20:06

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.

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: File Requester and Ogre question:)

Postby martignasse » Mon Feb 06, 2006 07:56

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

User avatar
Noob24
Just popping in
Just popping in
Posts: 4
Joined: Wed Jan 25, 2006 17:02

Postby Noob24 » Fri Feb 10, 2006 02:48

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 :?:

User avatar
Noob24
Just popping in
Just popping in
Posts: 4
Joined: Wed Jan 25, 2006 17:02

Postby Noob24 » Fri Feb 10, 2006 14:35

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?

User avatar
Noob24
Just popping in
Just popping in
Posts: 4
Joined: Wed Jan 25, 2006 17:02

Postby Noob24 » Fri Feb 10, 2006 17:09

Think i got it, was a simple fault in Ogres example code.
http://www.ogre3d.org/phpBB2/viewtopic. ... 718#127718


Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests