当前位置: 首页>>代码示例>>C++>>正文


C++ ButtonPtr::setTextColour方法代码示例

本文整理汇总了C++中mygui::ButtonPtr::setTextColour方法的典型用法代码示例。如果您正苦于以下问题:C++ ButtonPtr::setTextColour方法的具体用法?C++ ButtonPtr::setTextColour怎么用?C++ ButtonPtr::setTextColour使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mygui::ButtonPtr的用法示例。


在下文中一共展示了ButtonPtr::setTextColour方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WindowBase

BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
  : WindowBase("openmw_chargen_birth.layout", parWindowManager)
{
    // Centre dialog
    center();

    getWidget(mSpellArea, "SpellArea");

    getWidget(mBirthImage, "BirthsignImage");

    getWidget(mBirthList, "BirthsignList");
    mBirthList->setScrollVisible(true);
    mBirthList->eventListSelectAccept += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
    mBirthList->eventListMouseItemActivate += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
    mBirthList->eventListChangePosition += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);

    MyGUI::ButtonPtr backButton;
    getWidget(backButton, "BackButton");
    backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onBackClicked);

    MyGUI::ButtonPtr okButton;
    getWidget(okButton, "OKButton");
    okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
    okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
    okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));

    updateBirths();
    updateSpells();
}
开发者ID:emoose,项目名称:openmw,代码行数:29,代码来源:birth.cpp

示例2: onSelectClass

void PickClassDialog::onSelectClass(MyGUI::ListBox* _sender, size_t _index)
{
    if (_index == MyGUI::ITEM_NONE)
        return;

    MyGUI::ButtonPtr okButton;
    getWidget(okButton, "OKButton");
    okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));

    const std::string *classId = mClassList->getItemDataAt<std::string>(_index);
    if (boost::iequals(mCurrentClassId, *classId))
        return;

    mCurrentClassId = *classId;
    updateStats();
}
开发者ID:emoose,项目名称:openmw,代码行数:16,代码来源:class.cpp

示例3: onSelectBirth

void BirthDialog::onSelectBirth(MyGUI::ListBox* _sender, size_t _index)
{
    if (_index == MyGUI::ITEM_NONE)
        return;

    MyGUI::ButtonPtr okButton;
    getWidget(okButton, "OKButton");
    okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));

    const std::string *birthId = mBirthList->getItemDataAt<std::string>(_index);
    if (boost::iequals(mCurrentBirthId, *birthId))
        return;

    mCurrentBirthId = *birthId;
    updateSpells();
}
开发者ID:emoose,项目名称:openmw,代码行数:16,代码来源:birth.cpp

示例4: setClassId

void PickClassDialog::setClassId(const std::string &classId)
{
    mCurrentClassId = classId;
    mClassList->setIndexSelected(MyGUI::ITEM_NONE);
    size_t count = mClassList->getItemCount();
    for (size_t i = 0; i < count; ++i)
    {
        if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId))
        {
            mClassList->setIndexSelected(i);
            MyGUI::ButtonPtr okButton;
            getWidget(okButton, "OKButton");
            okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
            break;
        }
    }

    updateStats();
}
开发者ID:emoose,项目名称:openmw,代码行数:19,代码来源:class.cpp

示例5: setBirthId

void BirthDialog::setBirthId(const std::string &birthId)
{
    mCurrentBirthId = birthId;
    mBirthList->setIndexSelected(MyGUI::ITEM_NONE);
    size_t count = mBirthList->getItemCount();
    for (size_t i = 0; i < count; ++i)
    {
        if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId))
        {
            mBirthList->setIndexSelected(i);
            MyGUI::ButtonPtr okButton;
            getWidget(okButton, "OKButton");
            okButton->setTextColour(MyGUI::Colour(0.75f, 0.6f, 0.35f));
            break;
        }
    }

    updateSpells();
}
开发者ID:emoose,项目名称:openmw,代码行数:19,代码来源:birth.cpp

示例6: WindowBase

PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
  : WindowBase("openmw_chargen_class.layout", parWindowManager)
{
    // Centre dialog
    center();

    getWidget(mSpecializationName, "SpecializationName");

    getWidget(mFavoriteAttribute[0], "FavoriteAttribute0");
    getWidget(mFavoriteAttribute[1], "FavoriteAttribute1");
    mFavoriteAttribute[0]->setWindowManager(&mWindowManager);
    mFavoriteAttribute[1]->setWindowManager(&mWindowManager);

    for(int i = 0; i < 5; i++)
    {
        char theIndex = '0'+i;
        getWidget(mMajorSkill[i], std::string("MajorSkill").append(1, theIndex));
        getWidget(mMinorSkill[i], std::string("MinorSkill").append(1, theIndex));
        mMajorSkill[i]->setWindowManager(&mWindowManager);
        mMinorSkill[i]->setWindowManager(&mWindowManager);
    }

    getWidget(mClassList, "ClassList");
    mClassList->setScrollVisible(true);
    mClassList->eventListSelectAccept += MyGUI::newDelegate(this, &PickClassDialog::onSelectClass);
    mClassList->eventListMouseItemActivate += MyGUI::newDelegate(this, &PickClassDialog::onSelectClass);
    mClassList->eventListChangePosition += MyGUI::newDelegate(this, &PickClassDialog::onSelectClass);

    getWidget(mClassImage, "ClassImage");

    MyGUI::ButtonPtr backButton;
    getWidget(backButton, "BackButton");
    backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onBackClicked);

    MyGUI::ButtonPtr okButton;
    getWidget(okButton, "OKButton");
    okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked);
    okButton->setTextColour(MyGUI::Colour(0.6f, 0.56f, 0.45f));

    updateClasses();
    updateStats();
}
开发者ID:emoose,项目名称:openmw,代码行数:42,代码来源:class.cpp


注:本文中的mygui::ButtonPtr::setTextColour方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。