Renaming for namesheme
This commit is contained in:
1 parent
1336a6fa36
commit
67da90427b
131 files changed
+11905
-11812
No files matched your search
+65
-65
@@ -38,7 +38,7 @@ namespace VocaluxeLib.Menu
|
||||
private float _Z;
|
||||
private float _H;
|
||||
|
||||
private float _width;
|
||||
private float _Width;
|
||||
private ELyricStyle _Style;
|
||||
|
||||
private float _Alpha = 1f;
|
||||
@@ -83,9 +83,9 @@ namespace VocaluxeLib.Menu
|
||||
set { _Style = value; }
|
||||
}
|
||||
|
||||
public CLyric(int PartyModeID)
|
||||
public CLyric(int partyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_PartyModeID = partyModeID;
|
||||
_Theme = new SThemeLyrics();
|
||||
_ThemeLoaded = false;
|
||||
Color = new SColorF();
|
||||
@@ -96,16 +96,16 @@ namespace VocaluxeLib.Menu
|
||||
_Z = 0f;
|
||||
_MaxW = 1f;
|
||||
_H = 1f;
|
||||
_width = 1f;
|
||||
_Width = 1f;
|
||||
_Notes = new List<SNote>();
|
||||
_Text = new CText(_PartyModeID);
|
||||
|
||||
_Style = ELyricStyle.Fill;
|
||||
}
|
||||
|
||||
public bool LoadTheme(string XmlPath, string ElementName, CXMLReader xmlReader, int SkinIndex)
|
||||
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
|
||||
{
|
||||
string item = XmlPath + "/" + ElementName;
|
||||
string item = xmlPath + "/" + elementName;
|
||||
_ThemeLoaded = true;
|
||||
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref _X);
|
||||
@@ -115,7 +115,7 @@ namespace VocaluxeLib.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref _H);
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, skinIndex, out Color);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
|
||||
@@ -125,7 +125,7 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SelColorName, String.Empty))
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorName, SkinIndex, out ColorProcessed);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SelColorName, skinIndex, out ColorProcessed);
|
||||
else
|
||||
{
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SR", ref ColorProcessed.R);
|
||||
@@ -136,7 +136,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
if (_ThemeLoaded)
|
||||
{
|
||||
_Theme.Name = ElementName;
|
||||
_Theme.Name = elementName;
|
||||
LoadTextures();
|
||||
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
|
||||
}
|
||||
@@ -187,12 +187,12 @@ namespace VocaluxeLib.Menu
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SetLine(CLine Line)
|
||||
public void SetLine(CLine line)
|
||||
{
|
||||
_Notes.Clear();
|
||||
|
||||
_width = 0f;
|
||||
foreach (CNote note in Line.Notes)
|
||||
_Width = 0f;
|
||||
foreach (CNote note in line.Notes)
|
||||
{
|
||||
SNote n = new SNote();
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace VocaluxeLib.Menu
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
_width += rect.Width;
|
||||
_Width += rect.Width;
|
||||
_Notes.Add(n);
|
||||
}
|
||||
}
|
||||
@@ -221,38 +221,38 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public float GetCurrentLyricPosX()
|
||||
{
|
||||
return _X - _width / 2;
|
||||
return _X - _Width / 2;
|
||||
}
|
||||
|
||||
#region draw
|
||||
public void Draw(float ActualBeat)
|
||||
public void Draw(float actualBeat)
|
||||
{
|
||||
if (Visible || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
switch (_Style)
|
||||
{
|
||||
case ELyricStyle.Fill:
|
||||
DrawFill(ActualBeat);
|
||||
_DrawFill(actualBeat);
|
||||
break;
|
||||
case ELyricStyle.Jump:
|
||||
DrawJump(ActualBeat);
|
||||
_DrawJump(actualBeat);
|
||||
break;
|
||||
case ELyricStyle.Slide:
|
||||
DrawSlide(ActualBeat);
|
||||
_DrawSlide(actualBeat);
|
||||
break;
|
||||
case ELyricStyle.Zoom:
|
||||
DrawZoom(ActualBeat);
|
||||
_DrawZoom(actualBeat);
|
||||
break;
|
||||
default:
|
||||
DrawSlide(ActualBeat);
|
||||
_DrawSlide(actualBeat);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSlide(float CurrentBeat)
|
||||
private void _DrawSlide(float currentBeat)
|
||||
{
|
||||
float x = _X - _width / 2;
|
||||
float x = _X - _Width / 2;
|
||||
|
||||
foreach (SNote note in _Notes)
|
||||
{
|
||||
@@ -264,9 +264,9 @@ namespace VocaluxeLib.Menu
|
||||
if (note.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
if (CurrentBeat >= note.StartBeat)
|
||||
if (currentBeat >= note.StartBeat)
|
||||
{
|
||||
if (CurrentBeat <= note.EndBeat)
|
||||
if (currentBeat <= note.EndBeat)
|
||||
{
|
||||
_Text.Color = ColorProcessed;
|
||||
|
||||
@@ -276,9 +276,9 @@ namespace VocaluxeLib.Menu
|
||||
_Text.Draw(0f, 1f);
|
||||
else
|
||||
{
|
||||
_Text.Draw(0f, (CurrentBeat - note.StartBeat) / diff);
|
||||
_Text.Draw(0f, (currentBeat - note.StartBeat) / diff);
|
||||
_Text.Color = Color;
|
||||
_Text.Draw((CurrentBeat - note.StartBeat) / diff, 1f);
|
||||
_Text.Draw((currentBeat - note.StartBeat) / diff, 1f);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -297,20 +297,20 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawZoom(float CurrentBeat)
|
||||
private void _DrawZoom(float currentBeat)
|
||||
{
|
||||
float x = _X - _width / 2; // most left position
|
||||
float x = _X - _Width / 2; // most left position
|
||||
|
||||
//find last active note
|
||||
int last_note = -1;
|
||||
int lastNote = -1;
|
||||
for (int i = 0; i < _Notes.Count; i++)
|
||||
{
|
||||
if (CurrentBeat >= _Notes[i].StartBeat)
|
||||
last_note = i;
|
||||
if (currentBeat >= _Notes[i].StartBeat)
|
||||
lastNote = i;
|
||||
}
|
||||
|
||||
int zoom_note = -1;
|
||||
int end_beat = -1;
|
||||
int zoomNote = -1;
|
||||
int endBeat = -1;
|
||||
float zoomx = 0f;
|
||||
|
||||
for (int note = 0; note < _Notes.Count; note++)
|
||||
@@ -323,23 +323,23 @@ namespace VocaluxeLib.Menu
|
||||
if (_Notes[note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
if (CurrentBeat >= _Notes[note].StartBeat)
|
||||
if (currentBeat >= _Notes[note].StartBeat)
|
||||
{
|
||||
bool last = note == _Notes.Count - 1;
|
||||
int endbeat = _Notes[note].EndBeat;
|
||||
if (note < _Notes.Count - 1)
|
||||
endbeat = _Notes[note + 1].StartBeat - 1;
|
||||
|
||||
if (CurrentBeat <= endbeat)
|
||||
if (currentBeat <= endbeat)
|
||||
{
|
||||
zoom_note = note;
|
||||
end_beat = endbeat;
|
||||
zoomNote = note;
|
||||
endBeat = endbeat;
|
||||
zoomx = _Text.X;
|
||||
}
|
||||
else
|
||||
{
|
||||
// already passed
|
||||
if (note == last_note)
|
||||
if (note == lastNote)
|
||||
_Text.Color = ColorProcessed;
|
||||
else
|
||||
_Text.Color = Color;
|
||||
@@ -357,26 +357,26 @@ namespace VocaluxeLib.Menu
|
||||
x += rect.Width;
|
||||
}
|
||||
|
||||
if (zoom_note > -1)
|
||||
if (zoomNote > -1)
|
||||
{
|
||||
if (_Notes[zoom_note].Duration == 0)
|
||||
if (_Notes[zoomNote].Duration == 0)
|
||||
return;
|
||||
|
||||
_Text.X = zoomx;
|
||||
_Text.Text = _Notes[zoom_note].Text;
|
||||
_Text.Text = _Notes[zoomNote].Text;
|
||||
_Text.Color = ColorProcessed;
|
||||
_Text.Style = EStyle.Bold;
|
||||
|
||||
if (_Notes[zoom_note].Type == ENoteType.Freestyle)
|
||||
if (_Notes[zoomNote].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
|
||||
float diff = end_beat - _Notes[zoom_note].StartBeat;
|
||||
float diff = endBeat - _Notes[zoomNote].StartBeat;
|
||||
if (diff <= 0f)
|
||||
diff = 1f;
|
||||
|
||||
float p = (CurrentBeat - _Notes[zoom_note].StartBeat) / diff;
|
||||
float p = (currentBeat - _Notes[zoomNote].StartBeat) / diff;
|
||||
if (p > 1f)
|
||||
p = 1f;
|
||||
|
||||
@@ -402,9 +402,9 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawFill(float CurrentBeat)
|
||||
private void _DrawFill(float currentBeat)
|
||||
{
|
||||
float x = _X - _width / 2; // most left position
|
||||
float x = _X - _Width / 2; // most left position
|
||||
|
||||
foreach (SNote note in _Notes)
|
||||
{
|
||||
@@ -416,7 +416,7 @@ namespace VocaluxeLib.Menu
|
||||
if (note.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
if (CurrentBeat >= note.StartBeat)
|
||||
if (currentBeat >= note.StartBeat)
|
||||
{
|
||||
_Text.Color = ColorProcessed;
|
||||
_Text.Draw();
|
||||
@@ -432,20 +432,20 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawJump(float CurrentBeat)
|
||||
private void _DrawJump(float currentBeat)
|
||||
{
|
||||
float x = _X - _width / 2; // most left position
|
||||
float x = _X - _Width / 2; // most left position
|
||||
|
||||
//find last active note
|
||||
int last_note = -1;
|
||||
int lastNote = -1;
|
||||
for (int i = 0; i < _Notes.Count; i++)
|
||||
{
|
||||
if (CurrentBeat >= _Notes[i].StartBeat)
|
||||
last_note = i;
|
||||
if (currentBeat >= _Notes[i].StartBeat)
|
||||
lastNote = i;
|
||||
}
|
||||
|
||||
int jump_note = -1;
|
||||
int end_beat = -1;
|
||||
int jumpNote = -1;
|
||||
int endBeat = -1;
|
||||
float jumpx = 0f;
|
||||
|
||||
for (int note = 0; note < _Notes.Count; note++)
|
||||
@@ -458,23 +458,23 @@ namespace VocaluxeLib.Menu
|
||||
if (_Notes[note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
if (CurrentBeat >= _Notes[note].StartBeat)
|
||||
if (currentBeat >= _Notes[note].StartBeat)
|
||||
{
|
||||
bool last = note == _Notes.Count - 1;
|
||||
int endbeat = _Notes[note].EndBeat;
|
||||
if (note < _Notes.Count - 1)
|
||||
endbeat = _Notes[note + 1].StartBeat - 1;
|
||||
|
||||
if (CurrentBeat <= _Notes[note].EndBeat)
|
||||
if (currentBeat <= _Notes[note].EndBeat)
|
||||
{
|
||||
jump_note = note;
|
||||
end_beat = endbeat;
|
||||
jumpNote = note;
|
||||
endBeat = endbeat;
|
||||
jumpx = _Text.X;
|
||||
}
|
||||
else
|
||||
{
|
||||
// already passed
|
||||
if (note == last_note)
|
||||
if (note == lastNote)
|
||||
_Text.Color = ColorProcessed;
|
||||
else
|
||||
_Text.Color = Color;
|
||||
@@ -492,24 +492,24 @@ namespace VocaluxeLib.Menu
|
||||
x += rect.Width;
|
||||
}
|
||||
|
||||
if (jump_note > -1)
|
||||
if (jumpNote > -1)
|
||||
{
|
||||
if (_Notes[jump_note].Duration == 0)
|
||||
if (_Notes[jumpNote].Duration == 0)
|
||||
return;
|
||||
|
||||
_Text.X = jumpx;
|
||||
_Text.Text = _Notes[jump_note].Text;
|
||||
_Text.Text = _Notes[jumpNote].Text;
|
||||
_Text.Color = ColorProcessed;
|
||||
_Text.Style = EStyle.Bold;
|
||||
|
||||
if (_Notes[jump_note].Type == ENoteType.Freestyle)
|
||||
if (_Notes[jumpNote].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
float diff = _Notes[jump_note].EndBeat - _Notes[jump_note].StartBeat;
|
||||
float diff = _Notes[jumpNote].EndBeat - _Notes[jumpNote].StartBeat;
|
||||
if (diff <= 0f)
|
||||
diff = 1f;
|
||||
|
||||
float p = (CurrentBeat - _Notes[jump_note].StartBeat) / diff;
|
||||
float p = (currentBeat - _Notes[jumpNote].StartBeat) / diff;
|
||||
if (p > 1f)
|
||||
p = 1f;
|
||||
|
||||
|
||||
Reference in new issue
Block a user