I don't know the size of the window for the static text beforehand - it may indeed take up the entire screen or may indeed block buttons under it, which should still be usable.
How do I display the static text without it interfering with other windows? It is not an option to attach the static text to the child layout.
Here is my code:
Code: Select all
FadingText *fadingText = new FadingText;
fadingText->fadeController.Setup(fadeInTimeMS, lifeTimeMS,fadeOutTimeMS);
fadingText->staticText=(CEGUI::Window*) CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticText");
fadingText->staticText->setText(string);
if (font)
fadingText->staticText->setFont(font);
if (window==0)
window=CEGUI::WindowManager::getSingleton().getWindow("Root_Do_Not_Delete");
window->addChildWindow(fadingText->staticText);
window->setText(string);
fadingText->staticText->setXPosition(CEGUI::Absolute, drawArea.d_left);
fadingText->staticText->setWidth(CEGUI::Absolute, drawArea.d_right-drawArea.d_left);
fadingText->staticText->setHeight(CEGUI::Absolute, drawArea.d_bottom-drawArea.d_top);
// Setting properties through strings is shit.
// To see the available properties, search for public Property in CEGUI
if (colour)
fadingText->staticText->setProperty("TextColours", *colour); // aarrggbb in Hexadecimal
if (horizFormatting)
{
CEGUI::String formatting;
formatting.assign(horizFormatting);
fadingText->staticText->setProperty("HorzFormatting", formatting); // LeftAligned, RightAligned, HorzCentred
}
if (verticalFormatting)
{
CEGUI::String formatting;
formatting.assign(verticalFormatting);
fadingText->staticText->setProperty("VertFormatting", formatting); // LeftAligned, RightAligned, HorzCentred
}
fadingText->staticText->setProperty("BackgroundEnabled", "false");
fadingText->staticText->setProperty("FrameEnabled", "false");
// TODO - how to set xScale and yScale
textList.Insert(fadingText);