예제 #1
0
void WeaponSelectorDialog::addEffect(void)
{
    if (false == mCurrentEffectName.empty())
    {
        /*if (mLeftHand)
        {
            if (mLeftHandWeapon && mLeftHandWeapon->isLocatorExist("武器特效点"))
            {
                mLeftHandWeapon->delAllEffect();
                mCurrentEffectHandle = mLeftHandWeapon->addEffect(mCurrentEffectName, "武器特效点");
            }
        }
        else
        {
            if (mRightHandWeapon && mRightHandWeapon->isLocatorExist("武器特效点"))
            {
                mRightHandWeapon->delAllEffect();
                mCurrentEffectHandle = mRightHandWeapon->addEffect(mCurrentEffectName, "武器特效点");
            }
        }*/

        if ( mCurrentWeapon && mCurrentWeapon->isLocatorExist("武器特效点") )
        {
            mCurrentWeapon->delAllEffect();
            mCurrentEffectHandle = mCurrentWeapon->addEffect(mCurrentEffectName, "武器特效点", 
                Fairy::LogicModel::GTIT_ALL);
        }

    } 

    Fairy::Effect* effect = getCurrentEffect();

    if (effect)
        effect->setColour(mCurrentColour * mCurrentAlpha);
}
예제 #2
0
void WeaponSelectorDialog::OnAlphaTextChanged(wxCommandEvent &e)
{
    mCurrentAlpha = Ogre::StringConverter::parseReal(mAlphaTextCtrl->GetValue().c_str());

    Fairy::Effect* effect = getCurrentEffect();

    if (effect)
        effect->setColour(mCurrentColour * mCurrentAlpha);
}
예제 #3
0
void WeaponSelectorDialog::OnColourButtonDown(wxCommandEvent &e)
{
    wxColourDialog dialog(this);
    if (dialog.ShowModal() == wxID_OK)
    {
        wxColour colour;

        wxColourData retData = dialog.GetColourData();
        colour = retData.GetColour();

        IColourToFColour(colour.Red(), colour.Green(), colour.Blue(),
            mCurrentColour.r, mCurrentColour.g, mCurrentColour.b);

        Fairy::Effect* effect = getCurrentEffect();
        
        if (effect)
            effect->setColour(mCurrentColour * mCurrentAlpha);

        // 设置按钮颜色,颜色数字文本
        mColourButton->SetBackgroundColour(colour);

        setColourText();
    }
}