Changed usage of CTexture.Index: You only need to check for null as of last commit

This commit is contained in:
Flamefire committed 2013-05-06 20:18:17 +02:00
1 parent 142a690cc6
commit e43f5e7b0a
8 files changed
+37 -51

No files matched your search

+3 -3
View File
@@ -285,7 +285,7 @@ namespace VocaluxeLib.Menu
if (!Selected && !Pressed || !Enabled)
{
texture = Texture.Index != -1 ? Texture : CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
texture = Texture ?? CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
CBase.Drawing.DrawTexture(texture, Rect, Color);
@@ -299,7 +299,7 @@ namespace VocaluxeLib.Menu
}
else if (!_IsSelText)
{
texture = Texture.Index != -1 ? Texture : CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
texture = Texture ?? CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
CBase.Drawing.DrawTexture(texture, Rect, SelColor);
@@ -313,7 +313,7 @@ namespace VocaluxeLib.Menu
}
else if (_IsSelText)
{
texture = SelTexture.Index != -1 ? SelTexture : CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
texture = SelTexture ?? CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
CBase.Drawing.DrawTexture(texture, Rect, SelColor);