|
|
|
@ -454,10 +454,13 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
mAvailableEffectsList->clear ();
|
|
|
|
|
|
|
|
|
|
int i=0;
|
|
|
|
|
for (std::vector<short>::const_iterator it = knownEffects.begin(); it != knownEffects.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
mAvailableEffectsList->addItem(MWBase::Environment::get().getWorld ()->getStore ().get<ESM::GameSetting>().find(
|
|
|
|
|
ESM::MagicEffect::effectIdToString (*it))->getString());
|
|
|
|
|
mButtonMapping[i] = *it;
|
|
|
|
|
++i;
|
|
|
|
|
}
|
|
|
|
|
mAvailableEffectsList->adjustSize ();
|
|
|
|
|
|
|
|
|
@ -466,7 +469,6 @@ namespace MWGui
|
|
|
|
|
std::string name = MWBase::Environment::get().getWorld ()->getStore ().get<ESM::GameSetting>().find(
|
|
|
|
|
ESM::MagicEffect::effectIdToString (*it))->getString();
|
|
|
|
|
MyGUI::Widget* w = mAvailableEffectsList->getItemWidget(name);
|
|
|
|
|
w->setUserData(*it);
|
|
|
|
|
|
|
|
|
|
ToolTips::createMagicEffectToolTip (w, *it);
|
|
|
|
|
}
|
|
|
|
@ -518,7 +520,8 @@ namespace MWGui
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
short effectId = *sender->getUserData<short>();
|
|
|
|
|
int buttonId = *sender->getUserData<int>();
|
|
|
|
|
short effectId = mButtonMapping[buttonId];
|
|
|
|
|
|
|
|
|
|
for (std::vector<ESM::ENAMstruct>::const_iterator it = mEffects.begin(); it != mEffects.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|