Used object initializers
This commit is contained in:
1 parent
477b023520
commit
b8fe334153
47 files changed
+289
-515
No files matched your search
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user