mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 14:23:53 +00:00
Fix an issue with items that have no UI icon
This commit is contained in:
parent
81ec8c2f55
commit
b6bad969a0
1 changed files with 3 additions and 2 deletions
|
@ -61,8 +61,9 @@ namespace MWGui
|
|||
mDraggedWidget = baseWidget;
|
||||
MyGUI::ImageBox* image = baseWidget->createWidget<MyGUI::ImageBox>("ImageBox",
|
||||
MyGUI::IntCoord(5, 5, 32, 32), MyGUI::Align::Default);
|
||||
int pos = path.rfind(".");
|
||||
path.erase(pos);
|
||||
size_t pos = path.rfind(".");
|
||||
if (pos != std::string::npos)
|
||||
path.erase(pos);
|
||||
path.append(".dds");
|
||||
image->setImageTexture(path);
|
||||
image->setNeedMouseFocus(false);
|
||||
|
|
Loading…
Reference in a new issue