Merge pull request #53 from flokuep/develop
merge flokuep/Vocaluxe/develop into develop
This commit is contained in:
commit
2ba0943d14
10 files changed
+52
-39
No files matched your search
@@ -167,7 +167,7 @@
|
||||
<!--ScreenOptions-->
|
||||
<TR_SCREENO_OPTIONS>Einstellungen</TR_SCREENO_OPTIONS>
|
||||
<TR_SCREENO_BUTTON_GAME>Spiel</TR_SCREENO_BUTTON_GAME>
|
||||
<TR_SCRENNO_BUTTON_SOUND>Sound</TR_SCRENNO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_SOUND>Sound</TR_SCREENO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_RECORD>Aufnahme</TR_SCREENO_BUTTON_RECORD>
|
||||
<TR_SCREENO_BUTTON_VIDEO>Video</TR_SCREENO_BUTTON_VIDEO>
|
||||
<TR_SCREENO_BUTTON_LYRICS>Songtext</TR_SCREENO_BUTTON_LYRICS>
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<!--ScreenOptions-->
|
||||
<TR_SCREENO_OPTIONS>Menu Options</TR_SCREENO_OPTIONS>
|
||||
<TR_SCREENO_BUTTON_GAME>Game</TR_SCREENO_BUTTON_GAME>
|
||||
<TR_SCRENNO_BUTTON_SOUND>Sound</TR_SCRENNO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_SOUND>Sound</TR_SCREENO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_RECORD>Record</TR_SCREENO_BUTTON_RECORD>
|
||||
<TR_SCREENO_BUTTON_VIDEO>Video</TR_SCREENO_BUTTON_VIDEO>
|
||||
<TR_SCREENO_BUTTON_LYRICS>Lyrics</TR_SCREENO_BUTTON_LYRICS>
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<!--ScreenOptions-->
|
||||
<TR_SCREENO_OPTIONS>Menu des Options</TR_SCREENO_OPTIONS>
|
||||
<TR_SCREENO_BUTTON_GAME>Jeu</TR_SCREENO_BUTTON_GAME>
|
||||
<TR_SCRENNO_BUTTON_SOUND>Son</TR_SCRENNO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_SOUND>Son</TR_SCREENO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_RECORD>Enregistrement</TR_SCREENO_BUTTON_RECORD>
|
||||
<TR_SCREENO_BUTTON_VIDEO>Vidéo</TR_SCREENO_BUTTON_VIDEO>
|
||||
<TR_SCREENO_BUTTON_THEME>Thème</TR_SCREENO_BUTTON_THEME>
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<!--ScreenOptions-->
|
||||
<TR_SCREENO_OPTIONS>Opciones del Menú</TR_SCREENO_OPTIONS>
|
||||
<TR_SCREENO_BUTTON_GAME>Juego</TR_SCREENO_BUTTON_GAME>
|
||||
<TR_SCRENNO_BUTTON_SOUND>Sonido</TR_SCRENNO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_SOUND>Sonido</TR_SCREENO_BUTTON_SOUND>
|
||||
<TR_SCREENO_BUTTON_RECORD>Grabación</TR_SCREENO_BUTTON_RECORD>
|
||||
<TR_SCREENO_BUTTON_VIDEO>Video</TR_SCREENO_BUTTON_VIDEO>
|
||||
<TR_SCREENO_BUTTON_THEME>Estilos</TR_SCREENO_BUTTON_THEME>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
<!--<Font>: Text font name-->
|
||||
<Font>Outline</Font>
|
||||
<!--<Text>: Nothing or translation tag-->
|
||||
<Text>TR_SCRENNO_BUTTON_SOUND</Text>
|
||||
<Text>TR_SCREENO_BUTTON_SOUND</Text>
|
||||
</Text>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
@@ -401,4 +401,4 @@
|
||||
</SReflection>
|
||||
</ButtonOptionsTheme>
|
||||
</ScreenOptions>
|
||||
</root>
|
||||
</root>
|
||||
@@ -80,13 +80,13 @@ namespace Vocaluxe.Base
|
||||
try
|
||||
{
|
||||
File.Delete(_Playlists[PlaylistID].PlaylistFile);
|
||||
_Playlists.RemoveAt(PlaylistID);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CLog.LogError("Can't delete Profile File " + _Playlists[PlaylistID].PlaylistFile + ".xml");
|
||||
}
|
||||
}
|
||||
_Playlists.RemoveAt(PlaylistID);
|
||||
}
|
||||
|
||||
public static void SavePlaylist(int PlaylistID)
|
||||
|
||||
+13
-13
@@ -267,45 +267,45 @@ namespace Vocaluxe.Menu
|
||||
if (_Theme.ButtonPlaylistClose.Rect.Y < CompleteRect.Y)
|
||||
CompleteRect.Y = _Theme.ButtonPlaylistClose.Rect.Y;
|
||||
if (_Theme.ButtonPlaylistClose.Rect.W + _Theme.ButtonPlaylistClose.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||
CompleteRect.W += _Theme.ButtonPlaylistClose.Rect.W + _Theme.ButtonPlaylistClose.Rect.X - CompleteRect.X;
|
||||
CompleteRect.W = _Theme.ButtonPlaylistClose.Rect.W + _Theme.ButtonPlaylistClose.Rect.X - CompleteRect.X;
|
||||
if (_Theme.ButtonPlaylistClose.Rect.Y + _Theme.ButtonPlaylistClose.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||
CompleteRect.H += _Theme.ButtonPlaylistClose.Rect.H + _Theme.ButtonPlaylistClose.Rect.Y - CompleteRect.Y;
|
||||
CompleteRect.H = _Theme.ButtonPlaylistClose.Rect.H + _Theme.ButtonPlaylistClose.Rect.Y - CompleteRect.Y;
|
||||
//ButtonPlaylistName
|
||||
if (_Theme.ButtonPlaylistName.Rect.X < CompleteRect.X)
|
||||
CompleteRect.X = _Theme.ButtonPlaylistName.Rect.X;
|
||||
if (_Theme.ButtonPlaylistName.Rect.Y < CompleteRect.Y)
|
||||
CompleteRect.Y = _Theme.ButtonPlaylistName.Rect.Y;
|
||||
if (_Theme.ButtonPlaylistName.Rect.W + _Theme.ButtonPlaylistName.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||
CompleteRect.W += _Theme.ButtonPlaylistName.Rect.W + _Theme.ButtonPlaylistName.Rect.X - CompleteRect.X;
|
||||
CompleteRect.W = _Theme.ButtonPlaylistName.Rect.W + _Theme.ButtonPlaylistName.Rect.X - CompleteRect.X;
|
||||
if (_Theme.ButtonPlaylistName.Rect.Y + _Theme.ButtonPlaylistName.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||
CompleteRect.H += _Theme.ButtonPlaylistName.Rect.H + _Theme.ButtonPlaylistName.Rect.Y - CompleteRect.Y;
|
||||
CompleteRect.H = _Theme.ButtonPlaylistName.Rect.H + _Theme.ButtonPlaylistName.Rect.Y - CompleteRect.Y;
|
||||
//ButtonPlaylistSing
|
||||
if (_Theme.ButtonPlaylistSing.Rect.X < CompleteRect.X)
|
||||
CompleteRect.X = _Theme.ButtonPlaylistSing.Rect.X;
|
||||
if (_Theme.ButtonPlaylistSing.Rect.Y < CompleteRect.Y)
|
||||
CompleteRect.Y = _Theme.ButtonPlaylistSing.Rect.Y;
|
||||
if (_Theme.ButtonPlaylistSing.Rect.W + _Theme.ButtonPlaylistSing.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||
CompleteRect.W += _Theme.ButtonPlaylistSing.Rect.W + _Theme.ButtonPlaylistSing.Rect.X - CompleteRect.X;
|
||||
CompleteRect.W = _Theme.ButtonPlaylistSing.Rect.W + _Theme.ButtonPlaylistSing.Rect.X - CompleteRect.X;
|
||||
if (_Theme.ButtonPlaylistSing.Rect.Y + _Theme.ButtonPlaylistSing.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||
CompleteRect.H += _Theme.ButtonPlaylistSing.Rect.H + _Theme.ButtonPlaylistSing.Rect.Y - CompleteRect.Y;
|
||||
CompleteRect.H = _Theme.ButtonPlaylistSing.Rect.H + _Theme.ButtonPlaylistSing.Rect.Y - CompleteRect.Y;
|
||||
//ButtonPlaylistSave
|
||||
if (_Theme.ButtonPlaylistSave.Rect.X < CompleteRect.X)
|
||||
CompleteRect.X = _Theme.ButtonPlaylistSave.Rect.X;
|
||||
if (_Theme.ButtonPlaylistSave.Rect.Y < CompleteRect.Y)
|
||||
CompleteRect.Y = _Theme.ButtonPlaylistSave.Rect.Y;
|
||||
if (_Theme.ButtonPlaylistSave.Rect.W + _Theme.ButtonPlaylistSave.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||
CompleteRect.W += _Theme.ButtonPlaylistSave.Rect.W + _Theme.ButtonPlaylistSave.Rect.X - CompleteRect.X;
|
||||
CompleteRect.W = _Theme.ButtonPlaylistSave.Rect.W + _Theme.ButtonPlaylistSave.Rect.X - CompleteRect.X;
|
||||
if (_Theme.ButtonPlaylistSave.Rect.Y + _Theme.ButtonPlaylistSave.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||
CompleteRect.H += _Theme.ButtonPlaylistSave.Rect.H + _Theme.ButtonPlaylistSave.Rect.Y - CompleteRect.Y;
|
||||
CompleteRect.H = _Theme.ButtonPlaylistSave.Rect.H + _Theme.ButtonPlaylistSave.Rect.Y - CompleteRect.Y;
|
||||
//ButtonPlaylistDelete
|
||||
if (_Theme.ButtonPlaylistDelete.Rect.X < CompleteRect.X)
|
||||
CompleteRect.X = _Theme.ButtonPlaylistDelete.Rect.X;
|
||||
if (_Theme.ButtonPlaylistDelete.Rect.Y < CompleteRect.Y)
|
||||
CompleteRect.Y = _Theme.ButtonPlaylistDelete.Rect.Y;
|
||||
if (_Theme.ButtonPlaylistDelete.Rect.W + _Theme.ButtonPlaylistDelete.Rect.X > CompleteRect.W + CompleteRect.X)
|
||||
CompleteRect.W += _Theme.ButtonPlaylistDelete.Rect.W + _Theme.ButtonPlaylistDelete.Rect.X - CompleteRect.X;
|
||||
CompleteRect.W = _Theme.ButtonPlaylistDelete.Rect.W + _Theme.ButtonPlaylistDelete.Rect.X - CompleteRect.X;
|
||||
if (_Theme.ButtonPlaylistDelete.Rect.Y + _Theme.ButtonPlaylistDelete.Rect.H > CompleteRect.Y + CompleteRect.H)
|
||||
CompleteRect.H += _Theme.ButtonPlaylistDelete.Rect.H + _Theme.ButtonPlaylistDelete.Rect.Y - CompleteRect.Y;
|
||||
CompleteRect.H = _Theme.ButtonPlaylistDelete.Rect.H + _Theme.ButtonPlaylistDelete.Rect.Y - CompleteRect.Y;
|
||||
LoadTextures();
|
||||
}
|
||||
return _ThemeLoaded;
|
||||
@@ -420,7 +420,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public bool IsMouseOver(MouseEvent MouseEvent)
|
||||
{
|
||||
return CHelper.IsInBounds(Rect, MouseEvent.X, MouseEvent.Y) || _Interactions.IsMouseOver(MouseEvent);
|
||||
return CHelper.IsInBounds(CompleteRect, MouseEvent.X, MouseEvent.Y) || _Interactions.IsMouseOver(MouseEvent);
|
||||
}
|
||||
|
||||
public void UnloadTextures()
|
||||
@@ -929,7 +929,7 @@ namespace Vocaluxe.Menu
|
||||
//Change order with holding LB
|
||||
if (MouseEvent.LBH && CurrentPlaylistElement != -1 && PlaylistElementContents.Count > 1 && DragAndDropSongID == -1)
|
||||
{
|
||||
|
||||
|
||||
ChangeOrderSource = CurrentPlaylistElement + Offset;
|
||||
|
||||
//Update of Drag/Drop-Texture
|
||||
@@ -1071,7 +1071,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UpdatePlaylist();
|
||||
}
|
||||
_EditMode = EEditMode.None;
|
||||
|
||||
@@ -743,8 +743,8 @@ namespace Vocaluxe.Menu
|
||||
if (_NumVisible < 1 || _ValueNames.Count == 0)
|
||||
return;
|
||||
|
||||
float x = Rect.X + Rect.W * 0.1f;
|
||||
float dx = Rect.W * 0.8f / _NumVisible;
|
||||
float x = Rect.X + (Rect.W - TextRelativeX) * 0.1f;
|
||||
float dx = (Rect.W - TextRelativeX) * 0.8f / _NumVisible;
|
||||
//float y = Rect.Y + (Rect.H - TextH);
|
||||
|
||||
int offset = _Selection - (int)_NumVisible/2;
|
||||
|
||||
@@ -465,10 +465,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
_TextBG.Draw();
|
||||
|
||||
_CoverBig.Draw(1f, EAspect.Crop);
|
||||
if (_vidtex.color.A < 1)
|
||||
_CoverBig.Draw(1f, EAspect.Crop);
|
||||
_TextBG.Draw();
|
||||
|
||||
if (_vidtex.index != -1 && _Video != -1)
|
||||
{
|
||||
|
||||
@@ -107,6 +107,8 @@ namespace Vocaluxe.Screens
|
||||
|
||||
Playlists[htPlaylists(Playlist)].Init();
|
||||
|
||||
_AvailableGameModes.Clear();
|
||||
|
||||
ApplyVolume();
|
||||
}
|
||||
|
||||
@@ -275,6 +277,7 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
|
||||
{
|
||||
ToggleSongOptions(ESongOptionsView.None);
|
||||
OpenAndAddPlaylistAction();
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsRandom)].Selected)
|
||||
@@ -301,6 +304,7 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
else if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected)
|
||||
{
|
||||
ToggleSongOptions(ESongOptionsView.None);
|
||||
OpenPlaylistAction();
|
||||
}
|
||||
break;
|
||||
@@ -363,7 +367,11 @@ namespace Vocaluxe.Screens
|
||||
if (Playlists[htPlaylists(Playlist)].Visible && _PlaylistActive)
|
||||
{
|
||||
if (Playlists[htPlaylists(Playlist)].HandleMouse(MouseEvent))
|
||||
{
|
||||
if (CPlaylists.NumPlaylists != SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].NumValues)
|
||||
UpdatePlaylistNames();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -435,6 +443,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
if (Buttons[htButtons(ButtonOptionsPlaylist)].Selected)
|
||||
{
|
||||
ToggleSongOptions(ESongOptionsView.None);
|
||||
OpenAndAddPlaylistAction();
|
||||
return true;
|
||||
}
|
||||
@@ -473,6 +482,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected)
|
||||
{
|
||||
ToggleSongOptions(ESongOptionsView.None);
|
||||
OpenPlaylistAction();
|
||||
return true;
|
||||
}
|
||||
@@ -898,15 +908,13 @@ namespace Vocaluxe.Screens
|
||||
|
||||
//Open playlist
|
||||
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
||||
Playlists[htPlaylists(Playlist)].ScrollToBottom();
|
||||
}
|
||||
ToggleSongOptions(ESongOptionsView.None);
|
||||
}
|
||||
|
||||
private void OpenAndAddPlaylistAction()
|
||||
{
|
||||
//Open a playlist and add song
|
||||
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1))
|
||||
//Open an existing playlist and add song
|
||||
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID != (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) && (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) != -1)
|
||||
{
|
||||
//Check selected game-mode
|
||||
EGameMode gm;
|
||||
@@ -919,18 +927,19 @@ namespace Vocaluxe.Screens
|
||||
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
//Check if Playlist really exists
|
||||
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 < 0)
|
||||
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
|
||||
else
|
||||
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 >= 0)
|
||||
{
|
||||
Playlists[htPlaylists(Playlist)].ActivePlaylistID = SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1;
|
||||
|
||||
//Add song to playlist
|
||||
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
||||
|
||||
//Open playlist
|
||||
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
||||
|
||||
SetSelectSlidePlaylistToCurrentPlaylist();
|
||||
//Add song to playlist
|
||||
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
|
||||
|
||||
//Open playlist
|
||||
OpenPlaylist(Playlists[htPlaylists(Playlist)].ActivePlaylistID);
|
||||
|
||||
SetSelectSlidePlaylistToCurrentPlaylist();
|
||||
Playlists[htPlaylists(Playlist)].ScrollToBottom();
|
||||
}
|
||||
}
|
||||
//Create a new playlist and add song
|
||||
else if ((SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1) == -1)
|
||||
@@ -956,6 +965,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
//Add new playlist to select-slide
|
||||
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
|
||||
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].AddValue(CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].PlaylistName);
|
||||
|
||||
SetSelectSlidePlaylistToCurrentPlaylist();
|
||||
|
||||
@@ -976,12 +986,14 @@ namespace Vocaluxe.Screens
|
||||
Playlists[htPlaylists(Playlist)].UpdatePlaylist();
|
||||
Playlists[htPlaylists(Playlist)].ScrollToBottom();
|
||||
}
|
||||
ToggleSongOptions(ESongOptionsView.Song);
|
||||
}
|
||||
|
||||
private void SetSelectSlidePlaylistToCurrentPlaylist()
|
||||
{
|
||||
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = Playlists[htPlaylists(Playlist)].ActivePlaylistID + 1;
|
||||
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID > -1)
|
||||
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = Playlists[htPlaylists(Playlist)].ActivePlaylistID + 1;
|
||||
else
|
||||
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user