1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 21:40:15 +00:00

Fixed area slider in self enchantments.

This commit is contained in:
PLkolek 2013-07-31 12:26:34 +02:00
parent 0019d3a0d2
commit 7fd7621458

View File

@ -163,7 +163,7 @@ namespace MWGui
mDurationBox->setVisible (true); mDurationBox->setVisible (true);
curY += mDurationBox->getSize().height; curY += mDurationBox->getSize().height;
} }
if (mEffect.mRange == ESM::RT_Target) if (mEffect.mRange != ESM::RT_Self)
{ {
mAreaBox->setPosition(mAreaBox->getPosition().left, curY); mAreaBox->setPosition(mAreaBox->getPosition().left, curY);
mAreaBox->setVisible (true); mAreaBox->setVisible (true);
@ -182,9 +182,6 @@ namespace MWGui
else if (mEffect.mRange == ESM::RT_Touch) else if (mEffect.mRange == ESM::RT_Touch)
mRangeButton->setCaptionWithReplacing ("#{sRangeTouch}"); mRangeButton->setCaptionWithReplacing ("#{sRangeTouch}");
mAreaSlider->setVisible (mEffect.mRange != ESM::RT_Self);
mAreaText->setVisible (mEffect.mRange != ESM::RT_Self);
// cycle through range types until we find something that's allowed // cycle through range types until we find something that's allowed
if (mEffect.mRange == ESM::RT_Target && !(mMagicEffect->mData.mFlags & ESM::MagicEffect::CastTarget)) if (mEffect.mRange == ESM::RT_Target && !(mMagicEffect->mData.mFlags & ESM::MagicEffect::CastTarget))
onRangeButtonClicked(sender); onRangeButtonClicked(sender);
@ -193,6 +190,11 @@ namespace MWGui
if (mEffect.mRange == ESM::RT_Touch && !(mMagicEffect->mData.mFlags & ESM::MagicEffect::CastTouch)) if (mEffect.mRange == ESM::RT_Touch && !(mMagicEffect->mData.mFlags & ESM::MagicEffect::CastTouch))
onRangeButtonClicked(sender); onRangeButtonClicked(sender);
if(mEffect.mRange == ESM::RT_Self)
{
mAreaSlider->setScrollPosition(0);
onAreaChanged(mAreaSlider,0);
}
updateBoxes(); updateBoxes();
} }