Merge branch 'AlchemyQuestionMarkNotCentered' into 'master'

Fixes the offset question mark in the alchemy tooltip when the effect is not known

See merge request OpenMW/openmw!143
pull/541/head
Andrei Kortunov 5 years ago
commit 08614f6a87

@ -129,6 +129,7 @@
Bug #5106: Still can jump even when encumbered
Bug #5110: ModRegion with a redundant numerical argument breaks script execution
Bug #5112: Insufficient magicka for current spell not reflected on HUD icon
Bug #5113: Unknown alchemy question mark not centered
Bug #5123: Script won't run on respawn
Bug #5124: Arrow remains attached to actor if pulling animation was cancelled
Bug #5126: Swimming creatures without RunForward animations are motionless during combat

@ -375,7 +375,8 @@ namespace MWGui
if (!mEffectParams.mKnown)
{
mTextWidget->setCaption ("?");
mRequestedWidth = mTextWidget->getTextSize().width + 24;
mTextWidget->setCoord(sIconOffset / 2, mTextWidget->getCoord().top, mTextWidget->getCoord().width, mTextWidget->getCoord().height); // Compensates for the missing image when effect is not known
mRequestedWidth = mTextWidget->getTextSize().width + sIconOffset;
mImageWidget->setImageTexture ("");
return;
}
@ -466,7 +467,7 @@ namespace MWGui
}
mTextWidget->setCaptionWithReplacing(spellLine);
mRequestedWidth = mTextWidget->getTextSize().width + 24;
mRequestedWidth = mTextWidget->getTextSize().width + sIconOffset;
mImageWidget->setImageTexture(MWBase::Environment::get().getWindowManager()->correctIconPath(magicEffect->mIcon));
}

@ -268,7 +268,8 @@ namespace MWGui
virtual void initialiseOverride();
private:
static const int sIconOffset = 24;
void updateWidgets();
SpellEffectParams mEffectParams;

Loading…
Cancel
Save