Search found 148 matches

by wsw1231
Thu Feb 03, 2011 8:03 am
Forum: Beginners Help
Topic: How to make this kind of window?
Replies: 6
Views: 438

How to make this kind of window?

http://img.photobucket.com/albums/v252/wongsiwai/ScreenHunter_01Feb031558.jpg It is quite common to see such kind of window but when it comes to do programming to make it, it seems to be quite hard. How can the program know if the user has selected an option and then it will generate the preview? H...
by wsw1231
Thu Feb 03, 2011 7:22 am
Forum: Beginners Help
Topic: saveScene question
Replies: 7
Views: 381

Arghhhhhhhh I still cannot figure out why the filePath is empty...Here is my full code, just copy &paste it to your IDE and run it please...... After running the program, click "File"-->"Save 3D Floor Plan", then type the file name in the editbox (e.g. abc.irr or C:/abc.irr) ...
by wsw1231
Wed Feb 02, 2011 4:58 pm
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

my skilles ain't that great either so think it could work with smgr->getSceneNodesFromType(scene::ESNT_ANY ^ESNT_CAMERA ^ ESNT_CAMERA_FPS ^ ESNT_CAMERA_MAYA, nodes); // Find all nodes I have tried smgr->getSceneNodesFromType(ESCENE_NODE_TYPE(ESNT_ANY ^ ESNT_CAMERA_FPS ), nodes); But the result of n...
by wsw1231
Wed Feb 02, 2011 4:49 pm
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

I havent used drop().
I use SelectedNode->remove() instead.

In the above code, if you change window->remove() to window->drop(), the application will crash when you click the "Save" button...
by wsw1231
Wed Feb 02, 2011 4:13 pm
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

my skilles ain't that great either so think it could work with smgr->getSceneNodesFromType(scene::ESNT_ANY ^ESNT_CAMERA ^ ESNT_CAMERA_FPS ^ ESNT_CAMERA_MAYA, nodes); // Find all nodes Oh!!! You remind me of that ^ symbol.....does it mean XOR? I will try it out later :D Actually, the reason for look...
by wsw1231
Wed Feb 02, 2011 3:09 pm
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

The automatic conversion has been removed from the string class. You have to encapsulate the variable (or literal) in a constructor call: core::stringw(myvar) didn't knew that. Also you can (I still believe that as I use it) staticText. setText( str.c_str() ); sorry for forgetting the .c_str() smgr...
by wsw1231
Wed Feb 02, 2011 2:55 pm
Forum: Beginners Help
Topic: saveScene question
Replies: 7
Views: 381

IIRC, the call does not return a stringc. So just use the correct type and see what happens. I think the type is fine.... because I use filePath = core::stringc(Device->getFileSystem()->getWorkingDirectory().c_str()); //bug The bug still exists filePath is stringc ( i.e. c8 ) and c_str() returns c8...
by wsw1231
Wed Feb 02, 2011 12:46 pm
Forum: Beginners Help
Topic: saveScene question
Replies: 7
Views: 381

The call should return the full path to the current working directory, hence it should never be empty. Are you sure you use the correct assignment there. If you use unicode paths and convert the path to stringc, there can be a bad mapping which would lead to truncated strings. core::stringc lastFil...
by wsw1231
Wed Feb 02, 2011 12:31 pm
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

ok, I fix the problem now.
Thank you. :D

By the way,

Code: Select all

 smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes); // Find all nodes 

If I want to get nodes other than the camera scene node, how should I change the above code?
by wsw1231
Wed Feb 02, 2011 11:52 am
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

Anthony wrote:stringw str = "nodes.size(): ";

str += nodes.size();

staticText. setText( str );
Thanks for your advice
but the compiler says "cannot convert parameter 1 from 'irr::core::stringw' to 'const wchar_t *'"
by wsw1231
Wed Feb 02, 2011 11:39 am
Forum: Beginners Help
Topic: How to show u32 data to the screen?
Replies: 12
Views: 648

How to show u32 data to the screen?

core::array<scene::ISceneNode *> nodes; smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes); // Find all nodes guienv->addStaticText(nodes.size(), rect<s32>(30,100,260,222), true); In the above code, I would like to see what the value of nodes.size() is. But I don't know how to convert u32 to wchar...
by wsw1231
Wed Feb 02, 2011 8:44 am
Forum: Beginners Help
Topic: saveScene question
Replies: 7
Views: 381

saveScene question

If I call

Code: Select all

smgr->saveScene(..)
, the .irr file will be generated at the project directory.

How can I get the path of that directory?

I have used

Code: Select all

Device->getFileSystem()->getWorkingDirectory().c_str()
but this seems to return an empty string...
by wsw1231
Tue Feb 01, 2011 1:41 pm
Forum: Beginners Help
Topic: How to simulate "Save as..." using irrlicht?
Replies: 7
Views: 341

Start with the code from the file load dialog, turn it into a save dialog. I should add this soon, it's been on my todo list for ages. Thanks for reminding me Hybrid :) I am looking forward to this API. Oh..I think it's quite urgent since my final year project in the university has to be submitted ...
by wsw1231
Tue Feb 01, 2011 11:32 am
Forum: Beginners Help
Topic: How to simulate "Save as..." using irrlicht?
Replies: 7
Views: 341

youcan create that function manually. just create a text box in wich enter the name of your file and use the string in the text box as file name. a good thing is also to check for wrong characters (for example you may not want a file name with a "" inside it.) How can I handle the case in...
by wsw1231
Tue Feb 01, 2011 10:18 am
Forum: Beginners Help
Topic: How to simulate "Save as..." using irrlicht?
Replies: 7
Views: 341

hybrid wrote:There are save dialogs available from the forum, and I hope that we will get one in the engine soon.
Oh....do you mean the current version of irrlicht engine has not had this API yet?

What should I do now?