예제 #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;
}