mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 11:11:33 +00:00
Merge pull request #2334 from akortunov/guifixes
Update background texture if a new one is empty (regression #4986)
This commit is contained in:
commit
0fac28563c
1 changed files with 6 additions and 6 deletions
|
@ -148,9 +148,9 @@ namespace MWGui
|
||||||
if (backgroundTex != "")
|
if (backgroundTex != "")
|
||||||
backgroundTex += ".dds";
|
backgroundTex += ".dds";
|
||||||
|
|
||||||
|
float scale = 1.f;
|
||||||
if (!backgroundTex.empty())
|
if (!backgroundTex.empty())
|
||||||
{
|
{
|
||||||
float scale = 1.f;
|
|
||||||
auto found = mScales.find(backgroundTex);
|
auto found = mScales.find(backgroundTex);
|
||||||
if (found == mScales.end())
|
if (found == mScales.end())
|
||||||
{
|
{
|
||||||
|
@ -165,12 +165,12 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
scale = found->second;
|
scale = found->second;
|
||||||
|
}
|
||||||
|
|
||||||
if (state == Barter && !isMagic)
|
if (state == Barter && !isMagic)
|
||||||
setFrame(backgroundTex, MyGUI::IntCoord(2*scale,2*scale,44*scale,44*scale));
|
setFrame(backgroundTex, MyGUI::IntCoord(2*scale,2*scale,44*scale,44*scale));
|
||||||
else
|
else
|
||||||
setFrame(backgroundTex, MyGUI::IntCoord(0,0,44*scale,44*scale));
|
setFrame(backgroundTex, MyGUI::IntCoord(0,0,44*scale,44*scale));
|
||||||
}
|
|
||||||
|
|
||||||
setIcon(ptr);
|
setIcon(ptr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue