diff --git a/Output/PartyModes/TicTacToe/Languages/English.xml b/Output/PartyModes/TicTacToe/Languages/English.xml
index 24397b29..0066f864 100644
--- a/Output/PartyModes/TicTacToe/Languages/English.xml
+++ b/Output/PartyModes/TicTacToe/Languages/English.xml
@@ -19,9 +19,11 @@
Number of fields
Refill jokers every round
Tic-Tac-Toe: Choose Player
+ Selected players for this team:
Team 1
Team 2
Select random
+ Add at least one player to both teams! / Drag player avatars to add them to the selected players list! / Right click avatar of selected players to remove them!
Tic-Tac-Toe
Choose a field.
Next player
diff --git a/Output/PartyModes/TicTacToe/Languages/German.xml b/Output/PartyModes/TicTacToe/Languages/German.xml
index 8839754c..1413dac7 100644
--- a/Output/PartyModes/TicTacToe/Languages/German.xml
+++ b/Output/PartyModes/TicTacToe/Languages/German.xml
@@ -19,9 +19,11 @@
Anzahl der Felder
Joker nach jeder Runde auffüllen
Tic-Tac-Toe: Spielerwahl
+ Ausgewählte Spieler für dieses Team:
Team 1
Team 2
Zufällig auswählen
+ Füge mindestens einen Spieler zu beiden Teams hinzu! / Zum Hinzufügen den Spieleravatar auf die Liste der ausgewählten Spieler ziehen! / Zum Entfernen den Spieleravatar mit rechter Maustaste anklicken!
Tic-Tac-Toe
Wählt ein Feld aus.
Nächster Spieler
diff --git a/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeMain.xml b/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeMain.xml
index 471a2294..983a6b34 100644
--- a/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeMain.xml
+++ b/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeMain.xml
@@ -2,7 +2,7 @@
PartyScreenTicTacToeMain
- 1
+ 2
@@ -44,7 +44,7 @@
200
100
100
- -1
+ -3
@@ -55,7 +55,29 @@
200
100
100
- -1
+ -3
+
+
+
+ PlayerSelBG
+
+
+ 5
+ 195
+ 325
+ 110
+ -2
+
+
+
+ PlayerSelBG
+
+
+ 950
+ 195
+ 325
+ 110
+ -2
@@ -146,7 +168,7 @@
120
- 230
+ 200
0
35
0
@@ -160,7 +182,7 @@
1160
- 230
+ 200
0
40
0
@@ -490,7 +512,48 @@
-
+
+
+
+
+ 120
+ 250
+ 205
+ 37
+ -3
+
+ 16
+ 2
+
+ TR_CONFIG_OFF
+
+ 0.2
+
+
+ 0.4
+
+
+
+
+
+ 955
+ 250
+ 205
+ 37
+ -3
+
+ 16
+ 2
+
+ TR_CONFIG_OFF
+
+ 0.2
+
+
+ 0.4
+
+
+
diff --git a/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeNames.xml b/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeNames.xml
index 4c798de0..a736649e 100644
--- a/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeNames.xml
+++ b/Output/PartyModes/TicTacToe/Themes/Default/Screens/PartyScreenTicTacToeNames.xml
@@ -2,7 +2,7 @@
PartyScreenTicTacToeNames
- 1
+ 2
@@ -41,6 +41,34 @@
Outline
TR_SCREENNAMES_TITLE
+
+ 640
+ 155
+ 0
+ 20
+ 0
+
+
+ Center
+ Center
+
+ Outline
+ TR_SCREENNAMES_SELPLAYERSTITLE
+
+
+ 640
+ 703
+ 0
+ 16
+ 1200
+
+
+ Center
+ Center
+
+ Outline
+ TR_SCREENNAMES_HELPMESSAGE
+
\ No newline at end of file
+
diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs
index a0ec0798..a2722ed4 100644
--- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs
+++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeMain.cs
@@ -38,7 +38,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
// Version number for theme files. Increment it, if you've changed something on the theme files!
protected override int _ScreenVersion
{
- get { return 1; }
+ get { return 2; }
}
private const string _TextPopupReallyExit = "TextPopupReallyExit";
@@ -64,6 +64,11 @@ namespace VocaluxeLib.PartyModes.TicTacToe
private const string _StaticPopupBG = "StaticPopupBG";
private const string _StaticAvatarT1 = "StaticAvatarT1";
private const string _StaticAvatarT2 = "StaticAvatarT2";
+ private const string _StaticTeam1 = "StaticTeam1";
+ private const string _StaticTeam2 = "StaticTeam2";
+
+ private readonly string[] _EqualizerTeam = new string[]
+ {"EqualizerTeam1", "EqualizerTeam2"};
private bool _ExitPopupVisible;
@@ -89,7 +94,11 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_ButtonNextRound, _ButtonBack, _ButtonExit, _ButtonPopupYes, _ButtonPopupNo, _ButtonField, _ButtonJokerRandomT1, _ButtonJokerRandomT2, _ButtonJokerRetryT1,
_ButtonJokerRetryT2
};
- _ThemeStatics = new string[] {_StaticPopupBG, _StaticAvatarT1, _StaticAvatarT2};
+ _ThemeStatics = new string[] {_StaticPopupBG, _StaticAvatarT1, _StaticAvatarT2, _StaticTeam1, _StaticTeam2};
+
+ var texts = new List();
+ texts.AddRange(_EqualizerTeam);
+ _ThemeEqualizers = texts.ToArray();
}
public override void LoadTheme(string xmlPath)
@@ -265,9 +274,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe
return true;
}
+ public override void OnClose()
+ {
+ base.OnClose();
+ CBase.Record.Stop();
+ }
+
public override void OnShow()
{
base.OnShow();
+ CBase.Record.Start();
if (_PartyMode.GameData.CurrentRoundNr == 1)
{
@@ -299,6 +315,10 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_Texts[_TextNextPlayerNameT2].Visible = false;
_Statics[_StaticAvatarT1].Visible = false;
_Statics[_StaticAvatarT2].Visible = false;
+ _Statics[_StaticTeam1].Visible = false;
+ _Statics[_StaticTeam2].Visible = false;
+ _Equalizers[_EqualizerTeam[0]].Visible = false;
+ _Equalizers[_EqualizerTeam[1]].Visible = false;
_Buttons[_ButtonJokerRandomT1].Visible = false;
_Buttons[_ButtonJokerRandomT2].Visible = false;
_Buttons[_ButtonJokerRetryT1].Visible = false;
@@ -331,6 +351,15 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public override bool UpdateGame()
{
+ if (!_Equalizers[_EqualizerTeam[0]].Visible)
+ return true;
+
+ for (int i = 0; i < 2; i++)
+ {
+ CBase.Record.AnalyzeBuffer(i);
+ _Equalizers["EqualizerTeam" + (i+1)].Update(CBase.Record.ToneWeigth(i), CBase.Record.GetMaxVolume(i));
+ }
+
return true;
}
@@ -504,6 +533,10 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_Statics[_StaticAvatarT2].Visible = true;
_Statics[_StaticAvatarT1].Texture = CBase.Profiles.GetAvatar(_PartyMode.GameData.ProfileIDsTeam1[_PartyMode.GameData.Rounds[_PartyMode.GameData.FieldNr].SingerTeam1]);
_Statics[_StaticAvatarT2].Texture = CBase.Profiles.GetAvatar(_PartyMode.GameData.ProfileIDsTeam2[_PartyMode.GameData.Rounds[_PartyMode.GameData.FieldNr].SingerTeam2]);
+ _Statics[_StaticTeam1].Visible = true;
+ _Statics[_StaticTeam2].Visible = true;
+ _Equalizers[_EqualizerTeam[0]].Visible = true;
+ _Equalizers[_EqualizerTeam[1]].Visible = true;
}
private void _UseJoker(int teamNr, int jokerNum)
@@ -641,4 +674,4 @@ namespace VocaluxeLib.PartyModes.TicTacToe
return 0;
}
}
-}
\ No newline at end of file
+}
diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs
index c0e7cc1c..49241507 100644
--- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs
+++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs
@@ -28,7 +28,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
// Version number for theme files. Increment it, if you've changed something on the theme files!
protected override int _ScreenVersion
{
- get { return 1; }
+ get { return 2; }
}
private new CPartyModeTicTacToe _PartyMode;
@@ -84,4 +84,4 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_PartyMode.Next();
}
}
-}
\ No newline at end of file
+}
diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs
index 89824b8b..9ab1d835 100644
--- a/Vocaluxe/Base/CMain.cs
+++ b/Vocaluxe/Base/CMain.cs
@@ -686,6 +686,31 @@ namespace Vocaluxe.Base
{
return CRecord.GetToneAbs(player);
}
+
+ public void AnalyzeBuffer(int player)
+ {
+ CRecord.AnalyzeBuffer(player);
+ }
+
+ public bool Start()
+ {
+ return CRecord.Start();
+ }
+
+ public bool Stop()
+ {
+ return CRecord.Stop();
+ }
+
+ public float GetMaxVolume(int player)
+ {
+ return CRecord.GetMaxVolume(player);
+ }
+
+ public float[] ToneWeigth(int player)
+ {
+ return CRecord.ToneWeigth(player);
+ }
}
class CBsongs : ISongs
diff --git a/VocaluxeLib/IBasic.cs b/VocaluxeLib/IBasic.cs
index ad09e6a2..de8162a8 100644
--- a/VocaluxeLib/IBasic.cs
+++ b/VocaluxeLib/IBasic.cs
@@ -208,6 +208,11 @@ namespace VocaluxeLib
public interface IRecording
{
int GetToneAbs(int player);
+ void AnalyzeBuffer(int player);
+ float GetMaxVolume(int player);
+ float[] ToneWeigth(int player);
+ bool Start();
+ bool Stop();
}
public interface IProfiles