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:
BeniS
2012-08-26 04:05:33 +12:00
parent f93d79649f
commit 0763b266d5
9 changed files with 252 additions and 194 deletions

View File

@@ -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();
}