More unification of menuelements and fix for screensing theme

This commit is contained in:
Flamefire committed 2014-10-18 20:46:51 +02:00
1 parent 1b4f3ced7d
commit 63fc406735
9 files changed
+80 -398

No files matched your search

@@ -180,18 +180,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP1N1">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>350</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP1N1"> <Static Name="StaticAvatarP1N1">
<Skin/> <Skin/>
<Color> <Color>
@@ -209,18 +197,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP1N2">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>150</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP1N2"> <Static Name="StaticAvatarP1N2">
<Skin/> <Skin/>
<Color> <Color>
@@ -238,18 +214,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP2N2">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>350</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP2N2"> <Static Name="StaticAvatarP2N2">
<Skin/> <Skin/>
<Color> <Color>
@@ -267,18 +231,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP1N3">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>10</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP1N3"> <Static Name="StaticAvatarP1N3">
<Skin/> <Skin/>
<Color> <Color>
@@ -296,18 +248,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP2N3">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>210</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP2N3"> <Static Name="StaticAvatarP2N3">
<Skin/> <Skin/>
<Color> <Color>
@@ -325,18 +265,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP3N3">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>410</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP3N3"> <Static Name="StaticAvatarP3N3">
<Skin/> <Skin/>
<Color> <Color>
@@ -354,18 +282,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP1N4">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>150</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP1N4"> <Static Name="StaticAvatarP1N4">
<Skin/> <Skin/>
<Color> <Color>
@@ -383,18 +299,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP2N4">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>350</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP2N4"> <Static Name="StaticAvatarP2N4">
<Skin/> <Skin/>
<Color> <Color>
@@ -412,18 +316,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP3N4">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>150</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP3N4"> <Static Name="StaticAvatarP3N4">
<Skin/> <Skin/>
<Color> <Color>
@@ -441,18 +333,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP4N4">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>350</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP4N4"> <Static Name="StaticAvatarP4N4">
<Skin/> <Skin/>
<Color> <Color>
@@ -470,18 +350,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP1N5">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>10</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP1N5"> <Static Name="StaticAvatarP1N5">
<Skin/> <Skin/>
<Color> <Color>
@@ -499,18 +367,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP2N5">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>210</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP2N5"> <Static Name="StaticAvatarP2N5">
<Skin/> <Skin/>
<Color> <Color>
@@ -528,18 +384,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP3N5">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>410</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP3N5"> <Static Name="StaticAvatarP3N5">
<Skin/> <Skin/>
<Color> <Color>
@@ -557,18 +401,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP4N5">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>150</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP4N5"> <Static Name="StaticAvatarP4N5">
<Skin/> <Skin/>
<Color> <Color>
@@ -586,18 +418,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP5N5">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>350</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP5N5"> <Static Name="StaticAvatarP5N5">
<Skin/> <Skin/>
<Color> <Color>
@@ -615,18 +435,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP1N6">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>10</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP1N6"> <Static Name="StaticAvatarP1N6">
<Skin/> <Skin/>
<Color> <Color>
@@ -644,18 +452,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP2N6">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>210</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP2N6"> <Static Name="StaticAvatarP2N6">
<Skin/> <Skin/>
<Color> <Color>
@@ -673,18 +469,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP3N6">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>528</X>
<Y>410</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP3N6"> <Static Name="StaticAvatarP3N6">
<Skin/> <Skin/>
<Color> <Color>
@@ -702,18 +486,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP4N6">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>10</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP4N6"> <Static Name="StaticAvatarP4N6">
<Skin/> <Skin/>
<Color> <Color>
@@ -731,18 +503,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP5N6">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>210</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP5N6"> <Static Name="StaticAvatarP5N6">
<Skin/> <Skin/>
<Color> <Color>
@@ -760,18 +520,6 @@
</Rect> </Rect>
<Reflection Enabled="false" /> <Reflection Enabled="false" />
</Static> </Static>
<Static Name="StaticScoreP6N6">
<Skin/>
<Color Name="StaticColor" />
<Rect>
<X>1150</X>
<Y>410</Y>
<W>100</W>
<H>50</H>
<Z>-0.75</Z>
</Rect>
<Reflection Enabled="false" />
</Static>
<Static Name="StaticAvatarP6N6"> <Static Name="StaticAvatarP6N6">
<Skin/> <Skin/>
<Color> <Color>
-5
View File
@@ -117,9 +117,6 @@ namespace Vocaluxe.Screens
_OriginalPlayerAvatarTextures[i] = _Statics[_StaticPlayerAvatar[i]].Texture; _OriginalPlayerAvatarTextures[i] = _Statics[_StaticPlayerAvatar[i]].Texture;
_Statics[_StaticPlayerAvatar[i]].Aspect = EAspect.Crop; _Statics[_StaticPlayerAvatar[i]].Aspect = EAspect.Crop;
} }
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
_Equalizers["EqualizerPlayer" + i].ScreenHandles = true;
} }
public override bool HandleInput(SKeyEvent keyEvent) public override bool HandleInput(SKeyEvent keyEvent)
@@ -574,8 +571,6 @@ namespace Vocaluxe.Screens
if (_ChooseAvatarStatic.Visible) if (_ChooseAvatarStatic.Visible)
_ChooseAvatarStatic.Draw(); _ChooseAvatarStatic.Draw();
for (int i = 1; i <= CGame.NumPlayer; i++)
_Equalizers["EqualizerPlayer" + i].Draw();
return true; return true;
} }
#endregion public methods #endregion public methods
-6
View File
@@ -107,9 +107,6 @@ namespace Vocaluxe.Screens
_Statics[_StaticEnergyChannel[i]].Visible = false; _Statics[_StaticEnergyChannel[i]].Visible = false;
_ChannelEnergy[i] = 0f; _ChannelEnergy[i] = 0f;
} }
_Equalizers[_EqualizerChannel1].ScreenHandles = true;
_Equalizers[_EqualizerChannel2].ScreenHandles = true;
} }
public override bool HandleInput(SKeyEvent keyEvent) public override bool HandleInput(SKeyEvent keyEvent)
@@ -330,9 +327,6 @@ namespace Vocaluxe.Screens
} }
} }
_Equalizers[_EqualizerChannel1].Draw();
_Equalizers[_EqualizerChannel2].Draw();
_DrawFG(); _DrawFG();
return true; return true;
+43 -79
View File
@@ -25,7 +25,6 @@ using System.Windows.Forms;
using Vocaluxe.Base; using Vocaluxe.Base;
using Vocaluxe.Base.Fonts; using Vocaluxe.Base.Fonts;
using Vocaluxe.Base.ThemeSystem; using Vocaluxe.Base.ThemeSystem;
using Vocaluxe.Lib.Video;
using VocaluxeLib; using VocaluxeLib;
using VocaluxeLib.Draw; using VocaluxeLib.Draw;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
@@ -71,7 +70,6 @@ namespace Vocaluxe.Screens
private const string _StaticLyricHelperTop = "StaticLyricHelperTop"; private const string _StaticLyricHelperTop = "StaticLyricHelperTop";
private const string _StaticPauseBG = "StaticPauseBG"; private const string _StaticPauseBG = "StaticPauseBG";
private string[,] _StaticScores;
private string[,] _StaticAvatars; private string[,] _StaticAvatars;
private const string _ButtonCancel = "ButtonCancel"; private const string _ButtonCancel = "ButtonCancel";
@@ -183,11 +181,7 @@ namespace Vocaluxe.Screens
{ {
base.HandleInput(keyEvent); base.HandleInput(keyEvent);
if (keyEvent.KeyPressed) if (!keyEvent.KeyPressed)
{
//
}
else
{ {
switch (keyEvent.Key) switch (keyEvent.Key)
{ {
@@ -244,14 +238,17 @@ namespace Vocaluxe.Screens
} }
break; break;
case Keys.Enter: case Keys.Enter:
if (_Buttons[_ButtonContinue].Selected && _Pause) if (_Pause)
_TogglePause(); {
if (_Buttons[_ButtonCancel].Selected && _Pause) if (_Buttons[_ButtonContinue].Selected)
_SetPause(false);
if (_Buttons[_ButtonCancel].Selected)
_Stop(); _Stop();
if (_Buttons[_ButtonSkip].Selected && _Pause) if (_Buttons[_ButtonSkip].Selected)
{ {
_LoadNextSong(); _LoadNextSong();
_TogglePause(); _SetPause(false);
}
} }
break; break;
@@ -304,16 +301,16 @@ namespace Vocaluxe.Screens
if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent) && _Pause) if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent) && _Pause)
{ {
if (_Buttons[_ButtonContinue].Selected && _Pause) if (_Buttons[_ButtonContinue].Selected)
_TogglePause(); _SetPause(false);
if (_Buttons[_ButtonCancel].Selected && _Pause) if (_Buttons[_ButtonCancel].Selected)
_Stop(); _Stop();
if (_Buttons[_ButtonSkip].Selected && _Pause) if (_Buttons[_ButtonSkip].Selected)
{ {
_LoadNextSong(); _LoadNextSong();
_TogglePause(); _SetPause(false);
} }
} }
@@ -346,6 +343,8 @@ namespace Vocaluxe.Screens
CGame.UpdatePoints(_CurrentTime); CGame.UpdatePoints(_CurrentTime);
_UpdateLyrics(); _UpdateLyrics();
if (CGame.GameMode == EGameMode.TR_GAMEMODE_MEDLEY)
_UpdateMedleyCountdown();
float[] alpha = _CalcFadingAlpha(); float[] alpha = _CalcFadingAlpha();
if (alpha != null) if (alpha != null)
@@ -372,7 +371,6 @@ namespace Vocaluxe.Screens
} }
if (CConfig.FadePlayerInfo == EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_ALL) if (CConfig.FadePlayerInfo == EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_ALL)
{ {
_Statics[_StaticScores[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2];
_Statics[_StaticAvatars[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2]; _Statics[_StaticAvatars[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2];
_Texts[_TextNames[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2]; _Texts[_TextNames[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2];
_Texts[_TextScores[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2]; _Texts[_TextScores[p, CGame.NumPlayer - 1]].Alpha = alpha[CGame.Players[p].VoiceNr * 2];
@@ -403,9 +401,7 @@ namespace Vocaluxe.Screens
} }
if (_CurrentVideo != null && !_FadeOut && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON) if (_CurrentVideo != null && !_FadeOut && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON)
{
CVideo.GetFrame(_CurrentVideo, _CurrentTime); CVideo.GetFrame(_CurrentVideo, _CurrentTime);
}
if (_Webcam) if (_Webcam)
CWebcam.GetFrame(ref _CurrentWebcamFrameTexture); CWebcam.GetFrame(ref _CurrentWebcamFrameTexture);
@@ -427,7 +423,7 @@ namespace Vocaluxe.Screens
_Length = -1f; _Length = -1f;
_TimeToFirstNote = 0f; _TimeToFirstNote = 0f;
_TimeToFirstNoteDuet = 0f; _TimeToFirstNoteDuet = 0f;
_Pause = false; _SetPause(false);
_TimeRects.Clear(); _TimeRects.Clear();
@@ -486,13 +482,7 @@ namespace Vocaluxe.Screens
_SlideShow.Draw(); _SlideShow.Draw();
} }
_DrawBG(); base.Draw();
foreach (CStatic stat in _Statics)
stat.Draw();
foreach (CText text in _Texts)
text.Draw();
switch (CConfig.TimerLook) switch (CConfig.TimerLook)
{ {
@@ -505,32 +495,13 @@ namespace Vocaluxe.Screens
break; break;
} }
_Lyrics[_LyricSub].Draw(-100);
_Lyrics[_LyricMain].Draw(CGame.CurrentBeatF);
_Lyrics[_LyricSubDuet].Draw(-100);
_Lyrics[_LyricMainDuet].Draw(CGame.CurrentBeatF);
_Lyrics[_LyricSubTop].Draw(-100);
_Lyrics[_LyricMainTop].Draw(CGame.CurrentBeatF);
for (int i = 0; i < CGame.NumPlayer; i++) for (int i = 0; i < CGame.NumPlayer; i++)
_SingNotes[_SingBars].Draw(_NoteLines[i], CGame.Players[i].SungLines, i); _SingNotes[_SingBars].Draw(_NoteLines[i], CGame.Players[i].SungLines, i);
_DrawLyricHelper(); _DrawLyricHelper();
if (CGame.GameMode == EGameMode.TR_GAMEMODE_MEDLEY)
{
_UpdateMedleyCountdown();
_Texts[_TextMedleyCountdown].Draw();
}
if (_Pause) if (_Pause)
{ {
_Statics[_StaticPauseBG].Draw(true);
_Texts[_TextPause].Draw(true);
foreach (CButton button in _Buttons) foreach (CButton button in _Buttons)
button.Draw(); button.Draw();
@@ -558,9 +529,7 @@ namespace Vocaluxe.Screens
} }
CRecord.Stop(); CRecord.Stop();
if (_CurrentVideo != null) if (_CurrentVideo != null)
{
CVideo.Close(ref _CurrentVideo); CVideo.Close(ref _CurrentVideo);
}
CDraw.RemoveTexture(ref _Background); CDraw.RemoveTexture(ref _Background);
if (_SlideShow != null) if (_SlideShow != null)
@@ -792,6 +761,15 @@ namespace Vocaluxe.Screens
_CurrentBeat = CGame.CurrentBeat; _CurrentBeat = CGame.CurrentBeat;
_Lyrics[_LyricSub].Update(-100);
_Lyrics[_LyricMain].Update(CGame.CurrentBeatF);
_Lyrics[_LyricSubDuet].Update(-100);
_Lyrics[_LyricMainDuet].Update(CGame.CurrentBeatF);
_Lyrics[_LyricSubTop].Update(-100);
_Lyrics[_LyricMainTop].Update(CGame.CurrentBeatF);
for (int i = 0; i < song.Notes.VoiceCount; i++) for (int i = 0; i < song.Notes.VoiceCount; i++)
{ {
if (i > 1) if (i > 1)
@@ -864,27 +842,21 @@ namespace Vocaluxe.Screens
private void _TogglePause() private void _TogglePause()
{ {
_Pause = !_Pause; _SetPause(!_Pause);
}
private void _SetPause(bool paused)
{
_Pause = paused;
_Statics[_StaticPauseBG].Visible = _Pause;
_Texts[_TextPause].Visible = _Pause;
_Buttons[_ButtonCancel].Visible = _Pause;
_Buttons[_ButtonContinue].Visible = _Pause;
_Buttons[_ButtonSkip].Visible = _Pause && CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1;
if (_Pause) if (_Pause)
{
_Buttons[_ButtonCancel].Visible = true;
_Buttons[_ButtonContinue].Visible = true;
if (CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1)
_Buttons[_ButtonSkip].Visible = true;
else
_Buttons[_ButtonSkip].Visible = false;
CSound.Pause(_CurrentStream); CSound.Pause(_CurrentStream);
}
else else
{
//CGame.ResetToLastLine(_CurrentStream, _CurrentVideo);
_Buttons[_ButtonCancel].Visible = false;
_Buttons[_ButtonContinue].Visible = false;
_Buttons[_ButtonSkip].Visible = false;
CSound.Play(_CurrentStream); CSound.Play(_CurrentStream);
if (_Webcam)
CWebcam.Start();
}
} }
private void _BuildTextStrings(List<string> texts) private void _BuildTextStrings(List<string> texts)
@@ -911,7 +883,6 @@ namespace Vocaluxe.Screens
private void _BuildStaticStrings(ref List<string> statics) private void _BuildStaticStrings(ref List<string> statics)
{ {
_StaticScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
_StaticAvatars = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; _StaticAvatars = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
@@ -921,10 +892,8 @@ namespace Vocaluxe.Screens
if (player <= numplayer) if (player <= numplayer)
{ {
string target = "P" + (player + 1) + "N" + (numplayer + 1); string target = "P" + (player + 1) + "N" + (numplayer + 1);
_StaticScores[player, numplayer] = "StaticScore" + target;
_StaticAvatars[player, numplayer] = "StaticAvatar" + target; _StaticAvatars[player, numplayer] = "StaticAvatar" + target;
statics.Add(_StaticScores[player, numplayer]);
statics.Add(_StaticAvatars[player, numplayer]); statics.Add(_StaticAvatars[player, numplayer]);
} }
} }
@@ -947,23 +916,18 @@ namespace Vocaluxe.Screens
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
{ {
for (int player = 0; player < CSettings.MaxNumPlayer; player++) for (int player = 0; player < CSettings.MaxNumPlayer && player <= numplayer; player++)
{ {
if (player <= numplayer) bool isIvisible = numplayer + 1 == CGame.NumPlayer && player <= CGame.NumPlayer;
{ _Texts[_TextScores[player, numplayer]].Visible = isIvisible;
_Texts[_TextScores[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayer; _Texts[_TextNames[player, numplayer]].Visible = isIvisible &&
_Texts[_TextNames[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer)
&&
(CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH ||
CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_NAME); CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_NAME);
_Statics[_StaticScores[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayer; _Statics[_StaticAvatars[player, numplayer]].Visible = isIvisible &&
_Statics[_StaticAvatars[player, numplayer]].Visible = (numplayer + 1 == CGame.NumPlayer)
&&
(CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH || (CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH ||
CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR); CConfig.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR);
} }
} }
}
_Lyrics[_LyricMain].Alpha = 0f; _Lyrics[_LyricMain].Alpha = 0f;
_Lyrics[_LyricSub].Alpha = 0f; _Lyrics[_LyricSub].Alpha = 0f;
-3
View File
@@ -62,7 +62,6 @@ namespace VocaluxeLib.Menu
public bool Selected; public bool Selected;
public bool Visible; public bool Visible;
public bool ScreenHandles;
public string GetThemeName() public string GetThemeName()
{ {
@@ -90,7 +89,6 @@ namespace VocaluxeLib.Menu
Selected = false; Selected = false;
Visible = true; Visible = true;
ScreenHandles = false;
Reflection = false; Reflection = false;
ReflectionSpace = 0f; ReflectionSpace = 0f;
@@ -103,7 +101,6 @@ namespace VocaluxeLib.Menu
_Theme = theme; _Theme = theme;
Visible = true; Visible = true;
ScreenHandles = false;
LoadSkin(); LoadSkin();
} }
+1 -12
View File
@@ -56,18 +56,7 @@ namespace VocaluxeLib.Menu
public bool DrawAsForeground public bool DrawAsForeground
{ {
get get { return Type != EType.Background && Type != EType.SingNote; }
{
return Type == EType.Button ||
Type == EType.SelectSlide ||
Type == EType.Static ||
Type == EType.NameSelection ||
Type == EType.Text ||
Type == EType.SongMenu ||
Type == EType.Equalizer ||
Type == EType.Playlist ||
Type == EType.ParticleEffect;
}
} }
public CInteraction(int num, EType type) public CInteraction(int num, EType type)
+30 -23
View File
@@ -55,6 +55,8 @@ namespace VocaluxeLib.Menu
private float _Alpha = 1f; private float _Alpha = 1f;
private float _CurrentBeat = -1;
public string GetThemeName() public string GetThemeName()
{ {
return _Theme.Name; return _Theme.Name;
@@ -199,33 +201,38 @@ namespace VocaluxeLib.Menu
return _X - _Width / 2; return _X - _Width / 2;
} }
public void Update(float currentBeat)
{
_CurrentBeat = currentBeat;
}
#region draw #region draw
public void Draw(float actualBeat) public void Draw()
{ {
if (Visible || CBase.Settings.GetProgramState() == EProgramState.EditTheme) if (Visible || CBase.Settings.GetProgramState() == EProgramState.EditTheme)
{ {
switch (LyricStyle) switch (LyricStyle)
{ {
case ELyricStyle.Fill: case ELyricStyle.Fill:
_DrawFill(actualBeat); _DrawFill();
break; break;
case ELyricStyle.Jump: case ELyricStyle.Jump:
_DrawJump(actualBeat); _DrawJump();
break; break;
case ELyricStyle.Slide: case ELyricStyle.Slide:
_DrawSlide(actualBeat); _DrawSlide();
break; break;
case ELyricStyle.Zoom: case ELyricStyle.Zoom:
_DrawZoom(actualBeat); _DrawZoom();
break; break;
default: default:
_DrawSlide(actualBeat); _DrawSlide();
break; break;
} }
} }
} }
private void _DrawSlide(float currentBeat) private void _DrawSlide()
{ {
float x = _X - _Width / 2; float x = _X - _Width / 2;
@@ -234,9 +241,9 @@ namespace VocaluxeLib.Menu
_Text.X = x; _Text.X = x;
_SetText(note); _SetText(note);
if (currentBeat >= note.StartBeat) if (_CurrentBeat >= note.StartBeat)
{ {
if (currentBeat <= note.EndBeat) if (_CurrentBeat <= note.EndBeat)
{ {
_Text.Color = _ColorProcessed; _Text.Color = _ColorProcessed;
@@ -245,9 +252,9 @@ namespace VocaluxeLib.Menu
_Text.Draw(0f, 1f); _Text.Draw(0f, 1f);
else else
{ {
_Text.Draw(0f, (currentBeat - note.StartBeat) / diff); _Text.Draw(0f, (_CurrentBeat - note.StartBeat) / diff);
_Text.Color = _Color; _Text.Color = _Color;
_Text.Draw((currentBeat - note.StartBeat) / diff, 1f); _Text.Draw((_CurrentBeat - note.StartBeat) / diff, 1f);
} }
} }
else else
@@ -266,12 +273,12 @@ namespace VocaluxeLib.Menu
} }
} }
private void _DrawZoom(float currentBeat) private void _DrawZoom()
{ {
float x = _X - _Width / 2; // most left position float x = _X - _Width / 2; // most left position
//find last active note //find last active note
int lastNote = _Line.FindPreviousNote((int)currentBeat); int lastNote = _Line.FindPreviousNote((int)_CurrentBeat);
int zoomNote = -1; int zoomNote = -1;
int endBeat = -1; int endBeat = -1;
@@ -282,13 +289,13 @@ namespace VocaluxeLib.Menu
_Text.X = x; _Text.X = x;
_SetText(_Line.Notes[note]); _SetText(_Line.Notes[note]);
if (currentBeat >= _Line.Notes[note].StartBeat) if (_CurrentBeat >= _Line.Notes[note].StartBeat)
{ {
int curEndBeat = _Line.Notes[note].EndBeat; int curEndBeat = _Line.Notes[note].EndBeat;
if (note < _Line.Notes.Length - 1) if (note < _Line.Notes.Length - 1)
curEndBeat = _Line.Notes[note + 1].StartBeat - 1; curEndBeat = _Line.Notes[note + 1].StartBeat - 1;
if (currentBeat <= curEndBeat) if (_CurrentBeat <= curEndBeat)
{ {
zoomNote = note; zoomNote = note;
endBeat = curEndBeat; endBeat = curEndBeat;
@@ -321,7 +328,7 @@ namespace VocaluxeLib.Menu
if (diff <= 0f) if (diff <= 0f)
diff = 1f; diff = 1f;
float p = (currentBeat - _Line.Notes[zoomNote].StartBeat) / diff; float p = (_CurrentBeat - _Line.Notes[zoomNote].StartBeat) / diff;
if (p > 1f) if (p > 1f)
p = 1f; p = 1f;
@@ -347,7 +354,7 @@ namespace VocaluxeLib.Menu
} }
} }
private void _DrawFill(float currentBeat) private void _DrawFill()
{ {
float x = _X - _Width / 2; // most left position float x = _X - _Width / 2; // most left position
@@ -356,7 +363,7 @@ namespace VocaluxeLib.Menu
_Text.X = x; _Text.X = x;
_SetText(note); _SetText(note);
if (currentBeat >= note.StartBeat) if (_CurrentBeat >= note.StartBeat)
{ {
_Text.Color = _ColorProcessed; _Text.Color = _ColorProcessed;
_Text.Draw(); _Text.Draw();
@@ -372,12 +379,12 @@ namespace VocaluxeLib.Menu
} }
} }
private void _DrawJump(float currentBeat) private void _DrawJump()
{ {
float x = _X - _Width / 2; // most left position float x = _X - _Width / 2; // most left position
//find last active note //find last active note
int lastNote = _Line.FindPreviousNote((int)currentBeat); int lastNote = _Line.FindPreviousNote((int)_CurrentBeat);
int jumpNote = -1; int jumpNote = -1;
float jumpx = 0f; float jumpx = 0f;
@@ -387,13 +394,13 @@ namespace VocaluxeLib.Menu
_Text.X = x; _Text.X = x;
_SetText(_Line.Notes[note]); _SetText(_Line.Notes[note]);
if (currentBeat >= _Line.Notes[note].StartBeat) if (_CurrentBeat >= _Line.Notes[note].StartBeat)
{ {
int curEndBeat = _Line.Notes[note].EndBeat; int curEndBeat = _Line.Notes[note].EndBeat;
if (note < _Line.Notes.Length - 1) if (note < _Line.Notes.Length - 1)
curEndBeat = _Line.Notes[note + 1].StartBeat - 1; curEndBeat = _Line.Notes[note + 1].StartBeat - 1;
if (currentBeat <= curEndBeat) if (_CurrentBeat <= curEndBeat)
{ {
jumpNote = note; jumpNote = note;
jumpx = _Text.X; jumpx = _Text.X;
@@ -427,7 +434,7 @@ namespace VocaluxeLib.Menu
if (diff <= 0) if (diff <= 0)
diff = 1; diff = 1;
float p = 1f - (currentBeat - _Line.Notes[jumpNote].StartBeat) / diff; float p = 1f - (_CurrentBeat - _Line.Notes[jumpNote].StartBeat) / diff;
if (Math.Abs(p) < float.Epsilon) if (Math.Abs(p) < float.Epsilon)
_Text.Draw(); _Text.Draw();
+4 -10
View File
@@ -1160,12 +1160,7 @@ namespace VocaluxeLib.Menu
break; break;
case EType.Equalizer: case EType.Equalizer:
if (!_Equalizers[_Interactions[interaction].Num].ScreenHandles) _Equalizers[_Interactions[interaction].Num].Draw();
{
//TODO:
//Call Update-Method of Equalizer and give infos about bg-sound.
//_Equalizers[_Interactions[interaction].Num].Draw();
}
break; break;
case EType.Playlist: case EType.Playlist:
@@ -1176,10 +1171,9 @@ namespace VocaluxeLib.Menu
_ParticleEffects[_Interactions[interaction].Num].Draw(); _ParticleEffects[_Interactions[interaction].Num].Draw();
break; break;
//TODO: case EType.Lyric:
//case EType.TLyric: _Lyrics[_Interactions[interaction].Num].Draw();
// _Lyrics[_Interactions[interaction].Num].Draw(0); break;
// break;
} }
} }
#endregion InteractionHandling #endregion InteractionHandling
+2 -8
View File
@@ -70,7 +70,7 @@ namespace VocaluxeLib.Menu.SingNotes
public abstract class CSingNotes : IMenuElement public abstract class CSingNotes : IMenuElement
{ {
protected readonly int _PartyModeID; private readonly int _PartyModeID;
private SThemeSingBar _Theme; private SThemeSingBar _Theme;
private bool _ThemeLoaded; private bool _ThemeLoaded;
@@ -88,8 +88,7 @@ namespace VocaluxeLib.Menu.SingNotes
protected CSingNotes(int partyModeID) protected CSingNotes(int partyModeID)
{ {
_PartyModeID = partyModeID; _PartyModeID = partyModeID;
_Theme = new SThemeSingBar(); _Theme = new SThemeSingBar {BarPos = new SBarPosition[CHelper.Sum(CBase.Settings.GetMaxNumPlayer())]};
_Theme.BarPos = new SBarPosition[CHelper.Sum(CBase.Settings.GetMaxNumPlayer())];
_ThemeLoaded = false; _ThemeLoaded = false;
_PlayerNotes = new List<SPlayerNotes>(); _PlayerNotes = new List<SPlayerNotes>();
@@ -240,11 +239,6 @@ namespace VocaluxeLib.Menu.SingNotes
return _PlayerNotes[n].Alpha; return _PlayerNotes[n].Alpha;
} }
public void Draw(int id, int player)
{
Draw(id, null, player);
}
public void Draw(int id, List<CSungLine> sungLines, int player) public void Draw(int id, List<CSungLine> sungLines, int player)
{ {
int n = _FindPlayerNotes(id); int n = _FindPlayerNotes(id);