changed base handling in VocaluxeLib

This commit is contained in:
Alexander Eckart committed 2013-02-22 17:57:47 +01:00
1 parent 08658e20e3
commit b4f77d50b2
42 files changed
+801 -924

No files matched your search

+15 -17
View File
@@ -28,7 +28,6 @@ namespace Vocaluxe.Menu
public class CLyric : IMenuElement
{
private int _PartyModeID;
private Basic _Base;
private SThemeLyrics _Theme;
private bool _ThemeLoaded;
@@ -86,10 +85,9 @@ namespace Vocaluxe.Menu
set { _Style = value; }
}
public CLyric(Basic Base, int PartyModeID)
public CLyric(int PartyModeID)
{
_PartyModeID = PartyModeID;
_Base = Base;
_Theme = new SThemeLyrics();
_ThemeLoaded = false;
Color = new SColorF();
@@ -102,7 +100,7 @@ namespace Vocaluxe.Menu
_H = 1f;
_width = 1f;
_Notes = new List<SNote>();
_Text = new CText(_Base, _PartyModeID);
_Text = new CText(_PartyModeID);
_Style = ELyricStyle.Fill;
}
@@ -120,7 +118,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
}
else
{
@@ -132,7 +130,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
{
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
}
else
{
@@ -146,7 +144,7 @@ namespace Vocaluxe.Menu
{
_Theme.Name = ElementName;
LoadTextures();
_Text = new CText(_Base, _X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
}
return _ThemeLoaded;
}
@@ -220,7 +218,7 @@ namespace Vocaluxe.Menu
if (n.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
_width += rect.Width;
_Notes.Add(n);
}
@@ -239,7 +237,7 @@ namespace Vocaluxe.Menu
#region draw
public void Draw(float ActualBeat)
{
if (Visible || _Base.Settings.GetGameState() == EGameState.EditTheme)
if (Visible || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
{
switch (_Style)
{
@@ -271,7 +269,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = note.Text;
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
if (note.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -331,7 +329,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = _Notes[note].Text;
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
if (_Notes[note].Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -384,7 +382,7 @@ namespace Vocaluxe.Menu
if (_Notes[zoom_note].Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
float diff = end_beat - _Notes[zoom_note].StartBeat;
if (diff <= 0f)
@@ -402,7 +400,7 @@ namespace Vocaluxe.Menu
float tz = _Text.Z;
_Text.Height += _Text.Height * p * 0.4f;
RectangleF rectz = _Base.Drawing.GetTextBounds(_Text);
RectangleF rectz = CBase.Base.Drawing.GetTextBounds(_Text);
_Text.X -= (rectz.Width - rect.Width) / 2f;
_Text.Y -= (rectz.Height - rect.Height) / 2f;
_Text.Z -= 0.1f;
@@ -425,7 +423,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = note.Text;
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
if (note.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -467,7 +465,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = _Notes[note].Text;
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
if (_Notes[note].Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -550,10 +548,10 @@ namespace Vocaluxe.Menu
public void LoadTextures()
{
if (_Theme.ColorName != String.Empty)
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
if (_Theme.SColorName != String.Empty)
ColorProcessed = _Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
ColorProcessed = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
}
public void ReloadTextures()