Merge pull request #95 from flokuep/develop

Smaller fixes and additions
This commit is contained in:
Stephan Sundermann committed 2014-01-21 13:06:22 -08:00
commit 7dcb160e13
7 files changed
+26 -6

No files matched your search

+3
View File
@@ -230,6 +230,9 @@ namespace Vocaluxe.Lib.Draw
case 0xF100: // SC_KEYMENU case 0xF100: // SC_KEYMENU
m.Result = IntPtr.Zero; m.Result = IntPtr.Zero;
break; break;
case 0xF140: // SC_SCREENSAVER
case 0xF170: // SC_MONITORPOWER
break;
default: default:
base.WndProc(ref m); base.WndProc(ref m);
break; break;
+3
View File
@@ -173,6 +173,9 @@ namespace Vocaluxe.Lib.Draw
case 0xF100: // SC_KEYMENU case 0xF100: // SC_KEYMENU
m.Result = IntPtr.Zero; m.Result = IntPtr.Zero;
break; break;
case 0xF140: // SC_SCREENSAVER
case 0xF170: // SC_MONITORPOWER
break;
default: default:
base.WndProc(ref m); base.WndProc(ref m);
break; break;
+3
View File
@@ -310,6 +310,9 @@ namespace Vocaluxe.Lib.Draw
case 0xF100: // SC_KEYMENU case 0xF100: // SC_KEYMENU
m.Result = IntPtr.Zero; m.Result = IntPtr.Zero;
break; break;
case 0xF140: // SC_SCREENSAVER
case 0xF170: // SC_MONITORPOWER
break;
default: default:
base.WndProc(ref m); base.WndProc(ref m);
break; break;
@@ -116,7 +116,7 @@ namespace VocaluxeLib.Menu.SongMenu
//the real selected song for singing //the real selected song for singing
protected int _Locked { get; set; } protected int _Locked { get; set; }
private int _PreviewIdInternal = -1; protected int _PreviewIdInternal = -1;
protected virtual int _PreviewId protected virtual int _PreviewId
{ {
get { return _PreviewIdInternal; } get { return _PreviewIdInternal; }
@@ -523,7 +523,7 @@ namespace VocaluxeLib.Menu.SongMenu
CBase.Songs.SetCategory(-1); CBase.Songs.SetCategory(-1);
} }
private void _PlaySong(int nr) protected void _PlaySong(int nr)
{ {
if (CBase.Songs.IsInCategory() && (_PreviewId != nr || _Streams.Count == 0)) if (CBase.Songs.IsInCategory() && (_PreviewId != nr || _Streams.Count == 0))
{ {
@@ -555,6 +555,8 @@ namespace VocaluxeLib.Menu.SongMenu
_Streams.Add(stream); _Streams.Add(stream);
_PreviewSongStream = stream; _PreviewSongStream = stream;
_PreviewIdInternal = nr;
if (song.VideoFileName != "" && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON) if (song.VideoFileName != "" && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
{ {
_PreviewVideoStream = CBase.Video.Load(Path.Combine(song.Folder, song.VideoFileName)); _PreviewVideoStream = CBase.Video.Load(Path.Combine(song.Folder, song.VideoFileName));
@@ -67,9 +67,14 @@ namespace VocaluxeLib.Menu.SongMenu
{ {
set set
{ {
base._PreviewId = value; base._PlaySong(value);
base._PreviewIdInternal = value;
_UpdatePreview(); _UpdatePreview();
} }
get
{
return base._PreviewIdInternal;
}
} }
public override int GetActualSelection() public override int GetActualSelection()
@@ -222,7 +227,6 @@ namespace VocaluxeLib.Menu.SongMenu
_EnterCategory(0); _EnterCategory(0);
_ActualSelection = -1; _ActualSelection = -1;
_Locked = -1; _Locked = -1;
_PreviewId = -1;
_UpdateList(0, true); _UpdateList(0, true);
//AfterCategoryChange(); //AfterCategoryChange();
SetSelectedSong(_PreviewId); SetSelectedSong(_PreviewId);
@@ -372,8 +376,9 @@ namespace VocaluxeLib.Menu.SongMenu
if (!keyEvent.Handled) if (!keyEvent.Handled)
{ {
_PreviewId = _Locked;
_ActualSelection = _Locked; _ActualSelection = _Locked;
if (_PreviewId != _Locked)
_PreviewId = _Locked;
for (int i = 0; i < _Tiles.Count; i++) for (int i = 0; i < _Tiles.Count; i++)
_Tiles[i].Selected = _Locked == i + _Offset; _Tiles[i].Selected = _Locked == i + _Offset;
@@ -554,6 +559,7 @@ namespace VocaluxeLib.Menu.SongMenu
public override void SetSelectedSong(int visibleSongNr) public override void SetSelectedSong(int visibleSongNr)
{ {
base._PlaySong(visibleSongNr);
base.SetSelectedSong(visibleSongNr); base.SetSelectedSong(visibleSongNr);
if (visibleSongNr >= 0 && visibleSongNr < CBase.Songs.GetNumSongsVisible()) if (visibleSongNr >= 0 && visibleSongNr < CBase.Songs.GetNumSongsVisible())
+3
View File
@@ -488,9 +488,11 @@ namespace VocaluxeLib.Songs
if (stop < (voice.Lines[series[i].Start].FirstNoteBeat + ((voice.Lines[series[i].End].LastNoteBeat - voice.Lines[series[i].Start].FirstNoteBeat) / 2))) if (stop < (voice.Lines[series[i].Start].FirstNoteBeat + ((voice.Lines[series[i].End].LastNoteBeat - voice.Lines[series[i].Start].FirstNoteBeat) / 2)))
{ {
ShortEnd.EndBeat = voice.Lines[series[i].Start - 1].LastNote.EndBeat; ShortEnd.EndBeat = voice.Lines[series[i].Start - 1].LastNote.EndBeat;
ShortEnd.Source = EDataSource.Calculated;
return; return;
} }
ShortEnd.EndBeat = voice.Lines[series[i].End].LastNote.EndBeat; ShortEnd.EndBeat = voice.Lines[series[i].End].LastNote.EndBeat;
ShortEnd.Source = EDataSource.Calculated;
return; return;
} }
} }
@@ -501,6 +503,7 @@ namespace VocaluxeLib.Songs
if (line.FirstNoteBeat < stop && line.LastNoteBeat > stop) if (line.FirstNoteBeat < stop && line.LastNoteBeat > stop)
{ {
ShortEnd.EndBeat = line.LastNoteBeat; ShortEnd.EndBeat = line.LastNoteBeat;
ShortEnd.Source = EDataSource.Calculated;
return; return;
} }
} }
+1 -1
View File
@@ -309,7 +309,7 @@ namespace VocaluxeLib.Songs
_Song.ShortEnd.Source = EDataSource.Tag; _Song.ShortEnd.Source = EDataSource.Tag;
} }
else else
_LogWarning("Invalid medleyendbeat"); _LogWarning("Invalid shortendbeat");
} }
break; break;
case "CALCMEDLEY": case "CALCMEDLEY":