mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-01 03:23:52 +00:00
init commit
start of attempt 3
This commit is contained in:
parent
71d08e9e0c
commit
eca0820134
10 changed files with 374 additions and 223 deletions
|
|
@ -301,7 +301,7 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name )
|
|||
if( mUseModifiers )
|
||||
baseName += modifiers[ i ];
|
||||
|
||||
mTextures[ i ].mTextureNormal = GFXTexHandle( mBitmapAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__));
|
||||
mTextures[ i ].mTextureNormal = GFXTexHandle( mBitmapAsset->getImageFile(), &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__));
|
||||
|
||||
if( mUseStates )
|
||||
{
|
||||
|
|
@ -323,7 +323,7 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name )
|
|||
mTextures[i].mTextureNormalAsset->load();
|
||||
if (mTextures[i].mTextureNormalAsset->getStatus() == AssetBase::Ok)
|
||||
{
|
||||
mTextures[i].mTextureNormal = GFXTexHandle(mTextures[i].mTextureNormalAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
mTextures[i].mTextureNormal = GFXTexHandle(mTextures[i].mTextureNormalAsset->getImageFile(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -345,7 +345,7 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name )
|
|||
mTextures[i].mTextureHilightAsset->load();
|
||||
if (mTextures[i].mTextureHilightAsset->getStatus() == AssetBase::Ok)
|
||||
{
|
||||
mTextures[i].mTextureHilight = GFXTexHandle(mTextures[i].mTextureHilightAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
mTextures[i].mTextureHilight = GFXTexHandle(mTextures[i].mTextureHilightAsset->getImageFile(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -369,7 +369,7 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name )
|
|||
mTextures[i].mTextureDepressedAsset->load();
|
||||
if (mTextures[i].mTextureDepressedAsset->getStatus() == AssetBase::Ok)
|
||||
{
|
||||
mTextures[i].mTextureDepressed = GFXTexHandle(mTextures[i].mTextureDepressedAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
mTextures[i].mTextureDepressed = GFXTexHandle(mTextures[i].mTextureDepressedAsset->getImageFile(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -393,7 +393,7 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name )
|
|||
mTextures[i].mTextureInactiveAsset->load();
|
||||
if (mTextures[i].mTextureInactiveAsset->getStatus() == AssetBase::Ok)
|
||||
{
|
||||
mTextures[i].mTextureInactive = GFXTexHandle(mTextures[i].mTextureInactiveAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
mTextures[i].mTextureInactive = GFXTexHandle(mTextures[i].mTextureInactiveAsset->getImageFile(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ bool GuiControlProfile::protectedSetBitmap( void *object, const char *index, con
|
|||
{
|
||||
if (profile->mBitmapAsset.notNull() && profile->getBitmap() != StringTable->insert("texHandle"))
|
||||
{
|
||||
profile->mBitmap.set(profile->mBitmapAsset->getImagePath(), profile->mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));
|
||||
profile->mBitmap.set(profile->mBitmapAsset->getImageFile(), profile->mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));
|
||||
}
|
||||
|
||||
//verify the bitmap
|
||||
|
|
@ -648,7 +648,7 @@ void GuiControlProfile::incLoadCount()
|
|||
{
|
||||
if (mBitmapAsset.notNull() && getBitmap() != StringTable->insert("texHandle"))
|
||||
{
|
||||
mBitmap.set(mBitmapAsset->getImagePath(), mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));
|
||||
mBitmap.set(mBitmapAsset->getImageFile(), mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));
|
||||
}
|
||||
|
||||
//verify the bitmap
|
||||
|
|
|
|||
|
|
@ -475,10 +475,6 @@ public:
|
|||
{
|
||||
if (mBitmapAssetId != _in || mBitmapName != _in)
|
||||
{
|
||||
if (mBitmapAsset.notNull())
|
||||
{
|
||||
mBitmapAsset->getChangedSignal().remove(this, &GuiControlProfile::onBitmapChanged);
|
||||
}
|
||||
if (_in == StringTable->EmptyString())
|
||||
{
|
||||
mBitmapName = StringTable->EmptyString();
|
||||
|
|
@ -530,10 +526,6 @@ public:
|
|||
}
|
||||
if (getBitmap() != StringTable->EmptyString() && mBitmapName != StringTable->insert("texhandle"))
|
||||
{
|
||||
if (mBitmapAsset.notNull())
|
||||
{
|
||||
mBitmapAsset->getChangedSignal().notify(this, &GuiControlProfile::onBitmapChanged);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -551,8 +543,8 @@ public:
|
|||
|
||||
const StringTableEntry getBitmap() const
|
||||
{
|
||||
if (mBitmapAsset && (mBitmapAsset->getImageFileName() != StringTable->EmptyString()))
|
||||
return Platform::makeRelativePathName(mBitmapAsset->getImagePath(), Platform::getMainDotCsDir());
|
||||
if (mBitmapAsset && (mBitmapAsset->getImageFile() != StringTable->EmptyString()))
|
||||
return Platform::makeRelativePathName(mBitmapAsset->getImageFile(), Platform::getMainDotCsDir());
|
||||
else if (mBitmapAssetId != StringTable->EmptyString())
|
||||
return mBitmapAssetId;
|
||||
else if (mBitmapName != StringTable->EmptyString())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue