示例#1
0
文件: layouts.cpp 项目: dhardy/openmw
void StatsWindow::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value)
{
    widget->setCaption(value);
    if (style == CS_Super)
        widget->setTextColour(MyGUI::Colour(0, 1, 0));
    else if (style == CS_Sub)
        widget->setTextColour(MyGUI::Colour(1, 0, 0));
    else
        widget->setTextColour(MyGUI::Colour(1, 1, 1));
}
示例#2
0
文件: HUD.cpp 项目: nikki93/grall2
//Creates a MyGUI::StaticText for HUD.
static inline MyGUI::StaticTextPtr createStaticText(const MyGUI::IntCoord &coord, MyGUI::Align align, const Ogre::ColourValue &colour = Ogre::ColourValue::White)
{
    MyGUI::StaticTextPtr txt = GlbVar.gui->createWidget<MyGUI::StaticText>("TextBox", coord, MyGUI::Align::Default, HUD_LAYER);

    align |= MyGUI::Align::Bottom;
    txt->setTextAlign(align);
    txt->setFontName("HUD");
    txt->setTextColour(MyGUI::Colour(colour.r, colour.g, colour.b, colour.a));

    return txt;
}