1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-28 20:36:42 +00:00

Don't assume icons have a period in their filename

This commit is contained in:
Chris Robinson 2013-08-08 04:09:17 -07:00
parent 1f6055d54b
commit 3cff7b1e42

View file

@ -121,8 +121,9 @@ void ItemView::update()
// image // image
MyGUI::ImageBox* image = backgroundWidget->createWidget<MyGUI::ImageBox>("ImageBox", MyGUI::ImageBox* image = backgroundWidget->createWidget<MyGUI::ImageBox>("ImageBox",
MyGUI::IntCoord(5, 5, 32, 32), MyGUI::Align::Default); MyGUI::IntCoord(5, 5, 32, 32), MyGUI::Align::Default);
int pos = path.rfind("."); std::string::size_type pos = path.rfind(".");
path.erase(pos); if(pos != std::string::npos)
path.erase(pos);
path.append(".dds"); path.append(".dds");
image->setImageTexture(path); image->setImageTexture(path);
image->setNeedMouseFocus(false); image->setNeedMouseFocus(false);