Changed usage of CTexture.Index: You only need to check for null as of last commit
This commit is contained in:
1 parent
142a690cc6
commit
e43f5e7b0a
8 files changed
+37
-51
No files matched your search
@@ -46,7 +46,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
get { return _CoverTextureBig ?? _CoverTextureSmall; }
|
||||
set
|
||||
{
|
||||
if (value.Index == -1)
|
||||
if (value == null)
|
||||
return;
|
||||
_CoverTextureBig = value;
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
if ((tile.Texture.Index != _CoverTexture.Index) && CHelper.IsInBounds(tile.Rect, mouseEvent) && !sel)
|
||||
if (tile.Texture != _CoverTexture && CHelper.IsInBounds(tile.Rect, mouseEvent) && !sel)
|
||||
{
|
||||
if (mouseEvent.LB || !CBase.Songs.IsInCategory())
|
||||
{
|
||||
@@ -371,7 +371,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
if ((tile.Texture.Index != _CoverTexture.Index) && CHelper.IsInBounds(tile.Rect, mouseEvent))
|
||||
if (tile.Texture != _CoverTexture && CHelper.IsInBounds(tile.Rect, mouseEvent))
|
||||
{
|
||||
_EnterCategory(_PreviewSelected);
|
||||
mouseEvent.Handled = true;
|
||||
@@ -394,7 +394,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
else
|
||||
{
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (tile.Texture.Index != _CoverTexture.Index)
|
||||
if (tile.Texture != _CoverTexture)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
tile.Draw(1f, tile.Rect.Z, EAspect.Crop);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user