Widget Galore
Moderators: CEGUI MVP, CEGUI Team
Widget Galore
I've Wikied a presentation of every widget and an introduction of their usage. Hopefully it can be useful to others.
Upgraded to v0.5.0.
The v0.4 StaticText code
was upgraded to v0.5.0 like this
The v0.4 StaticImage code
was upgraded to v0.5.0 like this
The v0.4 StaticText code
Code: Select all
StaticText* staticText = static_cast<StaticText*>(winMgr.getWindow((utf8*) "StaticText"));
staticText->setText("Red StaticText");
staticText->setTextColours( colour(1.0f, 0.0f, 0.0f, 1.0f) ); // Red text
staticText->setFormatting(StaticText::HorzCentred, StaticText::VertCentred); // Center the text
was upgraded to v0.5.0 like this
Code: Select all
DefaultWindow* staticText = static_cast<DefaultWindow*>(winMgr.getWindow("StaticText"));
staticText->setText("Red Static Text");
staticText->setProperty("TextColours", "tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000");
staticText->setProperty("VertFormatting", "VertCentred");
staticText->setProperty("HorzFormatting", "HorzCentred");
The v0.4 StaticImage code
Code: Select all
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "../datafiles/imagesets/GPN-2000-001437.tga");
StaticImage* staticImage = static_cast<StaticImage*>(winMgr.getWindow("StaticImage"));
staticImage->setImage("ImageForStaticImage", "full_image");
was upgraded to v0.5.0 like this
Code: Select all
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "GPN-2000-001437.tga");
DefaultWindow* staticImage = static_cast<DefaultWindow*>(winMgr.getWindow("StaticImage"));
staticImage->setProperty("Image", "set:ImageForStaticImage image:full_image");
So now that you're using strings instead of enumerations how do I convert the string to an enumeration when I need it?
to
Code: Select all
const CEGUI::String &horizFormatting="WordWrapLeftAligned"
to
Code: Select all
TextFormatting::WordWrapLeftAligned
menu and popup menu are finally added. Well, not directly in Widget Galore, as there's too much text and code, but still there's a sample available somewhere.
The next step could be to go back to each widget and create a separate Wiki for each, providing more text and code for each.
The next step could be to go back to each widget and create a separate Wiki for each, providing more text and code for each.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 2 guests