From 070777eb68ef590ab53b1a890ab94586a59609ae Mon Sep 17 00:00:00 2001 From: Flamefire Date: Mon, 10 Mar 2014 21:13:28 +0100 Subject: [PATCH] Show the color of a player while selecting channels --- .../Ambient/Screens/ScreenOptionsRecord.xml | 66 +++++++++---------- .../Changelog_ScreenOptionsRecord.txt | 5 +- Vocaluxe/Screens/CScreenOptionsRecord.cs | 18 +++-- 3 files changed, 51 insertions(+), 38 deletions(-) diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml b/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml index b2620651..ba0ce824 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsRecord.xml @@ -1,7 +1,7 @@  - 3 + 4 Video @@ -216,6 +216,35 @@ + + 75 + 347 + + 0,00 + + 27 + + + + StaticColor + + + TextSColor + + Left + + Center + + + + Outline + + TR_SCREENORECORD_MIC_DELAY + + + + + 75 227 @@ -243,8 +272,8 @@ - - + + 75 287 @@ -272,36 +301,7 @@ - - - - 75 - 347 - - 0,00 - - 27 - - - - StaticColor - - - TextSColor - - Left - - Center - - - - Outline - - TR_SCREENORECORD_MIC_DELAY - - - - + 640 diff --git a/Output/Themes/Changelog/Changelog_ScreenOptionsRecord.txt b/Output/Themes/Changelog/Changelog_ScreenOptionsRecord.txt index 89d9465c..1eb9f362 100644 --- a/Output/Themes/Changelog/Changelog_ScreenOptionsRecord.txt +++ b/Output/Themes/Changelog/Changelog_ScreenOptionsRecord.txt @@ -6,4 +6,7 @@ Version 2: Add: and . This is a new theme-element. Check ScreenOptionsRecord.xml for style-possibilities. -++++++++++ \ No newline at end of file +++++++++++ +Version 4: +Rename Text 3/4 to TextChannel1/2 +Rename Text5 to Text3 \ No newline at end of file diff --git a/Vocaluxe/Screens/CScreenOptionsRecord.cs b/Vocaluxe/Screens/CScreenOptionsRecord.cs index 3d8bdbf8..6adc9bd5 100644 --- a/Vocaluxe/Screens/CScreenOptionsRecord.cs +++ b/Vocaluxe/Screens/CScreenOptionsRecord.cs @@ -37,7 +37,7 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! protected override int _ScreenVersion { - get { return 3; } + get { return 4; } } private const float _MaxDelayTime = 1f; @@ -53,6 +53,9 @@ namespace Vocaluxe.Screens private const string _ButtonExit = "ButtonExit"; private const string _ButtonDelayTest = "ButtonDelayTest"; + private const string _TextChannel1 = "TextChannel1"; + private const string _TextChannel2 = "TextChannel2"; + private const string _TextDelayChannel1 = "TextDelayChannel1"; private const string _TextDelayChannel2 = "TextDelayChannel2"; @@ -77,7 +80,7 @@ namespace Vocaluxe.Screens values.AddRange(_StaticEnergyChannel); _ThemeStatics = values.ToArray(); - _ThemeTexts = new string[] {_TextWarning, _TextDelayChannel1, _TextDelayChannel2}; + _ThemeTexts = new string[] {_TextWarning, _TextChannel1, _TextChannel2, _TextDelayChannel1, _TextDelayChannel2}; _ThemeButtons = new string[] {_ButtonExit, _ButtonDelayTest}; _ThemeSelectSlides = new string[] {_SelectSlideRecordDevices, _SelectSlideRecordChannel1, _SelectSlideRecordChannel2, _SelectSlideDelay}; _ThemeEqualizers = new string[] {_EqualizerChannel1, _EqualizerChannel2}; @@ -248,8 +251,7 @@ namespace Vocaluxe.Screens _DelayTest[i].Timer.Stop(); _DelayTestRunning = false; } - else if (CSound.RecordGetMaxVolume(player - 1) > 0.1f && - (CSound.RecordGetToneAbs(player - 1) == 9 || CSound.RecordGetToneAbs(player - 1) == 21 || CSound.RecordGetToneAbs(player - 1) == 33)) + else if (CSound.RecordGetMaxVolume(player - 1) > 0.1f && CSound.RecordGetToneAbs(player - 1) % 12 == 9) { _DelayTest[i].Delay = _DelayTest[i].Timer.ElapsedMilliseconds; _DelayTest[i].Timer.Stop(); @@ -444,6 +446,12 @@ namespace Vocaluxe.Screens CSound.RecordStart(); } + private void _SetPlayerColors() + { + _Texts[_TextChannel1].Color = CTheme.GetPlayerColor(_SelectSlides[_SelectSlideRecordChannel1].Selection); + _Texts[_TextChannel2].Color = CTheme.GetPlayerColor(_SelectSlides[_SelectSlideRecordChannel2].Selection); + } + private void _SetMicConfig() { if (_DeviceNr < 0) @@ -451,6 +459,7 @@ namespace Vocaluxe.Screens CRecordDevice device = _Devices[_DeviceNr]; device.PlayerChannel1 = _SelectSlides[_SelectSlideRecordChannel1].Selection; device.PlayerChannel2 = _SelectSlides[_SelectSlideRecordChannel2].Selection; + _SetPlayerColors(); } private void _UpdateChannels() @@ -459,6 +468,7 @@ namespace Vocaluxe.Screens _SelectSlides[_SelectSlideRecordChannel2].Selection = _Devices[_DeviceNr].PlayerChannel2; _SaveMicConfig(); + _SetPlayerColors(); } private bool _CheckMicConfig()