Hi
I want to make a simple chess board.
So I have to render some textures on window.
How can I do so?
I need it, please.
Thank u.
howto draw a texture on a window?
Moderators: CEGUI MVP, CEGUI Team
Is this the way to use StaticImage?
I think there should be a CEGUI::StaticImage class.
Code: Select all
// load an image to use as a background
ImagesetManager::getSingleton().createImagesetFromImageFile("BackgroundImage", "GPN-2000-001437.tga");
// here we will use a StaticImage as the root, then we can use it to place a background image
Window* background = winMgr.createWindow("TaharezLook/StaticImage", "background_wnd");
// set position and size
background->setPosition(UVector2(cegui_reldim(0), cegui_reldim( 0)));
background->setSize(UVector2(cegui_reldim(1), cegui_reldim( 1)));
// disable frame and standard background
background->setProperty("FrameEnabled", "false");
background->setProperty("BackgroundEnabled", "false");
// set the background image
background->setProperty("Image", "set:BackgroundImage image:full_image");
I think there should be a CEGUI::StaticImage class.

>> I think there should be a CEGUI::StaticImage class.
If you look at the stuff I've wikied, that's pretty much what I've done. These are helper classes, building higher level structures/classes to simplify Cegui usage.
You have created the static image via code. Myself I tend to create them via the layout editor, so I do not have a great need for a specific class; the layout editor fills in all those function calls for me (by specifying the attributes within the .layout file).
If you look at the stuff I've wikied, that's pretty much what I've done. These are helper classes, building higher level structures/classes to simplify Cegui usage.
You have created the static image via code. Myself I tend to create them via the layout editor, so I do not have a great need for a specific class; the layout editor fills in all those function calls for me (by specifying the attributes within the .layout file).
I have tried
But still get the error: StaticImage is not a member of CEGUI. So I have to use CEGUI::Window class and set image by using SetProperty method.
Code: Select all
staticImage = (CEGUI::StaticImage*)wndMgr.getWindow("Root/PlayWindow/Avatar01SImage");
But still get the error: StaticImage is not a member of CEGUI. So I have to use CEGUI::Window class and set image by using SetProperty method.
Who is online
Users browsing this forum: No registered users and 26 guests