Used object initializers

This commit is contained in:
Flamefire committed 2013-04-23 22:11:32 +02:00
1 parent 477b023520
commit b8fe334153
47 files changed
+289 -515

No files matched your search

+2 -7
View File
@@ -121,8 +121,7 @@ namespace VocaluxeLib.Menu
public CStatic(int partyModeID, string textureSkinName, SColorF color, SRectF rect)
{
_PartyModeID = partyModeID;
_Theme = new SThemeStatic();
_Theme.TextureName = textureSkinName;
_Theme = new SThemeStatic {TextureName = textureSkinName};
_ThemeLoaded = false;
_Texture = new STexture(-1);
@@ -244,11 +243,7 @@ namespace VocaluxeLib.Menu
public void Draw(float scale, float z, EAspect aspect, bool forceDraw)
{
STexture texture;
if (_Texture.Index != -1)
texture = _Texture;
else
texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
STexture texture = _Texture.Index != -1 ? _Texture : CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
SRectF bounds = new SRectF(
Rect.X - Rect.W * (scale - 1f),