Merge pull request #328 from Vocaluxe/release-0.4.1
Bugfix release 0.4.1
This commit is contained in:
30 files changed
+556
-184
No files matched your search
+8
-8
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<DOCUMENT Type="Advanced Installer" CreateVersion="14.2.1" version="14.2.1" Modules="professional" RootPath="." Language="en" Id="{0664D363-F696-4E25-87C5-DE348E591191}">
|
||||
<DOCUMENT Type="Advanced Installer" CreateVersion="14.2.1" version="14.4.2" Modules="professional" RootPath="." Language="en" Id="{0664D363-F696-4E25-87C5-DE348E591191}">
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
||||
<ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiDriverPackagesComponent;UserAccountsComponent;ScheduledTasksComponent;SqlConnectionComponent;AutorunComponent;FirewallExceptionComponent;GameUxComponent;MsiDirectEditorComponent;SharePointSlnComponent;SilverlightSlnComponent;MultipleInstancesComponent;SccmComponent;ActSyncAppComponent"/>
|
||||
</COMPONENT>
|
||||
@@ -18,7 +18,7 @@
|
||||
<ROW Property="ALLUSERS" Value="1"/>
|
||||
<ROW Property="ARPCOMMENTS" Value="This installs Vocaluxe. Vocaluxe is an open source singing game inspired by SingStar™ and Ultrastar Deluxe." ValueLocId="*"/>
|
||||
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1#x64_1:1"/>
|
||||
<ROW Property="ARPNOREPAIR" Value="1"/>
|
||||
<ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="DefaultBuild:1#x64_1:1"/>
|
||||
<ROW Property="ARPPRODUCTICON" Value="Vocaluxe.exe" Type="8"/>
|
||||
<ROW Property="ARPURLINFOABOUT" Value="https://vocaluxe.org"/>
|
||||
<ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:banner.jpg#x64_1:banner.jpg" Type="1" MsiKey="BannerBitmap"/>
|
||||
@@ -28,7 +28,7 @@
|
||||
<ROW Property="ProductCode" Value="1029:{DCDF3A8D-05B4-4CBF-8128-0BD10FDE4BDB} 1031:{3A3B2184-E965-4A08-8864-8B59990F963A} 1033:{756FABFA-4336-40AE-9245-60AB2D2C38F9} 1036:{ABCA971F-E153-4014-AC14-FF305678F6DE} 1038:{4345A445-5D72-4C8D-BB34-98C8B5D152E4} 1040:{D060F8C3-D29E-442F-B13C-B132B29C58BF} 1043:{5C0D700A-45AC-4616-94F6-2CAF8FA7E8AA} 1053:{0CAB03D2-183F-4680-970F-07F7EFAB0373} 1055:{307D49D0-9D47-409F-A3D1-92630CAE5C7E} 2070:{87BE9C14-3781-4EE9-871C-15E8F220A4E0} 3082:{F262F983-9F34-4201-B38B-0D45D2879E23} " Type="16"/>
|
||||
<ROW Property="ProductLanguage" Value="1055"/>
|
||||
<ROW Property="ProductName" Value="Vocaluxe"/>
|
||||
<ROW Property="ProductVersion" Value="0.4.0.11" Type="32" TargetFile="Vocaluxe.exe"/>
|
||||
<ROW Property="ProductVersion" Value="0.4.0.12" Type="32" TargetFile="Vocaluxe.exe"/>
|
||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
|
||||
<ROW Property="UpgradeCode" Value="{4254D936-CC8F-4E52-B79B-A6C733ABEC96}"/>
|
||||
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#x64_1:Windows 9x/ME" ValueLocId="-"/>
|
||||
@@ -3765,8 +3765,8 @@
|
||||
<ROW Action="AI_DetectSoftware" Sequence="101"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
|
||||
<ROW BuildKey="DefaultBuild" BuildName="x64" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]-[|ProductVersion]-x64" MsiPackageType="x64"/>
|
||||
<ROW BuildKey="x64_1" BuildName="x86" BuildOrder="2" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]-[|ProductVersion]-x86"/>
|
||||
<ROW BuildKey="DefaultBuild" BuildName="x64" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]_[|ProductVersion]_Windows_x64" MsiPackageType="x64"/>
|
||||
<ROW BuildKey="x64_1" BuildName="x86" BuildOrder="2" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]_[|ProductVersion]_Windows_x86"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
||||
<ROW Path="<AI_DICTS>ui.ail"/>
|
||||
@@ -4032,8 +4032,8 @@
|
||||
<ATTRIBUTE name="PrereqsOrder" value="B63_41B8_9CB7_8C5E07C0FC18_ CB585686_DAA3_4384_BDDF_08ABA631E9F3_ C673FE9433B49AFAC9592AB26B8F8E4"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
|
||||
<ROW SearchKey="B63_41B8_9CB7_8C5E07C0FC18_Version" Prereq="B63_41B8_9CB7_8C5E07C0FC18_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\amd64\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_B63_41B8_9CB7_8C5E07C0FC18_"/>
|
||||
<ROW SearchKey="C673FE9433B49AFAC9592AB26B8F8E4Install" Prereq="C673FE9433B49AFAC9592AB26B8F8E4" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install" RefContent="M1" Order="1" Property="PreReqSearch_C673FE9433B49AFAC9592AB26B8F8E4"/>
|
||||
<ROW SearchKey="CB585686_DAA3_4384_BDDF_08ABA631E9F3_Version" Prereq="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\x86\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_CB585686_DAA3_4384_BDDF_08ABA631E9F3_"/>
|
||||
<ROW SearchKey="B63_41B8_9CB7_8C5E07C0FC18_Version" Prereq="B63_41B8_9CB7_8C5E07C0FC18_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\amd64\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_B63_41B8_9CB7_8C5E07C0"/>
|
||||
<ROW SearchKey="C673FE9433B49AFAC9592AB26B8F8E4Install" Prereq="C673FE9433B49AFAC9592AB26B8F8E4" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install" RefContent="M1" Order="1" Property="PreReqSearch_C673FE9433B49AFAC9592A"/>
|
||||
<ROW SearchKey="CB585686_DAA3_4384_BDDF_08ABA631E9F3_Version" Prereq="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\x86\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_CB585686_DAA3_4384_BDD"/>
|
||||
</COMPONENT>
|
||||
</DOCUMENT>
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
Vocaluxe 0.4 README
|
||||
Vocaluxe 0.4.1 README
|
||||
----------------------------
|
||||
|
||||
=================================
|
||||
@@ -168,7 +168,6 @@ Vocaluxe Homepage: https://vocaluxe.org
|
||||
Bug Tracker: https://github.com/Vocaluxe/Vocaluxe/issues
|
||||
Translations: https://www.transifex.com/projects/p/vocaluxe/
|
||||
GitHub Wiki: https://github.com/Vocaluxe/Vocaluxe/wiki
|
||||
Support Forum (German): http://www.ultra-star.de
|
||||
Song-DataBase (USDB): http://usdb.animux.de/
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using VocaluxeLib.Game;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
@@ -430,39 +431,62 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
|
||||
private void _UpdateScores()
|
||||
{
|
||||
//Prepare results table
|
||||
if (GameData.ResultTable.Count == 0)
|
||||
{
|
||||
for (int i = 0; i < GameData.NumPlayer; i++)
|
||||
{
|
||||
var row = new CResultTableRow {PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0};
|
||||
var row = new CResultTableRow { PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0 };
|
||||
GameData.ResultTable.Add(row);
|
||||
}
|
||||
|
||||
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce];
|
||||
GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
|
||||
for (int i = 0; i < GameData.NumRounds; i++)
|
||||
{
|
||||
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
|
||||
GameData.Results[i, j] = 0;
|
||||
}
|
||||
}
|
||||
SPlayer[] results = CBase.Game.GetPlayers();
|
||||
if (results == null)
|
||||
return;
|
||||
|
||||
if (results.Length < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
//Get points from game
|
||||
CPoints points = CBase.Game.GetPoints();
|
||||
SPlayer[] players = CBase.Game.GetPlayers();
|
||||
|
||||
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
|
||||
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points);
|
||||
//Go over all rounds and sum up points
|
||||
for (int round = 0; round < points.NumRounds; round++)
|
||||
{
|
||||
SPlayer[] res = points.GetPlayer(round, GameData.NumPlayerAtOnce);
|
||||
|
||||
List<SStats> points = _GetPointsForPlayer(results);
|
||||
if (res == null || res.Length < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
|
||||
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
|
||||
{
|
||||
players[p].Points += res[p].Points;
|
||||
players[p].PointsGoldenNotes += res[p].PointsGoldenNotes;
|
||||
players[p].PointsLineBonus += res[p].PointsLineBonus;
|
||||
}
|
||||
}
|
||||
//Calculate average points
|
||||
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
|
||||
{
|
||||
players[p].Points /= points.NumRounds;
|
||||
players[p].PointsGoldenNotes /= points.NumRounds;
|
||||
players[p].PointsLineBonus /= points.NumRounds;
|
||||
|
||||
//Save points in GameData
|
||||
GameData.Results[GameData.CurrentRoundNr - 2, p] = (int)Math.Round(players[p].Points);
|
||||
}
|
||||
|
||||
List<SStats> stats = _GetPointsForPlayer(players);
|
||||
|
||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||
{
|
||||
//Find matching row in results table
|
||||
int index = -1;
|
||||
for (int j = 0; j < GameData.ResultTable.Count; j++)
|
||||
{
|
||||
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID)
|
||||
if (stats[i].ProfileID == GameData.ResultTable[j].PlayerID)
|
||||
{
|
||||
index = j;
|
||||
break;
|
||||
@@ -473,14 +497,14 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
continue;
|
||||
CResultTableRow row = GameData.ResultTable[index];
|
||||
|
||||
//Update results entry
|
||||
row.NumPlayed++;
|
||||
row.NumWon += points[i].Won;
|
||||
row.NumSingPoints += points[i].SingPoints;
|
||||
row.NumGamePoints += points[i].GamePoints;
|
||||
row.NumWon += stats[i].Won;
|
||||
row.NumSingPoints += stats[i].SingPoints;
|
||||
row.NumGamePoints += stats[i].GamePoints;
|
||||
|
||||
GameData.ResultTable[index] = row;
|
||||
}
|
||||
|
||||
|
||||
GameData.ResultTable.Sort();
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_AddText(_NextPlayerTexts[_NextPlayerTexts.Count - 1]);
|
||||
_NextPlayerStatics.Add(GetNewStatic(_Statics[_StaticNextPlayer]));
|
||||
_AddStatic(_NextPlayerStatics[_NextPlayerStatics.Count - 1]);
|
||||
_NextPlayerStatics[_NextPlayerStatics.Count - 1].Aspect = EAspect.Crop;
|
||||
}
|
||||
_Statics[_StaticNextPlayer].Visible = false;
|
||||
}
|
||||
|
||||
@@ -411,74 +411,79 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
|
||||
private void _UpdateScores()
|
||||
{
|
||||
//Prepare results table
|
||||
if (GameData.ResultTable.Count == 0)
|
||||
{
|
||||
for (int i = 0; i < GameData.NumPlayer; i++)
|
||||
{
|
||||
CResultTableRow row = new CResultTableRow {PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0};
|
||||
var row = new CResultTableRow { PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0 };
|
||||
GameData.ResultTable.Add(row);
|
||||
}
|
||||
|
||||
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce];
|
||||
GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
|
||||
for (int i = 0; i < GameData.NumRounds; i++)
|
||||
{
|
||||
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
|
||||
GameData.Results[i, j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
CPoints gamePoints = CBase.Game.GetPoints();
|
||||
if (gamePoints == null || gamePoints.NumPlayer < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
|
||||
SPlayer[] results = gamePoints.GetPlayer(0, GameData.NumPlayerAtOnce);
|
||||
if (results == null)
|
||||
return;
|
||||
//Get points from game
|
||||
CPoints points = CBase.Game.GetPoints();
|
||||
SPlayer[] players = CBase.Game.GetPlayers();
|
||||
|
||||
if (results.Length < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
|
||||
if (gamePoints.NumRounds == 0)
|
||||
return;
|
||||
|
||||
for (int i = 1; i < gamePoints.NumRounds; i++)
|
||||
//Go over all rounds and sum up points
|
||||
for (int round = 0; round < points.NumRounds; round++)
|
||||
{
|
||||
SPlayer[] temp = gamePoints.GetPlayer(i, GameData.NumPlayerAtOnce);
|
||||
SPlayer[] res = points.GetPlayer(round, GameData.NumPlayerAtOnce);
|
||||
|
||||
if (res == null || res.Length < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
|
||||
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
|
||||
results[p].Points += temp[p].Points;
|
||||
{
|
||||
players[p].Points += res[p].Points;
|
||||
players[p].PointsGoldenNotes += res[p].PointsGoldenNotes;
|
||||
players[p].PointsLineBonus += res[p].PointsLineBonus;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
|
||||
//Calculate average points
|
||||
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
|
||||
{
|
||||
results[j].Points = results[j].Points / gamePoints.NumRounds;
|
||||
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points);
|
||||
players[p].Points /= points.NumRounds;
|
||||
players[p].PointsGoldenNotes /= points.NumRounds;
|
||||
players[p].PointsLineBonus /= points.NumRounds;
|
||||
|
||||
//Save points in GameData
|
||||
GameData.Results[GameData.CurrentRoundNr - 2, p] = (int)Math.Round(players[p].Points);
|
||||
}
|
||||
|
||||
List<SStats> points = _GetPointsForPlayer(results);
|
||||
List<SStats> stats = _GetPointsForPlayer(players);
|
||||
|
||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||
{
|
||||
//Find matching row in results table
|
||||
int index = -1;
|
||||
for (int j = 0; j < GameData.ResultTable.Count; j++)
|
||||
{
|
||||
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID)
|
||||
if (stats[i].ProfileID == GameData.ResultTable[j].PlayerID)
|
||||
{
|
||||
index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
CResultTableRow row = GameData.ResultTable[index];
|
||||
if (index == -1)
|
||||
continue;
|
||||
CResultTableRow row = GameData.ResultTable[index];
|
||||
|
||||
row.NumPlayed++;
|
||||
row.NumWon += points[i].Won;
|
||||
row.NumSingPoints += points[i].SingPoints;
|
||||
row.NumGamePoints += points[i].GamePoints;
|
||||
//Update results entry
|
||||
row.NumPlayed++;
|
||||
row.NumWon += stats[i].Won;
|
||||
row.NumSingPoints += stats[i].SingPoints;
|
||||
row.NumGamePoints += stats[i].GamePoints;
|
||||
|
||||
GameData.ResultTable[index] = row;
|
||||
}
|
||||
GameData.ResultTable[index] = row;
|
||||
}
|
||||
|
||||
GameData.ResultTable.Sort();
|
||||
|
||||
@@ -20,6 +20,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using VocaluxeLib.Game;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
@@ -530,13 +531,33 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
if (!GameData.Rounds[GameData.FieldNr].Finished)
|
||||
GameData.CurrentRoundNr++;
|
||||
|
||||
CPoints points = CBase.Game.GetPoints();
|
||||
SPlayer[] results = CBase.Game.GetPlayers();
|
||||
if (results == null)
|
||||
|
||||
if (results == null || results.Length < 2)
|
||||
return;
|
||||
|
||||
if (results.Length < 2)
|
||||
return;
|
||||
//Sum up all points
|
||||
for (int r = 0; r < points.NumRounds; r++)
|
||||
{
|
||||
SPlayer[] player = points.GetPlayer(r, 2);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
results[i].Points += player[i].Points;
|
||||
results[i].PointsGoldenNotes += player[i].PointsGoldenNotes;
|
||||
results[i].PointsLineBonus += player[i].PointsLineBonus;
|
||||
}
|
||||
}
|
||||
|
||||
//Calc average of points
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
results[i].Points /= points.NumRounds;
|
||||
results[i].PointsGoldenNotes /= points.NumRounds;
|
||||
results[i].PointsLineBonus /= points.NumRounds;
|
||||
}
|
||||
|
||||
//Decide who has won
|
||||
GameData.Rounds[GameData.FieldNr].PointsTeam1 = (int)Math.Round(results[0].Points);
|
||||
GameData.Rounds[GameData.FieldNr].PointsTeam2 = (int)Math.Round(results[1].Points);
|
||||
GameData.Rounds[GameData.FieldNr].Finished = true;
|
||||
|
||||
@@ -98,6 +98,9 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
_CreateFields();
|
||||
_Buttons[_ButtonField].Visible = false;
|
||||
|
||||
_Statics[_StaticAvatarT1].Aspect = EAspect.Crop;
|
||||
_Statics[_StaticAvatarT2].Aspect = EAspect.Crop;
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace Vocaluxe.Base
|
||||
private static Task _PreviewStartHelperTask;
|
||||
private static int _PreviewStartWaitCounter;
|
||||
private const int _PreviewStartWaitMaxTries = 10;
|
||||
private static readonly object _PreviewStartHelperTaskLock = new Object();
|
||||
|
||||
public static bool VideoEnabled
|
||||
{
|
||||
@@ -256,10 +257,16 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
if (_PreviewStartHelperTask != null && ( _PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
|
||||
{
|
||||
_PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext());
|
||||
_PreviewStartHelperTask.Dispose();
|
||||
_PreviewStartHelperTask = null;
|
||||
_PreviewStartWaitCounter = 0;
|
||||
lock (_PreviewStartHelperTaskLock)
|
||||
{
|
||||
// Recheck the condition as it cloud have change before we got the lock
|
||||
if (_PreviewStartHelperTask != null && (_PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
|
||||
{
|
||||
_PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext());
|
||||
_PreviewStartHelperTask = null;
|
||||
_PreviewStartWaitCounter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsPlaying)
|
||||
@@ -315,30 +322,42 @@ namespace Vocaluxe.Base
|
||||
|
||||
|
||||
//Change song position only if song is changed or near to end
|
||||
if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length)
|
||||
if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length || _PreviewStartHelperTask == null)
|
||||
{
|
||||
_PreviewStartHelperTask = new Task(() =>
|
||||
lock (_PreviewStartHelperTaskLock)
|
||||
{
|
||||
float length = _PreviewPlayer.Length;
|
||||
if (length < 1)
|
||||
length = 30; // If length is unknow or invalid assume a length of 30s
|
||||
_PreviewStartHelperTask = new Task(() =>
|
||||
{
|
||||
float length = _PreviewPlayer.Length;
|
||||
if (length < 1)
|
||||
length = 30; // If length is unknow or invalid assume a length of 30s
|
||||
|
||||
if (start < 0)
|
||||
start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime;
|
||||
if (start > length - 5f)
|
||||
start = Math.Max(0f, Math.Min(length / 4f, length - 5f));
|
||||
if (start >= 0.5f)
|
||||
start -= 0.5f;
|
||||
if (start < 0)
|
||||
start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime;
|
||||
if (start > length - 5f)
|
||||
start = Math.Max(0f, Math.Min(length / 4f, length - 5f));
|
||||
if (start >= 0.5f)
|
||||
start -= 0.5f;
|
||||
|
||||
_PreviewPlayer.Position = start;
|
||||
Play();
|
||||
});
|
||||
_PreviewPlayer.Position = start;
|
||||
Play();
|
||||
});
|
||||
}
|
||||
_CurPlayer = _PreviewPlayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
_PreviewStartHelperTask.Dispose();
|
||||
_PreviewStartHelperTask = null;
|
||||
if (_PreviewStartHelperTask != null)
|
||||
{
|
||||
lock (_PreviewStartHelperTaskLock)
|
||||
{
|
||||
// Recheck the condition as it cloud have change before we got the lock
|
||||
if (_PreviewStartHelperTask != null)
|
||||
{
|
||||
_PreviewStartHelperTask = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
_PreviewPlayer.Position = _CurPlayer.Position;
|
||||
_CurPlayer = _PreviewPlayer;
|
||||
Play();
|
||||
|
||||
+29
-12
@@ -191,13 +191,14 @@ namespace Vocaluxe.Base
|
||||
public static event OnSongMenuChanged SongMenuChanged;
|
||||
|
||||
//Folders
|
||||
//We need full path for folders for matching folder path with textfile path when loading
|
||||
public static readonly List<string> SongFolders = new List<string>
|
||||
{
|
||||
#if INSTALLER
|
||||
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs),
|
||||
CSettings.FolderNameSongs
|
||||
Path.Combine(CSettings.ProgramFolder, FolderNameSongs)
|
||||
#elif WIN
|
||||
CSettings.FolderNameSongs
|
||||
Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
|
||||
#elif LINUX
|
||||
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
|
||||
#endif
|
||||
@@ -335,15 +336,8 @@ namespace Vocaluxe.Base
|
||||
else
|
||||
Config = xml.DeserializeString<SConfig>("<root />");
|
||||
|
||||
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
|
||||
{
|
||||
SongFolders.Clear();
|
||||
SongFolders.AddRange(Config.Game.SongFolder);
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.Game.SongFolder = SongFolders.ToArray();
|
||||
}
|
||||
NormalizeSongPaths();
|
||||
|
||||
if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0)
|
||||
Config.Game.ScoreAnimationTime = 1;
|
||||
|
||||
@@ -625,6 +619,29 @@ namespace Vocaluxe.Base
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set song path if none is find in config and check if every path exists
|
||||
/// </summary>
|
||||
public static void NormalizeSongPaths()
|
||||
{
|
||||
//Check if there are configured songfolders
|
||||
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
|
||||
{
|
||||
SongFolders.Clear();
|
||||
|
||||
foreach (string folder in Config.Game.SongFolder)
|
||||
{
|
||||
//Check if folder exists
|
||||
if (Directory.Exists(folder))
|
||||
SongFolders.Add(Path.GetFullPath(folder));
|
||||
}
|
||||
}
|
||||
|
||||
//Test if songfolders are still empty or now empty
|
||||
if(Config.Game.SongFolder.Length == 0)
|
||||
Config.Game.SongFolder = SongFolders.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load command-line-parameters and their values to lists.
|
||||
/// </summary>
|
||||
@@ -786,4 +803,4 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
-3
@@ -822,7 +822,14 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void Close(ref CVideoStream stream)
|
||||
{
|
||||
CVideo.Close(ref stream);
|
||||
try
|
||||
{
|
||||
CVideo.Close(ref stream);
|
||||
}
|
||||
catch (NotSupportedException e)
|
||||
{
|
||||
CLog.LogError($"Clould not close the background video: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLoop(CVideoStream stream, bool loop = true)
|
||||
@@ -832,12 +839,26 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void Pause(CVideoStream stream)
|
||||
{
|
||||
CVideo.Pause(stream);
|
||||
try
|
||||
{
|
||||
CVideo.Pause(stream);
|
||||
}
|
||||
catch (NotSupportedException e)
|
||||
{
|
||||
CLog.LogError($"Clould not pause the background video: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume(CVideoStream stream)
|
||||
{
|
||||
CVideo.Resume(stream);
|
||||
try
|
||||
{
|
||||
CVideo.Resume(stream);
|
||||
}
|
||||
catch (NotSupportedException e)
|
||||
{
|
||||
CLog.LogError($"Clould not resume the background video: {e.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using Vocaluxe.Lib.Video;
|
||||
using VocaluxeLib;
|
||||
|
||||
@@ -61,6 +62,10 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static CVideoStream Load(string videoFileName)
|
||||
{
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
return _VideoDecoder.Load(videoFileName);
|
||||
}
|
||||
|
||||
@@ -73,41 +78,109 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static float GetLength(CVideoStream stream)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
return _VideoDecoder.GetLength(stream);
|
||||
}
|
||||
|
||||
public static bool GetFrame(CVideoStream stream, float time)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
return _VideoDecoder.GetFrame(stream, time);
|
||||
}
|
||||
|
||||
public static bool Skip(CVideoStream stream, float start, float gap)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
return _VideoDecoder.Skip(stream, start, gap);
|
||||
}
|
||||
|
||||
public static void SetLoop(CVideoStream stream, bool loop)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
_VideoDecoder.SetLoop(stream, loop);
|
||||
}
|
||||
|
||||
public static void Pause(CVideoStream stream)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
_VideoDecoder.Pause(stream);
|
||||
}
|
||||
|
||||
public static void Resume(CVideoStream stream)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
_VideoDecoder.Resume(stream);
|
||||
}
|
||||
|
||||
public static bool Finished(CVideoStream stream)
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
throw new ArgumentException("stream is null");
|
||||
}
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
return _VideoDecoder.Finished(stream);
|
||||
}
|
||||
|
||||
public static void Update()
|
||||
{
|
||||
if (_VideoDecoder == null)
|
||||
{
|
||||
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
|
||||
}
|
||||
|
||||
_VideoDecoder.Update();
|
||||
}
|
||||
#endregion Interface
|
||||
|
||||
@@ -53,6 +53,10 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
_VideoTimer.Reset();
|
||||
_Finished = false;
|
||||
if (_VideoStream == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//CVideo.VdSkip(_VideoStream, 0f, 0f);
|
||||
_VideoTimer.Start();
|
||||
CVideo.Resume(_VideoStream);
|
||||
@@ -60,12 +64,19 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
CVideo.Pause(_VideoStream);
|
||||
if (_VideoStream != null)
|
||||
{
|
||||
CVideo.Pause(_VideoStream);
|
||||
}
|
||||
_VideoTimer.Stop();
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (_VideoStream == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
CVideo.Resume(_VideoStream);
|
||||
_VideoTimer.Start();
|
||||
}
|
||||
@@ -92,7 +103,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void PreLoad()
|
||||
{
|
||||
if (!_Loaded)
|
||||
if (!_Loaded || _VideoStream == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -111,7 +122,10 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void Close()
|
||||
{
|
||||
CVideo.Close(ref _VideoStream);
|
||||
if (_VideoStream != null)
|
||||
{
|
||||
CVideo.Close(ref _VideoStream);
|
||||
}
|
||||
_Loaded = false;
|
||||
_Finished = false;
|
||||
_VideoTimer.Reset();
|
||||
|
||||
@@ -463,10 +463,19 @@ namespace Vocaluxe.Lib.Database
|
||||
if (reader != null && reader.HasRows)
|
||||
{
|
||||
reader.Read();
|
||||
artist = reader.GetString(0);
|
||||
title = reader.GetString(1);
|
||||
numPlayed = reader.GetInt32(2);
|
||||
dateAdded = new DateTime(reader.GetInt64(3));
|
||||
|
||||
if (!reader.IsDBNull(0))
|
||||
artist = reader.GetString(0);
|
||||
|
||||
if (!reader.IsDBNull(1))
|
||||
title = reader.GetString(1);
|
||||
|
||||
if (!reader.IsDBNull(2))
|
||||
numPlayed = reader.GetInt32(2);
|
||||
|
||||
if (!reader.IsDBNull(3))
|
||||
dateAdded = new DateTime(reader.GetInt64(3));
|
||||
|
||||
reader.Dispose();
|
||||
return true;
|
||||
}
|
||||
@@ -604,7 +613,7 @@ namespace Vocaluxe.Lib.Database
|
||||
{
|
||||
//Check for USDX 1.1 DB
|
||||
_CreateHighscoreDBV1(filePath);
|
||||
result &= !_ConvertFrom110(filePath);
|
||||
result &= _ConvertFrom110(filePath);
|
||||
result &= _UpdateDatabase(1, connection);
|
||||
result &= _UpdateDatabase(2, connection);
|
||||
}
|
||||
@@ -733,13 +742,22 @@ namespace Vocaluxe.Lib.Database
|
||||
transaction.Commit();
|
||||
|
||||
//Delete old tables after conversion
|
||||
command.CommandText = "DROP TABLE US_Scores;";
|
||||
command.CommandText = "DROP TABLE IF EXISTS us_scores;";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "DROP TABLE US_Songs;";
|
||||
command.CommandText = "DROP TABLE IF EXISTS us_songs;";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "DROP TABLE us_statistics_info;";
|
||||
command.CommandText = "DROP TABLE IF EXISTS us_statistics_info;";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "DROP TABLE IF EXISTS us_users_info;";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "DROP TABLE IF EXISTS us_webs;";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "DROP TABLE IF EXISTS us_webs_stats;";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
//This versioning is not used in Vocaluxe so reset it to 0
|
||||
@@ -918,7 +936,7 @@ namespace Vocaluxe.Lib.Database
|
||||
|
||||
if (currentVersion < 2)
|
||||
updated &= _ConvertV1toV2(connection);
|
||||
if (currentVersion < 3)
|
||||
else if (currentVersion < 3)
|
||||
updated &= _ConvertV2toV3(connection);
|
||||
|
||||
return updated;
|
||||
|
||||
@@ -74,12 +74,23 @@ namespace Vocaluxe.Lib.Sound
|
||||
}
|
||||
lock (_Mutex)
|
||||
{
|
||||
if (_Disposed)
|
||||
return;
|
||||
Debug.Assert(_RefCount > 0);
|
||||
_RefCount--;
|
||||
if (_RefCount == 0)
|
||||
PortAudio.Pa_Terminate();
|
||||
{
|
||||
try
|
||||
{
|
||||
PortAudio.Pa_Terminate();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CLog.LogError(errorText: $"Error disposing PortAudio: {ex.Message}", e: ex);
|
||||
}
|
||||
}
|
||||
_Disposed = true;
|
||||
}
|
||||
_Disposed = true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -100,11 +111,11 @@ namespace Vocaluxe.Lib.Sound
|
||||
double sampleRate, uint framesPerBuffer, PortAudio.PaStreamFlags streamFlags,
|
||||
PortAudio.PaStreamCallbackDelegate streamCallback, IntPtr userData)
|
||||
{
|
||||
if (_Disposed)
|
||||
throw new ObjectDisposedException("PortAudioHandle already disposed");
|
||||
|
||||
lock (_Mutex)
|
||||
{
|
||||
if (_Disposed)
|
||||
throw new ObjectDisposedException("PortAudioHandle already disposed");
|
||||
|
||||
PortAudio.PaError res = PortAudio.Pa_OpenStream(out stream, ref inputParameters, ref outputParameters, sampleRate, framesPerBuffer, streamFlags, streamCallback,
|
||||
userData);
|
||||
if (res == PortAudio.PaError.paNoError)
|
||||
@@ -157,12 +168,19 @@ namespace Vocaluxe.Lib.Sound
|
||||
|
||||
public void CloseStream(IntPtr stream)
|
||||
{
|
||||
if (_Disposed)
|
||||
throw new ObjectDisposedException("PortAudioHandle already disposed");
|
||||
|
||||
lock (_Mutex)
|
||||
{
|
||||
PortAudio.Pa_CloseStream(stream);
|
||||
if (_Disposed)
|
||||
throw new ObjectDisposedException("PortAudioHandle already disposed");
|
||||
|
||||
try
|
||||
{
|
||||
PortAudio.Pa_CloseStream(stream);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CLog.LogError(errorText:$"Error closing stream: {ex.Message}", e:ex);
|
||||
}
|
||||
_Streams.Remove(stream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,14 +70,20 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Element != null)
|
||||
|
||||
if (_Element == null || (_Element.CurrentState == State.Paused && _Element.PendingState != State.VoidPending))
|
||||
{
|
||||
long position;
|
||||
if (!_Element.QueryPosition(Format.Time, out position))
|
||||
CLog.LogError("Could not query position");
|
||||
else
|
||||
_Position = ((float)position / Constants.SECOND);
|
||||
return _Position;
|
||||
}
|
||||
|
||||
|
||||
long position;
|
||||
if (!_Element.QueryPosition(Format.Time, out position))
|
||||
CLog.LogError("Could not query position");
|
||||
else
|
||||
_Position = ((float)position / Constants.SECOND);
|
||||
|
||||
|
||||
return _Position;
|
||||
}
|
||||
set
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Vocaluxe.Base;
|
||||
@@ -142,9 +144,13 @@ namespace Vocaluxe.Lib.Sound.Record.PortAudio
|
||||
|
||||
foreach (IntPtr handle in _RecHandle)
|
||||
{
|
||||
PortAudioSharp.PortAudio.Pa_StopStream(handle);
|
||||
PortAudioSharp.PortAudio.Pa_CloseStream(handle);
|
||||
if (handle != IntPtr.Zero)
|
||||
{
|
||||
PortAudioSharp.PortAudio.Pa_StopStream(handle);
|
||||
PortAudioSharp.PortAudio.Pa_CloseStream(handle);
|
||||
}
|
||||
}
|
||||
_RecHandle = new IntPtr[_Devices.Count];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -153,13 +159,17 @@ namespace Vocaluxe.Lib.Sound.Record.PortAudio
|
||||
/// </summary>
|
||||
public override void Close()
|
||||
{
|
||||
if (_RecHandle != null)
|
||||
if (_RecHandle != null && _RecHandle.Length > 0)
|
||||
{
|
||||
foreach (IntPtr handle in _RecHandle)
|
||||
{
|
||||
if (handle != IntPtr.Zero)
|
||||
{
|
||||
_PaHandle.CloseStream(handle);
|
||||
}
|
||||
}
|
||||
|
||||
_RecHandle = new IntPtr[_Devices.Count];
|
||||
}
|
||||
if (_PaHandle != null)
|
||||
{
|
||||
|
||||
@@ -429,7 +429,18 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
||||
private bool _CopyDecodedFrameToBuffer()
|
||||
{
|
||||
bool result;
|
||||
var decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder));
|
||||
SACDecoder decoder;
|
||||
|
||||
try
|
||||
{
|
||||
decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Couldn't copy the frame to the managed environment.", false, false, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (decoder.Buffer != IntPtr.Zero)
|
||||
{
|
||||
_LastDecodedTime = (float)decoder.Timecode;
|
||||
|
||||
+98
-1
@@ -285,23 +285,120 @@ namespace Vocaluxe
|
||||
try
|
||||
{
|
||||
CController.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CController)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CVocaluxeServer.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CVocaluxeServer)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CGraphics.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CGraphics)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CThemes.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CThemes)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CCover.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CCover)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CFonts.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CFonts)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CBackgroundMusic.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CBackgroundMusic)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CWebcam.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CWebcam)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CDataBase.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CDataBase)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CVideo.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CVideo)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CRecord.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CRecord)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CSound.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown! (CSound)", false, false, e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CDraw.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CLog.LogError("Error during shutdown!", false, false, e);
|
||||
CLog.LogError("Error during shutdown! (CDraw)", false, false, e);
|
||||
}
|
||||
|
||||
GC.Collect(); // Do a GC run here before we close logs to have finalizers run
|
||||
try
|
||||
{
|
||||
|
||||
@@ -139,6 +139,9 @@ namespace Vocaluxe.Screens
|
||||
_SetVisibility();
|
||||
_UpdateRatings();
|
||||
_SlideShowBG.Visible = _UpdateBackground();
|
||||
|
||||
for (int p = 0; p < CGame.NumPlayers; p++)
|
||||
_Statics[_StaticAvatar[p, CGame.NumPlayers - 1]].Aspect = EAspect.Crop;
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
|
||||
@@ -201,8 +201,6 @@ namespace Vocaluxe.Screens
|
||||
CConfig.Config.Theme.PlayerInfo = (EPlayerInfo)mode;
|
||||
CConfig.SaveConfig();
|
||||
_SetVisibility();
|
||||
if (CGame.GetSong() != null)
|
||||
_SetDuetLyricsVisibility(CGame.GetSong().IsDuet); //make sure duet lyrics remain visible
|
||||
break;
|
||||
|
||||
case Keys.S:
|
||||
@@ -596,7 +594,6 @@ namespace Vocaluxe.Screens
|
||||
_DynamicLyricsTop = true;
|
||||
}
|
||||
|
||||
_SetDuetLyricsVisibility(song.IsDuet);
|
||||
_SetNormalLyricsVisibility();
|
||||
|
||||
_TimerSongText.Reset();
|
||||
@@ -609,37 +606,36 @@ namespace Vocaluxe.Screens
|
||||
_StartSong();
|
||||
}
|
||||
|
||||
private void _SetDuetLyricsVisibility(bool isDuet)
|
||||
{
|
||||
_Statics[_StaticLyricsDuet].Visible = isDuet;
|
||||
_Lyrics[_LyricMainDuet].Visible = isDuet;
|
||||
_Lyrics[_LyricSubDuet].Visible = isDuet;
|
||||
|
||||
if (isDuet)
|
||||
{
|
||||
_Lyrics[_LyricMainTop].Visible = false;
|
||||
_Lyrics[_LyricSubTop].Visible = false;
|
||||
_Statics[_StaticLyricsTop].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool lyricsOnTop = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
|
||||
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|
||||
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsTop);
|
||||
_Lyrics[_LyricMainTop].Visible = lyricsOnTop;
|
||||
_Lyrics[_LyricSubTop].Visible = lyricsOnTop;
|
||||
_Statics[_StaticLyricsTop].Visible = lyricsOnTop;
|
||||
}
|
||||
}
|
||||
|
||||
private void _SetNormalLyricsVisibility()
|
||||
{
|
||||
bool visible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM
|
||||
bool bottomLyricsVisible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM
|
||||
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|
||||
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsBottom);
|
||||
_Lyrics[_LyricMain].Visible = visible;
|
||||
_Lyrics[_LyricSub].Visible = visible;
|
||||
_Statics[_StaticLyrics].Visible = visible;
|
||||
|
||||
bool topLyricsVisible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
|
||||
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|
||||
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsTop);
|
||||
|
||||
bool duetLyricsVisible = false;
|
||||
|
||||
if (CGame.GetSong() != null && CGame.GetSong().IsDuet)
|
||||
{
|
||||
bottomLyricsVisible = true;
|
||||
topLyricsVisible = false;
|
||||
duetLyricsVisible = true;
|
||||
}
|
||||
|
||||
_Lyrics[_LyricMain].Visible = bottomLyricsVisible;
|
||||
_Lyrics[_LyricSub].Visible = bottomLyricsVisible;
|
||||
_Statics[_StaticLyrics].Visible = bottomLyricsVisible;
|
||||
|
||||
_Lyrics[_LyricMainTop].Visible = topLyricsVisible;
|
||||
_Lyrics[_LyricSubTop].Visible = topLyricsVisible;
|
||||
_Statics[_StaticLyricsTop].Visible = topLyricsVisible;
|
||||
|
||||
_Lyrics[_LyricMainDuet].Visible = duetLyricsVisible;
|
||||
_Lyrics[_LyricSubDuet].Visible = duetLyricsVisible;
|
||||
_Statics[_StaticLyricsDuet].Visible = duetLyricsVisible;
|
||||
}
|
||||
|
||||
private void _StartSong()
|
||||
@@ -655,7 +651,10 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
//Need this to set other songs to points-var
|
||||
while (!CGame.IsFinished())
|
||||
{
|
||||
CGame.NextRound();
|
||||
CGame.ResetPlayer();
|
||||
}
|
||||
|
||||
_FinishedSinging();
|
||||
}
|
||||
@@ -1115,7 +1114,7 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
|
||||
// sub
|
||||
if (currentLineSub < lines.Length - 2)
|
||||
if ((currentLineSub + 1) < lines.Length)
|
||||
{
|
||||
float diff = CGame.GetTimeFromBeats(lines[currentLineSub + 1].FirstNoteBeat, song.BPM) - currentTime;
|
||||
|
||||
@@ -1372,4 +1371,4 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1067,7 +1067,7 @@ namespace Vocaluxe.Screens
|
||||
case ESongSorting.TR_CONFIG_FOLDER:
|
||||
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
|
||||
start = curSelected + 1;
|
||||
visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||
visibleID = _FindIndex(songs, start, element => element.FolderName.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||
break;
|
||||
}
|
||||
if (visibleID > -1)
|
||||
@@ -1380,4 +1380,4 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
#endregion Playlist Actions
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,8 @@
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<NuGetPackageImportStamp>3d91144f</NuGetPackageImportStamp>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -542,12 +543,11 @@
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets" Condition="Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" />
|
||||
@@ -556,10 +556,9 @@
|
||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets" Condition="Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets" Condition="Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets" Condition="Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" />
|
||||
</Project>
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="vocaluxe.dependencies" version="1.0.11" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net471" />
|
||||
<package id="vocaluxe.dependencies.acinerella" version="1.0.5" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.aforgevideo" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.csharpsqlite" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.4" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.gstreamer" version="1.0.2" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.gstreamer" version="1.0.3" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.hidapi" version="1.0.4" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.opentk" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.2" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.3" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.qrcoder" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.slimdx" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.sqlite" version="1.0.1" targetFramework="net40" />
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
MaxRect = button.MaxRect;
|
||||
Color = button.Color;
|
||||
SelColor = button.Color;
|
||||
SelColor = button.SelColor;
|
||||
Texture = button.Texture;
|
||||
SelTexture = button.SelTexture;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Draw;
|
||||
@@ -587,12 +588,15 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
_NumPlayerTeams[i] = _NumPlayer;
|
||||
//Get average num players per teams as default player number
|
||||
_NumPlayerTeams[i] = _NumPlayer/(_NumTeams - 1);
|
||||
_NumPlayer += _NumPlayerTeams[i];
|
||||
_TeamList[i] = new List<int>();
|
||||
}
|
||||
}
|
||||
}
|
||||
_UpdateButtonState();
|
||||
_UpdateTeamSlide();
|
||||
}
|
||||
|
||||
public void DecreaseTeamNum()
|
||||
@@ -603,6 +607,7 @@ namespace VocaluxeLib.Menu
|
||||
if (_NumTeams - 1 >= _PartyMode.MinTeams)
|
||||
_NumTeams--;
|
||||
_UpdateButtonState();
|
||||
_UpdateTeamSlide();
|
||||
}
|
||||
|
||||
public void IncreasePlayerNum(int team)
|
||||
@@ -691,16 +696,20 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private void _UpdateTeamSlide()
|
||||
{
|
||||
int sel = _SelectSlides[_SelectSlideTeams].Selection;
|
||||
|
||||
_SelectSlides[_SelectSlideTeams].Visible = _Teams;
|
||||
_SelectSlides[_SelectSlideTeams].Clear();
|
||||
for (int i = 1; i <= _NumTeams; i++)
|
||||
_SelectSlides[_SelectSlideTeams].AddValue("Team " + i, null, i);
|
||||
|
||||
_SelectSlides[_SelectSlideTeams].Selection = Math.Min(sel, _SelectSlides[_SelectSlideTeams].NumValues - 1);
|
||||
}
|
||||
|
||||
private void _UpdateButtonVisibility()
|
||||
{
|
||||
_Buttons[_ButtonIncreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
|
||||
_Buttons[_ButtonDecreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
|
||||
_Buttons[_ButtonIncreaseTeams].Visible = _AllowChangeTeamNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
|
||||
_Buttons[_ButtonDecreaseTeams].Visible = _AllowChangeTeamNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
|
||||
_Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum;
|
||||
_Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum;
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ namespace VocaluxeLib.Menu
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
_StartPlaylistSong(_CurrentPlaylistElement);
|
||||
_StartPlaylistSong(_CurrentPlaylistElement + _Offset);
|
||||
break;
|
||||
|
||||
case Keys.Add: //move the selected song up
|
||||
@@ -880,7 +880,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
//Start selected song with double click
|
||||
if (mouseEvent.LD && _CurrentPlaylistElement != -1)
|
||||
_StartPlaylistSong(_CurrentPlaylistElement);
|
||||
_StartPlaylistSong(_CurrentPlaylistElement + _Offset);
|
||||
|
||||
//Change order with holding LB
|
||||
if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1)
|
||||
@@ -1259,4 +1259,4 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
#endregion ThemeEdit
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -586,6 +586,7 @@ namespace VocaluxeLib.Menu
|
||||
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
|
||||
Img = new CStatic(_PartyModeID)
|
||||
};
|
||||
el.Img.Aspect = EAspect.Crop;
|
||||
_VisibleElements.Add(el);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,7 +541,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
_TextBG.Draw();
|
||||
|
||||
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
CTextureRef vidtex = null;
|
||||
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
|
||||
|
||||
if (vidtex != null)
|
||||
{
|
||||
@@ -683,4 +685,4 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
base.LoadSkin();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
_TextBG.Draw();
|
||||
|
||||
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
CTextureRef vidtex = null;
|
||||
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
|
||||
|
||||
if (vidtex != null)
|
||||
{
|
||||
@@ -638,4 +640,4 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
Init();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace VocaluxeLib.Profile
|
||||
{
|
||||
Avatar = CBase.Profiles.GetAvatarByFilename(value);
|
||||
if (Avatar == null)
|
||||
throw new Exception("Avatar '" + value + "' not found");
|
||||
CBase.Log.LogError("Avatar '" + value + "' not found");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user