I had compiled all sample with Irrlicht 0.12 and they display correctly.
uncomment the line ine file CEGUIConfig.h.
Code: Select all
#define CEGUI_SAMPLES_USE_IRRLICHT
below is an example of FirstWindow.
select renderer type is ok.

the result is ok.(I think)

For now I try to recode the FirstWindow in simplest for fit with my program frame work.
The files's directory struct is similar with FirstWindow.
Here is the result of my program.

and here is the irrlicht console

What is my fault in the program ?
It is not correct in Text of the window.
I can't see the cursor like the FirstWindow.
below is my code , the project is only single file.
main.cpp
Code: Select all
#include <irrlicht.h>
#include <cegui.h>
#include <renderers/irrlichtrenderer/irrlichtrenderer.h>
int
main(
int arg_c ,
char** arg_v )
{
using namespace irr;
IrrlichtDevice *irr_device = 0;
using namespace video;
using namespace core;
irr_device = createDevice(
EDT_DIRECTX9 ,
core :: dimension2d< s32 >( 800 , 600 ) ,
32 ,
false ,
true ,
false ,
0 );
if( irr_device == 0) return -1;
irr_device -> setWindowCaption( L"ทดลองใช้ CEGUI" );
using namespace scene;
ISceneManager *irr_s_mrg = irr_device -> getSceneManager( );
IVideoDriver *irr_vd = irr_device -> getVideoDriver( );
ICameraSceneNode *irr_camera = irr_s_mrg->addCameraSceneNode(0, core::vector3df(0,0,0), core::vector3df(0,0,1));
irr_camera->setFOV(1.56f);
irr_vd -> setAmbientLight(video::SColor(255,255,255,255));
using namespace CEGUI;
IrrlichtRenderer *irr_gui_render = new IrrlichtRenderer( irr_device , true );
System* cegui_system = new System( irr_gui_render );
Imageset *taharezImages = ImagesetManager::getSingleton().createImageset("../datafiles/imagesets/TaharezLook.imageset");
cegui_system -> setDefaultMouseCursor( &taharezImages -> getImage( "MouseArrow" ) );
FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLookWidgets.scheme");
WindowManager* winMgr = &WindowManager::getSingleton( );
DefaultWindow* root = (DefaultWindow*)winMgr -> createWindow("DefaultWindow", "Root");
cegui_system -> setGUISheet( root );
FrameWindow* wnd = (FrameWindow*)winMgr -> createWindow("TaharezLook/FrameWindow", "Demo Window");
root -> addChildWindow( wnd );
wnd->setPosition(Point(0.25f, 0.25f));
wnd->setSize(Size(0.5f, 0.5f));
wnd->setMaximumSize(Size(1.0f, 1.0f));
wnd->setMinimumSize(Size(0.1f, 0.1f));
wnd->setText( "Some Thing" );
video :: SColor BLACK_COLOR( 255 , 0 , 0 , 0 );
while( irr_device -> run( ) )
{
irr_vd -> beginScene( true , true , BLACK_COLOR );
irr_s_mrg -> drawAll( );
cegui_system -> renderGUI( );
irr_vd -> endScene( );
}
delete cegui_system;
delete irr_gui_render;
irr_gui_render = 0;
irr_device -> drop( );
return 0;
}
[size=xx-large]
[color=CC0000]
Some one please help me!
[/color]
Thank you.
[/size]
