Changes GuiIconButtonCtrl to relative paths that can be opened by the mount system.

This commit is contained in:
OTHGMars 2021-01-11 05:00:37 -05:00
parent 0ece989560
commit fd85491ed7

View file

@ -201,13 +201,13 @@ bool GuiIconButtonCtrl::resize(const Point2I &newPosition, const Point2I &newExt
void GuiIconButtonCtrl::setBitmap(const char *name) void GuiIconButtonCtrl::setBitmap(const char *name)
{ {
mBitmapName = StringTable->insert(name); mBitmapName = Platform::makeRelativePathName(name, NULL);
if(!isAwake()) if(!isAwake())
return; return;
if (*mBitmapName) if (*mBitmapName)
{ {
mTextureNormal = GFXTexHandle( name, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) ); mTextureNormal = GFXTexHandle(mBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) );
} }
else else
{ {