Rename CTexture to CTextureRef to reflect it is only a reference
This commit is contained in:
1 parent
3fe8cdf05c
commit
7f8e974fe1
51 files changed
+290
-285
No files matched your search
@@ -55,7 +55,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private int _SlideShowCurrent;
|
||||
private readonly Stopwatch _SlideShowTimer = new Stopwatch();
|
||||
private readonly List<CTexture> _SlideShowTextures = new List<CTexture>();
|
||||
private readonly List<CTextureRef> _SlideShowTextures = new List<CTextureRef>();
|
||||
|
||||
public SColorF Color;
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.Type = EBackgroundTypes.SlideShow;
|
||||
if (!String.IsNullOrEmpty(image))
|
||||
{
|
||||
CTexture texture = CBase.Drawing.AddTexture(image);
|
||||
CTextureRef texture = CBase.Drawing.AddTexture(image);
|
||||
if (texture != null)
|
||||
_SlideShowTextures.Add(texture);
|
||||
}
|
||||
@@ -231,9 +231,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void RemoveSlideShowTextures()
|
||||
{
|
||||
foreach (CTexture tex in _SlideShowTextures)
|
||||
foreach (CTextureRef tex in _SlideShowTextures)
|
||||
{
|
||||
CTexture texture = tex;
|
||||
CTextureRef texture = tex;
|
||||
CBase.Drawing.RemoveTexture(ref texture);
|
||||
}
|
||||
_SlideShowTextures.Clear();
|
||||
@@ -256,7 +256,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawTexture()
|
||||
{
|
||||
CTexture texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
CTextureRef texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
if (texture != null)
|
||||
{
|
||||
var bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
@@ -288,7 +288,7 @@ namespace VocaluxeLib.Menu
|
||||
_SlideShowCurrent = 0;
|
||||
}
|
||||
|
||||
CTexture texture = _SlideShowTextures[_SlideShowCurrent];
|
||||
CTextureRef texture = _SlideShowTextures[_SlideShowCurrent];
|
||||
|
||||
if (texture == null)
|
||||
return false;
|
||||
@@ -323,7 +323,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawVideo()
|
||||
{
|
||||
CTexture videoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
CTextureRef videoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
if (videoTexture != null)
|
||||
{
|
||||
var bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
@@ -338,7 +338,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawBackgroundMusicVideo()
|
||||
{
|
||||
CTexture videoTexture = CBase.BackgroundMusic.GetVideoTexture();
|
||||
CTextureRef videoTexture = CBase.BackgroundMusic.GetVideoTexture();
|
||||
if (videoTexture != null)
|
||||
{
|
||||
var bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace VocaluxeLib.Menu
|
||||
private bool _ThemeLoaded;
|
||||
private readonly int _PartyModeID;
|
||||
|
||||
public CTexture Texture;
|
||||
public CTexture SelTexture;
|
||||
public CTextureRef Texture;
|
||||
public CTextureRef SelTexture;
|
||||
public SRectF Rect;
|
||||
public SColorF Color;
|
||||
public SColorF SelColor;
|
||||
@@ -290,7 +290,7 @@ namespace VocaluxeLib.Menu
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme && !forceDraw)
|
||||
return;
|
||||
|
||||
CTexture texture;
|
||||
CTextureRef texture;
|
||||
|
||||
if (!Selected && !Pressed || !_Enabled)
|
||||
{
|
||||
|
||||
@@ -476,7 +476,7 @@ namespace VocaluxeLib.Menu
|
||||
return new CStatic(oldStatic);
|
||||
}
|
||||
|
||||
public CStatic GetNewStatic(CTexture texture, SColorF color, SRectF rect)
|
||||
public CStatic GetNewStatic(CTextureRef texture, SColorF color, SRectF rect)
|
||||
{
|
||||
return new CStatic(_PartyModeID, texture, color, rect);
|
||||
}
|
||||
@@ -521,7 +521,7 @@ namespace VocaluxeLib.Menu
|
||||
return new CPlaylist(_PartyModeID);
|
||||
}
|
||||
|
||||
public CParticleEffect GetNewParticleEffect(int maxNumber, SColorF color, SRectF area, CTexture texture, float size, EParticleType type)
|
||||
public CParticleEffect GetNewParticleEffect(int maxNumber, SColorF color, SRectF area, CTextureRef texture, float size, EParticleType type)
|
||||
{
|
||||
return new CParticleEffect(_PartyModeID, maxNumber, color, area, texture, size, type);
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ namespace VocaluxeLib.Menu
|
||||
for (int i = 0; i < _TeamList[_CurrentTeam].Count; i++)
|
||||
{
|
||||
string name = CBase.Profiles.GetPlayerName(_TeamList[_CurrentTeam][i]);
|
||||
CTexture avatar = CBase.Profiles.GetAvatar(_TeamList[_CurrentTeam][i]);
|
||||
CTextureRef avatar = CBase.Profiles.GetAvatar(_TeamList[_CurrentTeam][i]);
|
||||
_SelectSlides[_SelectSlidePlayer].AddValue(name, avatar);
|
||||
}
|
||||
for (int i = _TeamList[_CurrentTeam].Count; i < _NumPlayerTeams[_CurrentTeam]; i++)
|
||||
|
||||
@@ -69,9 +69,9 @@ namespace VocaluxeLib.Menu
|
||||
public SRectF Rect;
|
||||
private readonly List<CTile> _Tiles;
|
||||
|
||||
private CTexture _TextureEmptyTile;
|
||||
private CTexture _TextureTileSelected;
|
||||
public CTexture TextureEmptyTile
|
||||
private CTextureRef _TextureEmptyTile;
|
||||
private CTextureRef _TextureTileSelected;
|
||||
public CTextureRef TextureEmptyTile
|
||||
{
|
||||
get { return _TextureEmptyTile; }
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace VocaluxeLib.Menu
|
||||
#region private vars
|
||||
private readonly int _PartyModeID;
|
||||
private readonly string _TextureName;
|
||||
private readonly CTexture _Texture;
|
||||
private readonly CTextureRef _Texture;
|
||||
private SRectF _Rect;
|
||||
private float _Size;
|
||||
private SColorF _Color;
|
||||
@@ -127,7 +127,7 @@ namespace VocaluxeLib.Menu
|
||||
_Rotation = (float)(CBase.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
|
||||
public CParticle(int partyModeID, CTexture texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize,
|
||||
public CParticle(int partyModeID, CTextureRef texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize,
|
||||
EParticleType type)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
@@ -300,7 +300,7 @@ namespace VocaluxeLib.Menu
|
||||
private SThemeParticleEffect _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
public CTexture Texture;
|
||||
public CTextureRef Texture;
|
||||
public SColorF Color;
|
||||
public SRectF Rect;
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace VocaluxeLib.Menu
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public CParticleEffect(int partyModeID, int maxNumber, SColorF color, SRectF rect, CTexture texture, float size, EParticleType type)
|
||||
public CParticleEffect(int partyModeID, int maxNumber, SColorF color, SRectF rect, CTextureRef texture, float size, EParticleType type)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
_Theme = new SThemeParticleEffect();
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private CTexture _GetTextureValue(string value)
|
||||
private CTextureRef _GetTextureValue(string value)
|
||||
{
|
||||
return CBase.Theme.GetSkinTexture(value, _PartyModeID);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private readonly List<string> _ValueNames;
|
||||
private readonly List<int> _ValuePartyModeIDs;
|
||||
private readonly List<CTexture> _Textures;
|
||||
private readonly List<CTextureRef> _Textures;
|
||||
private readonly List<int> _ValueIndexes;
|
||||
|
||||
private readonly List<SRectF> _ValueBounds = new List<SRectF>();
|
||||
@@ -179,7 +179,7 @@ namespace VocaluxeLib.Menu
|
||||
MaxW = 0f;
|
||||
|
||||
_Selected = false;
|
||||
_Textures = new List<CTexture>();
|
||||
_Textures = new List<CTextureRef>();
|
||||
_ValueIndexes = new List<int>();
|
||||
_ValueNames = new List<string>();
|
||||
_ValuePartyModeIDs = new List<int>();
|
||||
@@ -227,7 +227,7 @@ namespace VocaluxeLib.Menu
|
||||
MaxW = slide.MaxW;
|
||||
|
||||
_Selected = slide._Selected;
|
||||
_Textures = new List<CTexture>(slide._Textures);
|
||||
_Textures = new List<CTextureRef>(slide._Textures);
|
||||
_ValueIndexes = new List<int>(slide._ValueIndexes);
|
||||
_ValueNames = new List<string>(slide._ValueNames);
|
||||
_ValueBounds = new List<SRectF>(slide._ValueBounds);
|
||||
@@ -534,17 +534,17 @@ namespace VocaluxeLib.Menu
|
||||
AddValue(value, null, _ValueIndexes.Count, partyModeID);
|
||||
}
|
||||
|
||||
public void AddValue(string value, CTexture texture)
|
||||
public void AddValue(string value, CTextureRef texture)
|
||||
{
|
||||
AddValue(value, texture, _ValueIndexes.Count, _PartyModeID);
|
||||
}
|
||||
|
||||
private void _AddValue(string value, CTexture texture, int valueIndex)
|
||||
private void _AddValue(string value, CTextureRef texture, int valueIndex)
|
||||
{
|
||||
AddValue(value, texture, valueIndex, _PartyModeID);
|
||||
}
|
||||
|
||||
public void AddValue(string value, CTexture texture, int valueIndex, int partyModeID)
|
||||
public void AddValue(string value, CTextureRef texture, int valueIndex, int partyModeID)
|
||||
{
|
||||
_ValueNames.Add(value);
|
||||
_Textures.Add(texture);
|
||||
@@ -565,7 +565,7 @@ namespace VocaluxeLib.Menu
|
||||
_ValueBounds.Clear();
|
||||
}
|
||||
|
||||
public void AddValues(string[] values, CTexture[] textures)
|
||||
public void AddValues(string[] values, CTextureRef[] textures)
|
||||
{
|
||||
if (values.Length != textures.Length)
|
||||
return;
|
||||
@@ -589,7 +589,7 @@ namespace VocaluxeLib.Menu
|
||||
RenameValue(Selection, newName);
|
||||
}
|
||||
|
||||
public void RenameValue(int selection, string newName, CTexture newTexture = null)
|
||||
public void RenameValue(int selection, string newName, CTextureRef newTexture = null)
|
||||
{
|
||||
if (selection < 0 && selection >= _ValueNames.Count)
|
||||
return;
|
||||
@@ -713,15 +713,15 @@ namespace VocaluxeLib.Menu
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
return;
|
||||
|
||||
CTexture texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
CTexture textureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
CTexture textureArrowRight = CBase.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
CTextureRef texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
CTextureRef textureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
CTextureRef textureArrowRight = CBase.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
|
||||
CTexture selTexture = CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
|
||||
CTexture selTextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID);
|
||||
CTexture selTextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID);
|
||||
CTextureRef selTexture = CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
|
||||
CTextureRef selTextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID);
|
||||
CTextureRef selTextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID);
|
||||
|
||||
CTexture highlightTexture = CBase.Theme.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID);
|
||||
CTextureRef highlightTexture = CBase.Theme.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID);
|
||||
|
||||
if (Selected)
|
||||
{
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace VocaluxeLib.Menu
|
||||
return _Theme.Name;
|
||||
}
|
||||
|
||||
private CTexture _Texture;
|
||||
public CTexture Texture
|
||||
private CTextureRef _Texture;
|
||||
public CTextureRef Texture
|
||||
{
|
||||
get { return _Texture ?? CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); }
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace VocaluxeLib.Menu
|
||||
Visible = s.Visible;
|
||||
}
|
||||
|
||||
public CStatic(int partyModeID, CTexture texture, SColorF color, SRectF rect)
|
||||
public CStatic(int partyModeID, CTextureRef texture, SColorF color, SRectF rect)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw(EAspect aspect, float scale = 1f, float zModify = 0f, bool forceDraw = false)
|
||||
{
|
||||
CTexture texture = Texture;
|
||||
CTextureRef texture = Texture;
|
||||
SRectF bounds = Rect.Scale(scale);
|
||||
SRectF rect;
|
||||
if (aspect != EAspect.Stretch && texture != null)
|
||||
|
||||
@@ -472,9 +472,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
var noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, rect.Z);
|
||||
|
||||
CTexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
CTexture noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
CTexture noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
CTextureRef noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
CTextureRef noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
CTextureRef noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
|
||||
//Width of each of the ends (round parts)
|
||||
//Need 2 of them so use minimum
|
||||
@@ -519,9 +519,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
rect.Z
|
||||
);
|
||||
|
||||
CTexture noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
CTexture noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
CTexture noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
CTextureRef noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
CTextureRef noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
CTextureRef noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
|
||||
float dx = r.H * noteBackgroundBegin.OrigAspect;
|
||||
if (2 * dx > r.W)
|
||||
@@ -614,7 +614,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
rect.Z
|
||||
);
|
||||
|
||||
CTexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
CTextureRef noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = r.H * noteBegin.OrigAspect;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
@@ -671,7 +671,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
CTexture toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CTextureRef toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Drawing.DrawTexture(toneHelper, drawRect, color);
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private CStatic _MedleyCalcIcon;
|
||||
private CStatic _MedleyTagIcon;
|
||||
|
||||
private CTexture _CoverBigBGTexture;
|
||||
private CTexture _CoverBGTexture;
|
||||
private CTextureRef _CoverBigBGTexture;
|
||||
private CTextureRef _CoverBGTexture;
|
||||
|
||||
private CText _Artist;
|
||||
private CText _Title;
|
||||
@@ -467,7 +467,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
_TextBG.Draw();
|
||||
|
||||
CTexture vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
|
||||
if (vidtex != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user