mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
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:
parent
27a81f9c0d
commit
2824bcf649
11 changed files with 67 additions and 17 deletions
|
|
@ -41,6 +41,10 @@
|
|||
|
||||
S32 GFXTextureManager::smTextureReductionLevel = 0;
|
||||
|
||||
String GFXTextureManager::smMissingTexturePath("core/art/missingTexture");
|
||||
String GFXTextureManager::smUnavailableTexturePath("core/art/unavailable");
|
||||
String GFXTextureManager::smWarningTexturePath("core/art/warnmat");
|
||||
|
||||
GFXTextureManager::EventSignal GFXTextureManager::smEventSignal;
|
||||
|
||||
static const String sDDSExt( "dds" );
|
||||
|
|
@ -52,6 +56,19 @@ void GFXTextureManager::init()
|
|||
"video memory usage. It will skip any textures that have been defined "
|
||||
"as not allowing down scaling.\n"
|
||||
"@ingroup GFX\n" );
|
||||
|
||||
Con::addVariable( "$pref::Video::missingTexturePath", TypeString, &smMissingTexturePath,
|
||||
"The file path of the texture to display when the requested texture is missing.\n"
|
||||
"@ingroup GFX\n" );
|
||||
|
||||
Con::addVariable( "$pref::Video::unavailableTexturePath", TypeString, &smUnavailableTexturePath,
|
||||
"@brief The file path of the texture to display when the requested texture is unavailable.\n\n"
|
||||
"Often this texture is used by GUI controls to indicate that the request image is unavailable.\n"
|
||||
"@ingroup GFX\n" );
|
||||
|
||||
Con::addVariable( "$pref::Video::warningTexturePath", TypeString, &smWarningTexturePath,
|
||||
"The file path of the texture used to warn the developer.\n"
|
||||
"@ingroup GFX\n" );
|
||||
}
|
||||
|
||||
GFXTextureManager::GFXTextureManager()
|
||||
|
|
|
|||
|
|
@ -65,6 +65,15 @@ public:
|
|||
/// Set up some global script interface stuff.
|
||||
static void init();
|
||||
|
||||
/// Provide the path to the texture to use when the requested one is missing
|
||||
static const String& getMissingTexturePath() { return smMissingTexturePath; }
|
||||
|
||||
/// Provide the path to the texture to use when the requested one is unavailable.
|
||||
static const String& getUnavailableTexturePath() { return smUnavailableTexturePath; }
|
||||
|
||||
/// Provide the path to the texture used to warn the developer
|
||||
static const String& getWarningTexturePath() { return smWarningTexturePath; }
|
||||
|
||||
/// Update width and height based on available resources.
|
||||
///
|
||||
/// We provide a simple interface for managing texture memory usage. Specifically,
|
||||
|
|
@ -177,6 +186,16 @@ protected:
|
|||
///
|
||||
static S32 smTextureReductionLevel;
|
||||
|
||||
/// File path to the missing texture
|
||||
static String smMissingTexturePath;
|
||||
|
||||
/// File path to the unavailable texture. Often used by GUI controls
|
||||
/// when the requested image is not available.
|
||||
static String smUnavailableTexturePath;
|
||||
|
||||
/// File path to the warning texture
|
||||
static String smWarningTexturePath;
|
||||
|
||||
GFXTextureObject *mListHead;
|
||||
GFXTextureObject *mListTail;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue