Page 1 of 1
Widget Galore
Posted: Mon May 01, 2006 07:44
by Rackle
I've Wikied a
presentation of every widget and an introduction of their usage. Hopefully it can be useful to others.
Posted: Mon May 01, 2006 08:05
by scriptkid
Excellent! I assume you have created this for the cegui "head", right?
Posted: Mon May 01, 2006 08:15
by Rackle
No, that was for the current release, the most easily accessible one. I'll update what needs updating once 0.5.0 is out, unless someone else does it first

Posted: Wed Jun 28, 2006 01:27
by Rackle
Upgraded to v0.5.0.
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");
Posted: Tue Aug 22, 2006 15:34
by Rakkar
So now that you're using strings instead of enumerations how do I convert the string to an enumeration when I need it?
Code: Select all
const CEGUI::String &horizFormatting="WordWrapLeftAligned"
to
Code: Select all
TextFormatting::WordWrapLeftAligned
Posted: Tue Aug 22, 2006 16:29
by lindquist
unfortunately that code is in the property class. there is no helper.
You can grab the snippet from WindowRendererSets/Falagard/src/FalStaticTextProperties.cpp though
Posted: Wed Aug 23, 2006 15:55
by Rakkar
I think you mean CEGUIStaticTextProperties.cpp, the set and get functions
void HorzFormatting::set(PropertyReceiver* receiver, const String& value)
Posted: Wed Aug 23, 2006 16:01
by lindquist
so you're using 0.4 ...
Posted: Thu Nov 30, 2006 09:34
by scriptkid
This wiki page has been upgraded to the 0.5 release. TabPane is replaced by DefaultWindow and SetWindowPosition, SetWindowWidth and SetWindowHeight have been changed by removing 'Window' from the method names.
Posted: Wed May 02, 2007 18:58
by Rackle
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.