Merge branch 'develop' of github.com:Flamefire/Vocaluxe into develop
Conflicts: Vocaluxe/Base/CPlaylists.cs Vocaluxe/Base/CProfiles.cs Vocaluxe/Base/CSettings.cs
This commit is contained in:
commit
0400a02bc1
89 files changed
+1500
-1354
No files matched your search
@@ -21,7 +21,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.Profile;
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@@ -248,7 +247,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
public override void DataFromScreen(string screenName, Object data)
|
||||
{
|
||||
SDataFromScreen dataFrom = new SDataFromScreen();
|
||||
var dataFrom = new SDataFromScreen();
|
||||
switch (screenName)
|
||||
{
|
||||
case "PartyScreenTicTacToeConfig":
|
||||
@@ -492,7 +491,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
public override void SongSelected(int songID)
|
||||
{
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
var gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
switch (_GameData.GameMode)
|
||||
{
|
||||
@@ -525,7 +524,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_GameData.Rounds = new List<CRound>();
|
||||
for (int i = 0; i < _GameData.NumFields; i++)
|
||||
{
|
||||
CRound r = new CRound();
|
||||
var r = new CRound();
|
||||
_GameData.Rounds.Add(r);
|
||||
}
|
||||
}
|
||||
@@ -540,11 +539,11 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_GameData.PlayerTeam2 = new List<int>();
|
||||
|
||||
//Prepare Player-IDs
|
||||
List<int> ids1 = new List<int>();
|
||||
List<int> ids2 = new List<int>();
|
||||
var ids1 = new List<int>();
|
||||
var ids2 = new List<int>();
|
||||
//Add IDs to team-list
|
||||
while (_GameData.PlayerTeam1.Count < _GameData.NumFields + _GameData.NumJokerRetry[0] &&
|
||||
_GameData.PlayerTeam2.Count < _GameData.NumFields + _GameData.NumJokerRetry[1] )
|
||||
_GameData.PlayerTeam2.Count < _GameData.NumFields + _GameData.NumJokerRetry[1])
|
||||
{
|
||||
if (ids1.Count == 0)
|
||||
{
|
||||
@@ -579,7 +578,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
case 1:
|
||||
{
|
||||
//Prepare Player-IDs
|
||||
List<int> ids = new List<int>();
|
||||
var ids = new List<int>();
|
||||
//Add IDs to team-list
|
||||
while (_GameData.PlayerTeam1.Count < _GameData.NumFields + _GameData.NumJokerRetry[0] && ids.Count == 0)
|
||||
{
|
||||
@@ -602,7 +601,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
case 2:
|
||||
{
|
||||
//Prepare Player-IDs
|
||||
List<int> ids = new List<int>();
|
||||
var ids = new List<int>();
|
||||
//Add IDs to team-list
|
||||
while (_GameData.PlayerTeam2.Count < _GameData.NumFields + _GameData.NumJokerRetry[1] && ids.Count == 0)
|
||||
{
|
||||
@@ -627,7 +626,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
private void _PrepareSongList()
|
||||
{
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
var gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
switch (_GameData.GameMode)
|
||||
{
|
||||
@@ -646,7 +645,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
while (_GameData.Songs.Count < (_GameData.NumFields + _GameData.NumJokerRandom[0] + _GameData.NumJokerRandom[1]))
|
||||
{
|
||||
List<int> songs = new List<int>();
|
||||
var songs = new List<int>();
|
||||
switch (_GameData.SongSource)
|
||||
{
|
||||
case ESongSource.TR_PLAYLIST:
|
||||
@@ -741,11 +740,11 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
players[0].ProfileID = _GameData.ProfileIDsTeam1[r.SingerTeam1];
|
||||
if (isDuet)
|
||||
players[0].LineNr = 0;
|
||||
players[0].VoiceNr = 0;
|
||||
|
||||
players[1].ProfileID = _GameData.ProfileIDsTeam2[r.SingerTeam2];
|
||||
if (isDuet)
|
||||
players[1].LineNr = 1;
|
||||
players[1].VoiceNr = 1;
|
||||
|
||||
SongSelected(r.SongID);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.Songs;
|
||||
using VocaluxeLib.Profile;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
@@ -104,7 +103,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_ThemeStatics = new string[] {_StaticPopupBG, _StaticAvatarT1, _StaticAvatarT2};
|
||||
|
||||
_Data = new SDataFromScreen();
|
||||
SFromScreenMain config = new SFromScreenMain();
|
||||
var config = new SFromScreenMain();
|
||||
_GameData = new SDataToScreenMain();
|
||||
config.SingRoundNr = 1;
|
||||
config.Rounds = new List<CRound>();
|
||||
@@ -130,7 +129,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
try
|
||||
{
|
||||
SDataToScreenMain config = (SDataToScreenMain)receivedData;
|
||||
var config = (SDataToScreenMain)receivedData;
|
||||
_GameData = config;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -389,7 +388,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
CField f = new CField {Button = GetNewButton(_Buttons[_ButtonField])};
|
||||
var f = new CField {Button = GetNewButton(_Buttons[_ButtonField])};
|
||||
f.Button.Visible = false;
|
||||
f.Content = new CRound();
|
||||
_AddButton(f.Button);
|
||||
@@ -399,7 +398,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
private void _UpdateFields()
|
||||
{
|
||||
int numOneRow = (int)Math.Sqrt(_GameData.NumFields);
|
||||
var numOneRow = (int)Math.Sqrt(_GameData.NumFields);
|
||||
float fieldSizeY = ((float)CBase.Settings.GetRenderH() - 150 - numOneRow * _FieldSpace) / numOneRow;
|
||||
float fieldSizeX = ((float)CBase.Settings.GetRenderW() - 300 - numOneRow * _FieldSpace) / numOneRow;
|
||||
_FieldSize = Math.Min(fieldSizeX, fieldSizeY);
|
||||
@@ -495,7 +494,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_GameData.Rounds[_SelectedField].SingerTeam2 = singerTeam2;
|
||||
|
||||
_UpdatePlayerInformation();
|
||||
|
||||
}
|
||||
int songID = 0;
|
||||
if (_GameData.Songs.Count > 0)
|
||||
@@ -672,7 +670,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
private int _BuildWinnerPossibilities()
|
||||
{
|
||||
int numOneRow = (int)Math.Sqrt(_GameData.NumFields);
|
||||
var numOneRow = (int)Math.Sqrt(_GameData.NumFields);
|
||||
_Possibilities = new int[(numOneRow * 2) + 2,numOneRow];
|
||||
for (int i = 0; i < _Possibilities.GetLength(0); i++)
|
||||
{
|
||||
@@ -704,7 +702,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
for (int i = 0; i < _Possibilities.GetLength(0); i++)
|
||||
{
|
||||
List<int> check = new List<int>();
|
||||
var check = new List<int>();
|
||||
for (int j = 0; j < _Possibilities.GetLength(1); j++)
|
||||
{
|
||||
if (_Fields[_Possibilities[i, j]].Content.Winner > 0)
|
||||
|
||||
@@ -22,6 +22,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.Profile;
|
||||
|
||||
namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
@@ -93,7 +94,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose, _ButtonPlayerChooseScrollUp, _ButtonPlayerChooseScrollDown};
|
||||
|
||||
_Data = new SDataFromScreen();
|
||||
SFromScreenNames names = new SFromScreenNames {FadeToConfig = false, ProfileIDsTeam1 = new List<int>(), ProfileIDsTeam2 = new List<int>()};
|
||||
var names = new SFromScreenNames {FadeToConfig = false, ProfileIDsTeam1 = new List<int>(), ProfileIDsTeam2 = new List<int>()};
|
||||
_Data.ScreenNames = names;
|
||||
}
|
||||
|
||||
@@ -101,7 +102,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
try
|
||||
{
|
||||
SDataToScreenNames config = (SDataToScreenNames)receivedData;
|
||||
var config = (SDataToScreenNames)receivedData;
|
||||
_Data.ScreenNames.ProfileIDsTeam1 = config.ProfileIDsTeam1;
|
||||
_Data.ScreenNames.ProfileIDsTeam2 = config.ProfileIDsTeam2;
|
||||
if (_Data.ScreenNames.ProfileIDsTeam1 == null)
|
||||
@@ -375,7 +376,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
CButton b = GetNewButton(_Buttons[_ButtonPlayerChoose]);
|
||||
b.Rect.X = _PlayerChooseButtonsFirstX + column * (b.Rect.W + _PlayerChooseButtonsSpaceH);
|
||||
b.Rect.Y = _PlayerChooseButtonsFirstY + row * (b.Rect.H + _PlayerChooseButtonsSpaceW);
|
||||
CPlayerChooseButton pcb = new CPlayerChooseButton {Button = b, ProfileID = -1};
|
||||
var pcb = new CPlayerChooseButton {Button = b, ProfileID = -1};
|
||||
_PlayerChooseButtons.Add(pcb);
|
||||
column++;
|
||||
if (column >= _PlayerChooseButtonsNumH)
|
||||
@@ -418,7 +419,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_PlayerChooseButtons[i].ProfileID = id;
|
||||
_PlayerChooseButtons[i].Button.Text.Text = CBase.Profiles.GetPlayerName(id);
|
||||
_PlayerChooseButtons[i].Button.Texture = CBase.Profiles.GetAvatar(id);
|
||||
_PlayerChooseButtons[i].Button.SelTexture = CBase.Profiles.GetAvatar(id);
|
||||
_PlayerChooseButtons[i].Button.SelTexture = CBase.Profiles.GetAvatar(id);
|
||||
_PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f);
|
||||
_PlayerChooseButtons[i].Button.SelColor = new SColorF(1, 1, 1, 1);
|
||||
_PlayerChooseButtons[i].Button.Enabled = true;
|
||||
@@ -440,15 +441,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
private void _UpdateVisibleProfiles()
|
||||
{
|
||||
_PlayerChooseButtonsVisibleProfiles.Clear();
|
||||
Profile.CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < profiles.Length; i++)
|
||||
CProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
foreach (CProfile profile in profiles)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (profiles[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
visible = _Data.ScreenNames.ProfileIDsTeam1.All(profileID => profileID != profiles[i].ID) && _Data.ScreenNames.ProfileIDsTeam2.All(profileID => profileID != profiles[i].ID);
|
||||
if (profile.Active == EOffOn.TR_CONFIG_ON)
|
||||
visible = _Data.ScreenNames.ProfileIDsTeam1.All(profileID => profileID != profile.ID) &&
|
||||
_Data.ScreenNames.ProfileIDsTeam2.All(profileID => profileID != profile.ID);
|
||||
if (visible)
|
||||
_PlayerChooseButtonsVisibleProfiles.Add(profiles[i].ID);
|
||||
_PlayerChooseButtonsVisibleProfiles.Add(profile.ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +488,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
if (_Data.ScreenNames.ProfileIDsTeam1[i] != -1)
|
||||
{
|
||||
int id = _Data.ScreenNames.ProfileIDsTeam1[i];
|
||||
int id = _Data.ScreenNames.ProfileIDsTeam1[i];
|
||||
_PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
_PlayerDestinationButtons[i].SelColor = new SColorF(1, 1, 1, 1);
|
||||
_PlayerDestinationButtons[i].Texture = CBase.Profiles.GetAvatar(id);
|
||||
@@ -511,7 +513,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
if (_Data.ScreenNames.ProfileIDsTeam2[i] != -1)
|
||||
{
|
||||
int id = _Data.ScreenNames.ProfileIDsTeam2[i];
|
||||
int id = _Data.ScreenNames.ProfileIDsTeam2[i];
|
||||
_PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
_PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].SelColor = new SColorF(1, 1, 1, 1);
|
||||
_PlayerDestinationButtons[i].Texture = CBase.Profiles.GetAvatar(id);
|
||||
|
||||
Reference in new issue
Block a user