I'm having some trouble center-aligning some text, specifically the property I'm under the impression controls alignment doesn't appear to exist when I alter the property. (The specific widget I'm working on is a TaharezLook titlebar)
I poked at the XML files to try and find the correct property name,
Code: Select all
XML definition:
<HorzFormat type="RightAligned" />
and also
<PropertyDefinition name="HorzFormatting" initialValue="CentreAligned" redrawOnWrite="true" type="HorizontalTextFormatting" />
However, when I go to set either one of these definitions
Code: Select all
// CEGUI::Titlebar* titlebar = static_cast<CEGUI::Titlebar*>(m_gui.createWidget("TaharezLook/Titlebar", glm::vec4(0.5f, 0.00f, .5f, .060f), glm::vec4(0), "Main Menu Titlebar"));
titlebar->setProperty("HorzFormatting", "CentreAligned");
//OR
titlebar->setProperty("HorzFormat", "CentreAligned");
I'm being told "There is no property named 'X' in the set. I can't for the life of me figure out what I'm doing wrong, it seems like the property name I'm using must exist if the XML file is using it. I'd greatly appreciate clarification on this one! Cheers!