mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Some more UI updates and fixes.
* Added UICreatureButton class for handling/replacing "battle buttons" (can now be used in other modules). * Added the ability to use items on creatures via the battle window. * Some minor cosmetics.
This commit is contained in:
@@ -64,14 +64,14 @@ TexturePtr TextureManager::getTexture(const std::string& fileName)
|
||||
try {
|
||||
// currently only png textures are supported
|
||||
if(!stdext::ends_with(filePath, ".png"))
|
||||
stdext::throw_exception("texture file format no supported");
|
||||
stdext::throw_exception("texture file format not supported");
|
||||
|
||||
// load texture file data
|
||||
std::stringstream fin;
|
||||
g_resources.loadFile(filePath, fin);
|
||||
texture = loadPNG(fin);
|
||||
} catch(stdext::exception& e) {
|
||||
g_logger.error(stdext::format("unable to load texture '%s': %s", fileName, e.what()));
|
||||
g_logger.error(stdext::format("Unable to load texture '%s': %s", fileName, e.what()));
|
||||
texture = g_textures.getEmptyTexture();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user