mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:53:52 +00:00
Support /-separated big effect icon paths
This commit is contained in:
parent
b385f27f86
commit
7b62d47abc
2 changed files with 2 additions and 0 deletions
|
@ -416,6 +416,7 @@ namespace MWGui
|
||||||
spell->mEffects.mList.front().mEffectID);
|
spell->mEffects.mList.front().mEffectID);
|
||||||
|
|
||||||
std::string icon = effect->mIcon;
|
std::string icon = effect->mIcon;
|
||||||
|
std::replace(icon.begin(), icon.end(), '/', '\\');
|
||||||
int slashPos = icon.rfind('\\');
|
int slashPos = icon.rfind('\\');
|
||||||
icon.insert(slashPos + 1, "b_");
|
icon.insert(slashPos + 1, "b_");
|
||||||
icon = Misc::ResourceHelpers::correctIconPath(icon, MWBase::Environment::get().getResourceSystem()->getVFS());
|
icon = Misc::ResourceHelpers::correctIconPath(icon, MWBase::Environment::get().getResourceSystem()->getVFS());
|
||||||
|
|
|
@ -302,6 +302,7 @@ namespace MWGui
|
||||||
const ESM::MagicEffect* effect = esmStore.get<ESM::MagicEffect>().find(spell->mEffects.mList.front().mEffectID);
|
const ESM::MagicEffect* effect = esmStore.get<ESM::MagicEffect>().find(spell->mEffects.mList.front().mEffectID);
|
||||||
|
|
||||||
std::string path = effect->mIcon;
|
std::string path = effect->mIcon;
|
||||||
|
std::replace(path.begin(), path.end(), '/', '\\');
|
||||||
int slashPos = path.rfind('\\');
|
int slashPos = path.rfind('\\');
|
||||||
path.insert(slashPos + 1, "b_");
|
path.insert(slashPos + 1, "b_");
|
||||||
path = Misc::ResourceHelpers::correctIconPath(path, MWBase::Environment::get().getResourceSystem()->getVFS());
|
path = Misc::ResourceHelpers::correctIconPath(path, MWBase::Environment::get().getResourceSystem()->getVFS());
|
||||||
|
|
Loading…
Reference in a new issue