added partymodeID to all elements, fixed bug in buttons (text was drawn twice)
This commit is contained in:
1 parent
632206c317
commit
9257e6f134
32 files changed
+725
-136
No files matched your search
@@ -30,6 +30,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CBackground : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeBackground _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -42,8 +43,9 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
|
||||
#region Constructors
|
||||
public CBackground(Basic Base)
|
||||
public CBackground(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_ThemeLoaded = false;
|
||||
_Theme = new SThemeBackground();
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Vocaluxe.Menu
|
||||
private Basic _Base;
|
||||
private SThemeButton _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
private int _PartyModeID;
|
||||
|
||||
public SRectF Rect;
|
||||
public SColorF Color;
|
||||
@@ -69,8 +70,9 @@ namespace Vocaluxe.Menu
|
||||
return _Theme.Name;
|
||||
}
|
||||
|
||||
public CButton(Basic Base)
|
||||
public CButton(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeButton();
|
||||
Rect = new SRectF();
|
||||
@@ -78,8 +80,8 @@ namespace Vocaluxe.Menu
|
||||
SColor = new SColorF();
|
||||
|
||||
SelText = false;
|
||||
Text = new CText(_Base);
|
||||
SText = new CText(_Base);
|
||||
Text = new CText(_Base, _PartyModeID);
|
||||
SText = new CText(_Base, _PartyModeID);
|
||||
Selected = false;
|
||||
Visible = true;
|
||||
EditMode = false;
|
||||
@@ -269,34 +271,40 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.TextureName);
|
||||
_Base.Drawing.DrawTexture(texture, Rect, Color);
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
}
|
||||
else if(!SelText)
|
||||
{
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.STextureName);
|
||||
_Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
Text.DrawRelative(Rect.X, Rect.Y);
|
||||
}
|
||||
else if(SelText)
|
||||
{
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.STextureName);
|
||||
_Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
SText.DrawRelative(Rect.X, Rect.Y);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
SText.DrawRelative(Rect.X, Rect.Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CEqualizer : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeEqualizer _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -52,8 +53,9 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private float[] _Bars;
|
||||
|
||||
public CEqualizer(Basic Base)
|
||||
public CEqualizer(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeEqualizer();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CLyric : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeLyrics _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -86,8 +87,9 @@ namespace Vocaluxe.Menu
|
||||
set { _Style = value; }
|
||||
}
|
||||
|
||||
public CLyric(Basic Base)
|
||||
public CLyric(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeLyrics();
|
||||
_ThemeLoaded = false;
|
||||
@@ -101,7 +103,7 @@ namespace Vocaluxe.Menu
|
||||
_H = 1f;
|
||||
_width = 1f;
|
||||
_Notes = new List<SNote>();
|
||||
_Text = new CText(_Base);
|
||||
_Text = new CText(_Base, _PartyModeID);
|
||||
|
||||
_Style = ELyricStyle.Fill;
|
||||
}
|
||||
|
||||
+30
-34
@@ -201,7 +201,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeBackgrounds.Length; i++)
|
||||
{
|
||||
CBackground background = new CBackground(_Base);
|
||||
CBackground background = new CBackground(_Base, _PartyModeID);
|
||||
if (background.LoadTheme("//root/" + _ThemeName, _ThemeBackgrounds[i], navigator, SkinIndex))
|
||||
{
|
||||
_htBackgrounds.Add(_ThemeBackgrounds[i], AddBackground(background));
|
||||
@@ -217,7 +217,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeStatics.Length; i++)
|
||||
{
|
||||
CStatic stat = new CStatic(_Base);
|
||||
CStatic stat = new CStatic(_Base, _PartyModeID);
|
||||
if (stat.LoadTheme("//root/" + _ThemeName, _ThemeStatics[i], navigator, SkinIndex))
|
||||
{
|
||||
_htStatics.Add(_ThemeStatics[i], AddStatic(stat));
|
||||
@@ -233,8 +233,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeTexts.Length; i++)
|
||||
{
|
||||
CText text = new CText(_Base);
|
||||
text.PartyModeID = _PartyModeID;
|
||||
CText text = new CText(_Base, _PartyModeID);
|
||||
if (text.LoadTheme("//root/" + _ThemeName, _ThemeTexts[i], navigator, SkinIndex))
|
||||
{
|
||||
_htTexts.Add(_ThemeTexts[i], AddText(text));
|
||||
@@ -250,7 +249,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeButtons.Length; i++)
|
||||
{
|
||||
CButton button = new CButton(_Base);
|
||||
CButton button = new CButton(_Base, _PartyModeID);
|
||||
if (button.LoadTheme("//root/" + _ThemeName, _ThemeButtons[i], navigator, SkinIndex))
|
||||
{
|
||||
_htButtons.Add(_ThemeButtons[i], AddButton(button));
|
||||
@@ -266,7 +265,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeSelectSlides.Length; i++)
|
||||
{
|
||||
CSelectSlide slide = new CSelectSlide(_Base);
|
||||
CSelectSlide slide = new CSelectSlide(_Base, _PartyModeID);
|
||||
if (slide.LoadTheme("//root/" + _ThemeName, _ThemeSelectSlides[i], navigator, SkinIndex))
|
||||
{
|
||||
_htSelectSlides.Add(_ThemeSelectSlides[i], AddSelectSlide(slide));
|
||||
@@ -282,7 +281,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeSongMenus.Length; i++)
|
||||
{
|
||||
CSongMenu sm = new CSongMenu(_Base);
|
||||
CSongMenu sm = new CSongMenu(_Base, _PartyModeID);
|
||||
if (sm.LoadTheme("//root/" + _ThemeName, _ThemeSongMenus[i], navigator, SkinIndex))
|
||||
{
|
||||
_htSongMenus.Add(_ThemeSongMenus[i], AddSongMenu(sm));
|
||||
@@ -298,7 +297,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeLyrics.Length; i++)
|
||||
{
|
||||
CLyric lyric = new CLyric(_Base);
|
||||
CLyric lyric = new CLyric(_Base, _PartyModeID);
|
||||
if (lyric.LoadTheme("//root/" + _ThemeName, _ThemeLyrics[i], navigator, SkinIndex))
|
||||
{
|
||||
_htLyrics.Add(_ThemeLyrics[i], AddLyric(lyric));
|
||||
@@ -314,7 +313,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeSingNotes.Length; i++)
|
||||
{
|
||||
CSingNotes notes = new CSingNotesClassic(_Base);
|
||||
CSingNotes notes = new CSingNotesClassic(_Base, _PartyModeID);
|
||||
if (notes.LoadTheme("//root/" + _ThemeName, _ThemeSingNotes[i], navigator, SkinIndex))
|
||||
{
|
||||
_htSingNotes.Add(_ThemeSingNotes[i], AddSingNote(notes));
|
||||
@@ -330,7 +329,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeNameSelections.Length; i++)
|
||||
{
|
||||
CNameSelection nsel = new CNameSelection(_Base);
|
||||
CNameSelection nsel = new CNameSelection(_Base, _PartyModeID);
|
||||
if (nsel.LoadTheme("//root/" + _ThemeName, _ThemeNameSelections[i], navigator, SkinIndex))
|
||||
{
|
||||
_htNameSelections.Add(_ThemeNameSelections[i], AddNameSelection(nsel));
|
||||
@@ -346,7 +345,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeEqualizers.Length; i++)
|
||||
{
|
||||
CEqualizer eq = new CEqualizer(_Base);
|
||||
CEqualizer eq = new CEqualizer(_Base, _PartyModeID);
|
||||
if (eq.LoadTheme("//root/" + _ThemeName, _ThemeEqualizers[i], navigator, SkinIndex))
|
||||
{
|
||||
_htEqualizers.Add(_ThemeEqualizers[i], AddEqualizer(eq));
|
||||
@@ -362,7 +361,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemePlaylists.Length; i++)
|
||||
{
|
||||
CPlaylist pls = new CPlaylist(_Base);
|
||||
CPlaylist pls = new CPlaylist(_Base, _PartyModeID);
|
||||
if (pls.LoadTheme("//root/" + _ThemeName, _ThemePlaylists[i], navigator, SkinIndex))
|
||||
{
|
||||
_htPlaylists.Add(_ThemePlaylists[i], AddPlaylist(pls));
|
||||
@@ -661,12 +660,12 @@ namespace Vocaluxe.Menu
|
||||
#region Create Elements
|
||||
public CButton GetNewButton()
|
||||
{
|
||||
return new CButton(_Base);
|
||||
return new CButton(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CText GetNewText()
|
||||
{
|
||||
return new CText(_Base);
|
||||
return new CText(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CText GetNewText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
|
||||
@@ -677,57 +676,57 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CBackground GetNewBackground()
|
||||
{
|
||||
return new CBackground(_Base);
|
||||
return new CBackground(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CStatic GetNewStatic()
|
||||
{
|
||||
return new CStatic(_Base);
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CStatic GetNewStatic(STexture Texture, SColorF Color, SRectF Rect)
|
||||
{
|
||||
return new CStatic(_Base, Texture, Color, Rect);
|
||||
return new CStatic(_Base, _PartyModeID, Texture, Color, Rect);
|
||||
}
|
||||
|
||||
public CSelectSlide GetNewSelectSlide()
|
||||
{
|
||||
return new CSelectSlide(_Base);
|
||||
return new CSelectSlide(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CSongMenu GetNewSongMenu()
|
||||
{
|
||||
return new CSongMenu(_Base);
|
||||
return new CSongMenu(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CLyric GetNewLyric()
|
||||
{
|
||||
return new CLyric(_Base);
|
||||
return new CLyric(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CSingNotes GetNewSingNotes()
|
||||
{
|
||||
return new CSingNotesClassic(_Base);
|
||||
return new CSingNotesClassic(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CNameSelection GetNewNameSelection()
|
||||
{
|
||||
return new CNameSelection(_Base);
|
||||
return new CNameSelection(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CEqualizer GetNewEqualizer()
|
||||
{
|
||||
return new CEqualizer(_Base);
|
||||
return new CEqualizer(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CPlaylist GetNewPlaylist()
|
||||
{
|
||||
return new CPlaylist(_Base);
|
||||
return new CPlaylist(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public CParticleEffect GetNewParticleEffect(int MaxNumber, SColorF Color, SRectF Area, STexture Texture, float Size, EParticeType Type)
|
||||
{
|
||||
return new CParticleEffect(_Base, MaxNumber, Color, Area, Texture, Size, Type);
|
||||
return new CParticleEffect(_Base, _PartyModeID, MaxNumber, Color, Area, Texture, Size, Type);
|
||||
}
|
||||
#endregion Create Elements
|
||||
|
||||
@@ -1302,7 +1301,6 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public int AddText(CText text)
|
||||
{
|
||||
text.PartyModeID = _PartyModeID;
|
||||
_Texts.Add(text);
|
||||
_AddInteraction(_Texts.Count - 1, EType.TText);
|
||||
return _Texts.Count - 1;
|
||||
@@ -2293,34 +2291,32 @@ namespace Vocaluxe.Menu
|
||||
string value = String.Empty;
|
||||
|
||||
// Backgrounds
|
||||
CBackground background = new CBackground(_Base);
|
||||
CBackground background = new CBackground(_Base, _PartyModeID);
|
||||
int i = 1;
|
||||
while (background.LoadTheme("//root/" + _ThemeName, "Background" + i.ToString(), navigator, SkinIndex))
|
||||
{
|
||||
AddBackground(background);
|
||||
background = new CBackground(_Base);
|
||||
background = new CBackground(_Base, _PartyModeID);
|
||||
i++;
|
||||
}
|
||||
|
||||
// Statics
|
||||
CStatic stat = new CStatic(_Base);
|
||||
CStatic stat = new CStatic(_Base, _PartyModeID);
|
||||
i = 1;
|
||||
while (stat.LoadTheme("//root/" + _ThemeName, "Static" + i.ToString(), navigator, SkinIndex))
|
||||
{
|
||||
AddStatic(stat);
|
||||
stat = new CStatic(_Base);
|
||||
stat = new CStatic(_Base, _PartyModeID);
|
||||
i++;
|
||||
}
|
||||
|
||||
// Texts
|
||||
CText text = new CText(_Base);
|
||||
text.PartyModeID = _PartyModeID;
|
||||
CText text = new CText(_Base, _PartyModeID);
|
||||
i = 1;
|
||||
while (text.LoadTheme("//root/" + _ThemeName, "Text" + i.ToString(), navigator, SkinIndex))
|
||||
{
|
||||
AddText(text);
|
||||
text = new CText(_Base);
|
||||
text.PartyModeID = _PartyModeID;
|
||||
text = new CText(_Base, _PartyModeID);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeNameSelection _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -84,8 +85,9 @@ namespace Vocaluxe.Menu
|
||||
private CStatic PlayerSelector;
|
||||
|
||||
|
||||
public CNameSelection(Basic Base)
|
||||
public CNameSelection(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeNameSelection();
|
||||
|
||||
@@ -97,7 +99,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
PrepareTiles();
|
||||
|
||||
PlayerSelector = new CStatic(_Base);
|
||||
PlayerSelector = new CStatic(_Base, _PartyModeID);
|
||||
PlayerSelector.Texture = _TextureTileSelected;
|
||||
PlayerSelector.Rect = new SRectF(0, 0, (_TileW + 6), (_TileH + 6), (Rect.Z - 0.5f));
|
||||
PlayerSelector.Visible = false;
|
||||
@@ -466,7 +468,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
|
||||
return new CStatic(_Base);
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public void UnloadTextures()
|
||||
@@ -501,7 +503,7 @@ namespace Vocaluxe.Menu
|
||||
for (int j = 0; j < _NumW; j++)
|
||||
{
|
||||
SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
||||
CStatic tileStatic = new CStatic(_Base, _TextureEmptyTile, ColorEmptyTile, rect);
|
||||
CStatic tileStatic = new CStatic(_Base, _PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect);
|
||||
CText tileText = new CText(_Base, rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "");
|
||||
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Vocaluxe.Menu
|
||||
class CParticle
|
||||
{
|
||||
#region private vars
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private string _TextureName;
|
||||
private STexture _Texture;
|
||||
@@ -84,8 +85,9 @@ namespace Vocaluxe.Menu
|
||||
#endregion public vars
|
||||
|
||||
#region Constructors
|
||||
public CParticle(Basic Base, string textureName, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticeType type)
|
||||
public CParticle(Basic Base, int PartyModeID, string textureName, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticeType type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_TextureName = textureName;
|
||||
_Texture = new STexture(-1);
|
||||
@@ -107,8 +109,9 @@ namespace Vocaluxe.Menu
|
||||
_Rotation = (float)(_Base.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
|
||||
public CParticle(Basic Base, STexture texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticeType type)
|
||||
public CParticle(Basic Base, int PartyModeID, STexture texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticeType type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_TextureName = String.Empty;
|
||||
_Texture = texture;
|
||||
@@ -288,6 +291,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CParticleEffect
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private List<CParticle> _Stars;
|
||||
private string _TextureName;
|
||||
@@ -316,8 +320,9 @@ namespace Vocaluxe.Menu
|
||||
set { _Area = value; }
|
||||
}
|
||||
|
||||
public CParticleEffect(Basic Base, int MaxNumber, SColorF Color, SRectF Area, string TextureName, float Size, EParticeType Type)
|
||||
public CParticleEffect(Basic Base, int PartyModeID, int MaxNumber, SColorF Color, SRectF Area, string TextureName, float Size, EParticeType Type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Stars = new List<CParticle>();
|
||||
_Area = Area;
|
||||
@@ -331,8 +336,9 @@ namespace Vocaluxe.Menu
|
||||
_NextSpawnTime = 0f;
|
||||
}
|
||||
|
||||
public CParticleEffect(Basic Base, int MaxNumber, SColorF Color, SRectF Area, STexture texture, float Size, EParticeType Type)
|
||||
public CParticleEffect(Basic Base, int PartyModeID, int MaxNumber, SColorF Color, SRectF Area, STexture texture, float Size, EParticeType Type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Stars = new List<CParticle>();
|
||||
_Area = Area;
|
||||
@@ -439,14 +445,14 @@ namespace Vocaluxe.Menu
|
||||
CParticle star;
|
||||
if (_TextureName != String.Empty)
|
||||
{
|
||||
star = new CParticle(_Base, _TextureName, _Color,
|
||||
star = new CParticle(_Base, _PartyModeID, _TextureName, _Color,
|
||||
_Base.Game.GetRandom(w) + _Area.X - size / 4f,
|
||||
_Base.Game.GetRandom(h) + _Area.Y - size / 4f,
|
||||
size, lifetime, _Area.Z, vx, vy, vr, vsize, _Type);
|
||||
}
|
||||
else
|
||||
{
|
||||
star = new CParticle(_Base, _Texture, _Color,
|
||||
star = new CParticle(_Base, _PartyModeID, _Texture, _Color,
|
||||
_Base.Game.GetRandom(w) + _Area.X - size / 4f,
|
||||
_Base.Game.GetRandom(h) + _Area.Y - size / 4f,
|
||||
size, lifetime, _Area.Z, vx, vy, vr, vsize, _Type);
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Vocaluxe.Menu
|
||||
Text1.Y += diffY;
|
||||
}
|
||||
}
|
||||
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemePlaylist _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -191,20 +191,21 @@ namespace Vocaluxe.Menu
|
||||
|
||||
//private static
|
||||
|
||||
public CPlaylist(Basic Base)
|
||||
public CPlaylist(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemePlaylist();
|
||||
_Theme.Text1 = new CText(_Base);
|
||||
_Theme.StaticCover = new CStatic(_Base);
|
||||
_Theme.StaticPlaylistFooter = new CStatic(_Base);
|
||||
_Theme.StaticPlaylistHeader = new CStatic(_Base);
|
||||
_Theme.ButtonPlaylistName = new CButton(_Base);
|
||||
_Theme.ButtonPlaylistClose = new CButton(_Base);
|
||||
_Theme.ButtonPlaylistDelete = new CButton(_Base);
|
||||
_Theme.ButtonPlaylistSave = new CButton(_Base);
|
||||
_Theme.ButtonPlaylistSing = new CButton(_Base);
|
||||
_Theme.SelectSlideGameMode = new CSelectSlide(_Base);
|
||||
_Theme.Text1 = new CText(_Base, _PartyModeID);
|
||||
_Theme.StaticCover = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.StaticPlaylistFooter = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.StaticPlaylistHeader = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistName = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistClose = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistDelete = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistSave = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistSing = new CButton(_Base, _PartyModeID);
|
||||
_Theme.SelectSlideGameMode = new CSelectSlide(_Base, _PartyModeID);
|
||||
|
||||
CompleteRect = new SRectF();
|
||||
Rect = new SRectF();
|
||||
@@ -1121,7 +1122,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
PlaylistElement en = new PlaylistElement(_Base);
|
||||
|
||||
en.Background = new CStatic(_Base, _Theme.TextureBackgroundName, BackgroundColor, new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z));
|
||||
en.Background = new CStatic(_Base, _PartyModeID, _Theme.TextureBackgroundName, BackgroundColor, new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z));
|
||||
|
||||
en.Cover = new CStatic(_Theme.StaticCover);
|
||||
en.Cover.Rect.Y += Rect.Y + (i * _Theme.EntryHeight);
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CSelectSlide : IMenuElement, ICloneable
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeSelectSlide _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -140,8 +141,9 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
|
||||
public CSelectSlide(Basic Base)
|
||||
public CSelectSlide(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeSelectSlide();
|
||||
_ThemeLoaded = false;
|
||||
@@ -170,6 +172,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CSelectSlide(CSelectSlide slide)
|
||||
{
|
||||
_PartyModeID = slide._PartyModeID;
|
||||
_Base = slide._Base;
|
||||
_Theme = new SThemeSelectSlide();
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CStatic : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
|
||||
private SThemeStatic _Theme;
|
||||
@@ -54,8 +55,9 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public EAspect Aspect = EAspect.Stretch;
|
||||
|
||||
public CStatic(Basic Base)
|
||||
public CStatic(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_ThemeLoaded = false;
|
||||
@@ -74,6 +76,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CStatic(CStatic s)
|
||||
{
|
||||
_PartyModeID = s._PartyModeID;
|
||||
_Base = s._Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_ThemeLoaded = false;
|
||||
@@ -90,8 +93,9 @@ namespace Vocaluxe.Menu
|
||||
Visible = s.Visible;
|
||||
}
|
||||
|
||||
public CStatic(Basic Base, STexture texture, SColorF color, SRectF rect)
|
||||
public CStatic(Basic Base, int PartyModeID, STexture texture, SColorF color, SRectF rect)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_ThemeLoaded = false;
|
||||
@@ -108,8 +112,9 @@ namespace Vocaluxe.Menu
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public CStatic(Basic Base, string TextureSkinName, SColorF color, SRectF rect)
|
||||
public CStatic(Basic Base, int PartyModeID, string TextureSkinName, SColorF color, SRectF rect)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_Theme.TextureName = TextureSkinName;
|
||||
|
||||
@@ -231,13 +231,13 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public float Alpha = 1f;
|
||||
|
||||
public CText(Basic Base)
|
||||
public CText(Basic Base, int PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
_PartyModeID = -1;
|
||||
_PartyModeID = PartyModeID;
|
||||
|
||||
X = 0f;
|
||||
Y = 0f;
|
||||
@@ -695,7 +695,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(float begin, float end)
|
||||
{
|
||||
RectangleF bounds = _Base.Drawing.GetTextBounds(this);
|
||||
RectangleF bounds = _Base.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
float x = X;
|
||||
switch (Align)
|
||||
@@ -755,7 +755,10 @@ namespace Vocaluxe.Menu
|
||||
float x = X + rx;
|
||||
float y = Y + ry;
|
||||
|
||||
RectangleF bounds = _Base.Drawing.GetTextBounds(this);
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
|
||||
RectangleF bounds = _Base.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
if (bounds.Width > Bounds.W && Bounds.W > 0f && bounds.Width > 0f)
|
||||
{
|
||||
@@ -801,7 +804,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
|
||||
|
||||
if (!EditMode)
|
||||
_Base.Fonts.DrawText(_Text, h, x, y, Z, color);
|
||||
else
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
public abstract class CSingNotes : ISingNotes, IMenuElement
|
||||
{
|
||||
protected int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeSingBar _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -63,8 +64,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
set { _BarPos = value; }
|
||||
}
|
||||
|
||||
public CSingNotes(Basic Base)
|
||||
public CSingNotes(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeSingBar();
|
||||
_ThemeLoaded = false;
|
||||
@@ -618,7 +620,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
);
|
||||
|
||||
int numstars = (int)(r.W * 0.25f);
|
||||
CParticleEffect stars = new CParticleEffect(_Base, numstars, new SColorF(1f, 1f, 0f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticeType.Star);
|
||||
CParticleEffect stars = new CParticleEffect(_Base, _PartyModeID, numstars, new SColorF(1f, 1f, 0f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticeType.Star);
|
||||
_PlayerNotes[n].GoldenStars.Add(stars);
|
||||
}
|
||||
}
|
||||
@@ -646,7 +648,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect flares = new CParticleEffect(_Base, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticeType.Flare);
|
||||
CParticleEffect flares = new CParticleEffect(_Base, _PartyModeID, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticeType.Flare);
|
||||
_PlayerNotes[n].Flares.Add(flares);
|
||||
}
|
||||
|
||||
@@ -686,13 +688,13 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect stars = new CParticleEffect(_Base, _Base.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticeType.PerfNoteStar);
|
||||
CParticleEffect stars = new CParticleEffect(_Base, _PartyModeID, _Base.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticeType.PerfNoteStar);
|
||||
_PlayerNotes[n].PerfectNoteEffect.Add(stars);
|
||||
}
|
||||
|
||||
private void AddPerfectLine(int n)
|
||||
{
|
||||
CParticleEffect twinkle = new CParticleEffect(_Base, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStarName, 25, EParticeType.Twinkle);
|
||||
CParticleEffect twinkle = new CParticleEffect(_Base, _PartyModeID, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStarName, 25, EParticeType.Twinkle);
|
||||
_PlayerNotes[n].PerfectLineTwinkle.Add(twinkle);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
{
|
||||
private Basic _Base;
|
||||
|
||||
public CSingNotesClassic(Basic Base)
|
||||
: base(Base)
|
||||
public CSingNotesClassic(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
@@ -11,13 +11,15 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
public class CSongMenu : ISongMenu
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
|
||||
private ISongMenu _SongMenu;
|
||||
private ESongMenu _Type;
|
||||
|
||||
public CSongMenu(Basic Base)
|
||||
public CSongMenu(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
CreateSongMenu();
|
||||
}
|
||||
@@ -218,7 +220,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
// break;
|
||||
|
||||
case ESongMenu.TR_CONFIG_TILE_BOARD:
|
||||
_SongMenu = new CSongMenuTileBoard(_Base);
|
||||
_SongMenu = new CSongMenuTileBoard(_Base, _PartyModeID);
|
||||
break;
|
||||
|
||||
//case ESongMenu.TR_CONFIG_BOOK:
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
new private Basic _Base;
|
||||
|
||||
public CSongMenuBook(Basic Base)
|
||||
: base(Base)
|
||||
public CSongMenuBook(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
*/
|
||||
|
||||
public CSongMenuDreidel(Basic Base)
|
||||
: base(Base)
|
||||
public CSongMenuDreidel(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
abstract class CSongMenuFramework : ISongMenu
|
||||
{
|
||||
protected int _PartyModeID;
|
||||
protected Basic _Base;
|
||||
protected SThemeSongMenu _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -233,21 +234,22 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_Visible = Visible;
|
||||
}
|
||||
|
||||
public CSongMenuFramework(Basic Base)
|
||||
public CSongMenuFramework(Basic Base, int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeSongMenu();
|
||||
|
||||
_Theme.songMenuTileBoard.TextArtist = new CText(_Base);
|
||||
_Theme.songMenuTileBoard.TextTitle = new CText(_Base);
|
||||
_Theme.songMenuTileBoard.TextSongLength = new CText(_Base);
|
||||
_Theme.songMenuTileBoard.TextArtist = new CText(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextTitle = new CText(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextSongLength = new CText(_Base, _PartyModeID);
|
||||
|
||||
_Theme.songMenuTileBoard.StaticCoverBig = new CStatic(_Base);
|
||||
_Theme.songMenuTileBoard.StaticTextBG = new CStatic(_Base);
|
||||
_Theme.songMenuTileBoard.StaticDuetIcon = new CStatic(_Base);
|
||||
_Theme.songMenuTileBoard.StaticVideoIcon = new CStatic(_Base);
|
||||
_Theme.songMenuTileBoard.StaticMedleyCalcIcon = new CStatic(_Base);
|
||||
_Theme.songMenuTileBoard.StaticMedleyTagIcon = new CStatic(_Base);
|
||||
_Theme.songMenuTileBoard.StaticCoverBig = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticTextBG = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticDuetIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticVideoIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticMedleyCalcIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticMedleyTagIcon = new CStatic(_Base, _PartyModeID);
|
||||
|
||||
_ThemeLoaded = false;
|
||||
}
|
||||
@@ -540,7 +542,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public virtual CStatic GetSelectedSongCover()
|
||||
{
|
||||
return new CStatic(_Base);
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public virtual int GetSelectedCategory()
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
new private Basic _Base;
|
||||
|
||||
public CSongMenuList(Basic Base)
|
||||
: base(Base)
|
||||
public CSongMenuList(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
private bool _SmallView = false;
|
||||
|
||||
public CSongMenuTileBoard(Basic Base)
|
||||
: base(Base)
|
||||
public CSongMenuTileBoard(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRect.X + j * (_TileW + _SpaceW),
|
||||
_Theme.songMenuTileBoard.TileRect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
|
||||
CStatic tile = new CStatic(_Base, _CoverTexture, Color, rect);
|
||||
CStatic tile = new CStatic(_Base, _PartyModeID, _CoverTexture, Color, rect);
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
@@ -523,7 +523,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (tile.Selected)
|
||||
return new CStatic(tile);
|
||||
}
|
||||
return new CStatic(_Base);
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
}
|
||||
|
||||
public override void SetSelectedSong(int VisibleSongNr)
|
||||
@@ -776,7 +776,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRectSmall.X + j * (_TileW + _SpaceW),
|
||||
_Theme.songMenuTileBoard.TileRectSmall.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
|
||||
CStatic tile = new CStatic(_Base, _CoverTexture, Color, rect);
|
||||
CStatic tile = new CStatic(_Base, _PartyModeID, _CoverTexture, Color, rect);
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
@@ -802,7 +802,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRect.X + j * (_TileW + _SpaceW),
|
||||
_Theme.songMenuTileBoard.TileRect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
|
||||
CStatic tile = new CStatic(_Base, _CoverTexture, Color, rect);
|
||||
CStatic tile = new CStatic(_Base, _PartyModeID, _CoverTexture, Color, rect);
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user