Remove hard coded paths pass 1

- displaySplashWindow() now takes an optional path to a bitmap file.
- Missing, unavailable and warning texture paths now come from
GFXTextureManager static methods.
This commit is contained in:
DavidWyand-GG 2013-01-30 14:09:22 -05:00
parent 27a81f9c0d
commit 2824bcf649
11 changed files with 67 additions and 17 deletions

View file

@ -29,6 +29,7 @@
#include "gui/core/guiCanvas.h"
#include "gui/core/guiDefaultControlRender.h"
#include "gfx/gfxDrawUtil.h"
#include "gfx/gfxTextureManager.h"
ImplementEnumType( GuiBitmapMode,
@ -327,7 +328,7 @@ void GuiBitmapButtonCtrl::setBitmap( const String& name )
if( i == 0 && mTextures[ i ].mTextureNormal.isNull() && mTextures[ i ].mTextureHilight.isNull() && mTextures[ i ].mTextureDepressed.isNull() && mTextures[ i ].mTextureInactive.isNull() )
{
Con::warnf( "GuiBitmapButtonCtrl::setBitmap - Unable to load texture: %s", mBitmapName.c_str() );
this->setBitmap( "core/art/unavailable" );
this->setBitmap( GFXTextureManager::getUnavailableTexturePath() );
return;
}
}
@ -372,7 +373,7 @@ void GuiBitmapButtonCtrl::setBitmapHandles(GFXTexHandle normal, GFXTexHandle hig
if (mTextures[ i ].mTextureNormal.isNull() && mTextures[ i ].mTextureHilight.isNull() && mTextures[ i ].mTextureDepressed.isNull() && mTextures[ i ].mTextureInactive.isNull())
{
Con::warnf("GuiBitmapButtonCtrl::setBitmapHandles() - Invalid texture handles");
setBitmap("core/art/unavailable");
setBitmap( GFXTextureManager::getUnavailableTexturePath() );
return;
}