mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Merge branch 'missing-inventory-icon' into 'master'
Use default icon.tga when inventory icon is missing Closes #4977 See merge request OpenMW/openmw!596
This commit is contained in:
commit
e2ec3b0db7
2 changed files with 8 additions and 1 deletions
|
@ -109,6 +109,7 @@
|
|||
Feature #2686: Timestamps in openmw.log
|
||||
Feature #3171: OpenMW-CS: Instance drag selection
|
||||
Feature #4894: Consider actors as obstacles for pathfinding
|
||||
Feature #4977: Use the "default icon.tga" when an item's icon is not found
|
||||
Feature #5043: Head Bobbing
|
||||
Feature #5199: Improve Scene Colors
|
||||
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
#include <MyGUI_TextBox.h>
|
||||
|
||||
// correctIconPath
|
||||
#include <components/resource/resourcesystem.hpp>
|
||||
#include <components/vfs/manager.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
|
||||
|
@ -106,7 +109,10 @@ namespace MWGui
|
|||
std::string invIcon = ptr.getClass().getInventoryIcon(ptr);
|
||||
if (invIcon.empty())
|
||||
invIcon = "default icon.tga";
|
||||
setIcon(MWBase::Environment::get().getWindowManager()->correctIconPath(invIcon));
|
||||
invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath(invIcon);
|
||||
if (!MWBase::Environment::get().getResourceSystem()->getVFS()->exists(invIcon))
|
||||
invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath("default icon.tga");
|
||||
setIcon(invIcon);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue