Autoformatting

This commit is contained in:
Jiiniasu committed 2016-12-18 18:06:25 +01:00
1 parent ae656ba727
commit e888197cdc
10 files changed
+206 -136

No files matched your search

+140 -77
View File
@@ -45,7 +45,7 @@ namespace Vocaluxe.Base
#pragma warning disable 649 #pragma warning disable 649
// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBePrivate.Global
public struct SConfigInfo public struct SConfigInfo
// ReSharper restore MemberCanBePrivate.Global // ReSharper restore MemberCanBePrivate.Global
{ {
// ReSharper disable NotAccessedField.Global // ReSharper disable NotAccessedField.Global
// ReSharper disable NotAccessedField.Local // ReSharper disable NotAccessedField.Local
@@ -63,110 +63,173 @@ namespace Vocaluxe.Base
public struct SConfigDebug public struct SConfigDebug
{ {
[DefaultValue(EDebugLevel.TR_CONFIG_OFF)] public EDebugLevel DebugLevel; [DefaultValue(EDebugLevel.TR_CONFIG_OFF)]
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn SaveModifiedSongs; public EDebugLevel DebugLevel;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn SaveModifiedSongs;
} }
public struct SConfigGraphics public struct SConfigGraphics
{ {
#if WIN #if WIN
[DefaultValue(ERenderer.TR_CONFIG_DIRECT3D)] public ERenderer Renderer; [DefaultValue(ERenderer.TR_CONFIG_DIRECT3D)]
public ERenderer Renderer;
#else #else
[DefaultValue(ERenderer.TR_CONFIG_OPENGL)] public ERenderer Renderer; [DefaultValue(ERenderer.TR_CONFIG_OPENGL)] public ERenderer Renderer;
#endif #endif
[DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)] public ETextureQuality TextureQuality; [DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)]
[XmlRanged(32, 1024), DefaultValue(256)] public int CoverSize; public ETextureQuality TextureQuality;
[XmlRanged(32, 1024), DefaultValue(256)]
public int CoverSize;
[DefaultValue(1024)] public int ScreenW; [DefaultValue(1024)]
[DefaultValue(576)] public int ScreenH; public int ScreenW;
[DefaultValue(EGeneralAlignment.Middle)] public EGeneralAlignment ScreenAlignment; [DefaultValue(576)]
[DefaultValue(0)] public int BorderLeft; public int ScreenH;
[DefaultValue(0)] public int BorderRight; [DefaultValue(EGeneralAlignment.Middle)]
[DefaultValue(0)] public int BorderTop; public EGeneralAlignment ScreenAlignment;
[DefaultValue(0)] public int BorderBottom; [DefaultValue(0)]
[DefaultValue(EAntiAliasingModes.X0)] public EAntiAliasingModes AAMode; public int BorderLeft;
[DefaultValue(60f)] public float MaxFPS; [DefaultValue(0)]
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VSync; public int BorderRight;
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn FullScreen; [DefaultValue(0)]
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Stretch; public int BorderTop;
[DefaultValue(0.4f), XmlRanged(0, 3)] public float FadeTime; [DefaultValue(0)]
public int BorderBottom;
[DefaultValue(EAntiAliasingModes.X0)]
public EAntiAliasingModes AAMode;
[DefaultValue(60f)]
public float MaxFPS;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn VSync;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn FullScreen;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn Stretch;
[DefaultValue(0.4f), XmlRanged(0, 3)]
public float FadeTime;
} }
public struct SConfigTheme public struct SConfigTheme
{ {
[XmlElement("Name"), DefaultValue("Ambient")] public string Theme; [XmlElement("Name"), DefaultValue("Ambient")]
[DefaultValue("Blue")] public string Skin; public string Theme;
[XmlElement("Cover"), DefaultValue("Ambient Blue")] public string CoverTheme; [DefaultValue("Blue")]
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn DrawNoteLines; public string Skin;
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn DrawToneHelper; [XmlElement("Cover"), DefaultValue("Ambient Blue")]
[DefaultValue(ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED)] public ETimerLook TimerLook; public string CoverTheme;
[DefaultValue(EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH)] public EPlayerInfo PlayerInfo; [DefaultValue(EOffOn.TR_CONFIG_ON)]
[DefaultValue(EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF)] public EFadePlayerInfo FadePlayerInfo; public EOffOn DrawNoteLines;
[DefaultValue(ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC)] public ECoverLoading CoverLoading; [DefaultValue(EOffOn.TR_CONFIG_ON)]
[DefaultValue(ELyricStyle.TR_CONFIG_LYRICSTYLE_SLIDE)] public ELyricStyle LyricStyle; public EOffOn DrawToneHelper;
[DefaultValue(ETimerLook.TR_CONFIG_TIMERLOOK_EXPANDED)]
public ETimerLook TimerLook;
[DefaultValue(EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH)]
public EPlayerInfo PlayerInfo;
[DefaultValue(EFadePlayerInfo.TR_CONFIG_FADEPLAYERINFO_OFF)]
public EFadePlayerInfo FadePlayerInfo;
[DefaultValue(ECoverLoading.TR_CONFIG_COVERLOADING_DYNAMIC)]
public ECoverLoading CoverLoading;
[DefaultValue(ELyricStyle.TR_CONFIG_LYRICSTYLE_SLIDE)]
public ELyricStyle LyricStyle;
} }
public struct SConfigSound public struct SConfigSound
{ {
[DefaultValue(EPlaybackLib.GstreamerSharp)] public EPlaybackLib PlayBackLib; [DefaultValue(EPlaybackLib.GstreamerSharp)]
[DefaultValue(ERecordLib.PortAudio)] public ERecordLib RecordLib; public EPlaybackLib PlayBackLib;
[DefaultValue(EBufferSize.B2048)] public EBufferSize AudioBufferSize; [DefaultValue(ERecordLib.PortAudio)]
[XmlRanged(-500, 500)] public int AudioLatency; public ERecordLib RecordLib;
[DefaultValue(EBufferSize.B2048)]
public EBufferSize AudioBufferSize;
[XmlRanged(-500, 500)]
public int AudioLatency;
// ReSharper disable MemberHidesStaticFromOuterClass // ReSharper disable MemberHidesStaticFromOuterClass
[DefaultValue(EBackgroundMusicOffOn.TR_CONFIG_ON)] public EBackgroundMusicOffOn BackgroundMusic; [DefaultValue(EBackgroundMusicOffOn.TR_CONFIG_ON)]
[XmlRanged(0, 100), DefaultValue(30)] public int BackgroundMusicVolume; public EBackgroundMusicOffOn BackgroundMusic;
[DefaultValue(EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)] public EBackgroundMusicSource BackgroundMusicSource; [XmlRanged(0, 100), DefaultValue(30)]
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn BackgroundMusicUseStart; public int BackgroundMusicVolume;
[XmlRanged(0, 100), DefaultValue(50)] public int PreviewMusicVolume; [DefaultValue(EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)]
[XmlRanged(0, 100), DefaultValue(80)] public int GameMusicVolume; public EBackgroundMusicSource BackgroundMusicSource;
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn KaraokeEffect; [DefaultValue(EOffOn.TR_CONFIG_ON)]
[XmlRanged(0, 1), DefaultValue(1.0f)] public float KaraokeEffectLevel; public EOffOn BackgroundMusicUseStart;
[XmlRanged(0, 100), DefaultValue(50)]
public int PreviewMusicVolume;
[XmlRanged(0, 100), DefaultValue(80)]
public int GameMusicVolume;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn KaraokeEffect;
[XmlRanged(0, 1), DefaultValue(1.0f)]
public float KaraokeEffectLevel;
// ReSharper restore MemberHidesStaticFromOuterClass // ReSharper restore MemberHidesStaticFromOuterClass
} }
public struct SConfigGame public struct SConfigGame
{ {
[DefaultValue(CSettings.FallbackLanguage)] public string Language; [DefaultValue(CSettings.FallbackLanguage)]
public string Language;
public string[] SongFolder; public string[] SongFolder;
// ReSharper disable MemberHidesStaticFromOuterClass // ReSharper disable MemberHidesStaticFromOuterClass
[DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)] public ESongMenu SongMenu; [DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)]
public ESongMenu SongMenu;
// ReSharper restore MemberHidesStaticFromOuterClass // ReSharper restore MemberHidesStaticFromOuterClass
[DefaultValue(ESongSorting.TR_CONFIG_ARTIST)] public ESongSorting SongSorting; [DefaultValue(ESongSorting.TR_CONFIG_ARTIST)]
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn IgnoreArticles; public ESongSorting SongSorting;
[DefaultValue(10)] public float ScoreAnimationTime; [DefaultValue(EOffOn.TR_CONFIG_ON)]
[DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] public ETimerMode TimerMode; public EOffOn IgnoreArticles;
[XmlAltName("NumPlayer"), DefaultValue(2)] public int NumPlayers; [DefaultValue(10)]
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn Tabs; public float ScoreAnimationTime;
[DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)] public ELyricsPosition LyricsPosition; [DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)]
[DefaultValue(0.1f)] public float MinLineBreakTime; //Minimum time to show the text before it is (to be) sung (if possible) public ETimerMode TimerMode;
[XmlArrayItem("Player"), XmlArray] public string[] Players; [XmlAltName("NumPlayer"), DefaultValue(2)]
[DefaultValue(EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)] public EHighscoreStyle HighscoreStyle; public int NumPlayers;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn Tabs;
[DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)]
public ELyricsPosition LyricsPosition;
[DefaultValue(0.1f)]
public float MinLineBreakTime; //Minimum time to show the text before it is (to be) sung (if possible)
[XmlArrayItem("Player"), XmlArray]
public string[] Players;
[DefaultValue(EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)]
public EHighscoreStyle HighscoreStyle;
} }
public struct SConfigVideo public struct SConfigVideo
{ {
[DefaultValue(EVideoDecoder.FFmpeg)] public EVideoDecoder VideoDecoder; [DefaultValue(EVideoDecoder.FFmpeg)]
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideoBackgrounds; public EVideoDecoder VideoDecoder;
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideoPreview; [DefaultValue(EOffOn.TR_CONFIG_ON)]
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideosInSongs; public EOffOn VideoBackgrounds;
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn VideosToBackground; [DefaultValue(EOffOn.TR_CONFIG_ON)]
[DefaultValue(EWebcamLib.AForgeNet)] public EWebcamLib WebcamLib; public EOffOn VideoPreview;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn VideosInSongs;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn VideosToBackground;
[DefaultValue(EWebcamLib.AForgeNet)]
public EWebcamLib WebcamLib;
public SWebcamConfig? WebcamConfig; public SWebcamConfig? WebcamConfig;
} }
public struct SConfigRecord public struct SConfigRecord
{ {
public SMicConfig[] MicConfig; public SMicConfig[] MicConfig;
[DefaultValue(200)] public int MicDelay; //[ms] [DefaultValue(200)]
public int MicDelay; //[ms]
} }
public struct SConfigServer public struct SConfigServer
{ {
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn ServerActive; [DefaultValue(EOffOn.TR_CONFIG_OFF)]
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn ServerEncryption; public EOffOn ServerActive;
[DefaultValue(3000)] public int ServerPort; [DefaultValue(EOffOn.TR_CONFIG_OFF)]
[DefaultValue(70)] public int SongCountCoverThreshold; public EOffOn ServerEncryption;
[DefaultValue(3000)]
public int ServerPort;
[DefaultValue(70)]
public int SongCountCoverThreshold;
} }
#pragma warning restore 649 #pragma warning restore 649
// ReSharper restore UnassignedField.Global // ReSharper restore UnassignedField.Global
@@ -369,16 +432,16 @@ namespace Vocaluxe.Base
Config.Server.ServerPort = 3000; Config.Server.ServerPort = 3000;
Config.Info = new SConfigInfo Config.Info = new SConfigInfo
{ {
Version = CSettings.GetFullVersionText(), Version = CSettings.GetFullVersionText(),
Time = DateTime.Now.ToString(), Time = DateTime.Now.ToString(),
Platform = Environment.OSVersion.Platform.ToString(), Platform = Environment.OSVersion.Platform.ToString(),
OSVersion = Environment.OSVersion.ToString(), OSVersion = Environment.OSVersion.ToString(),
ProcessorCount = Environment.ProcessorCount, ProcessorCount = Environment.ProcessorCount,
Screens = Screen.AllScreens.Length, Screens = Screen.AllScreens.Length,
PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(), PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(),
Directory = CSettings.ProgramFolder Directory = CSettings.ProgramFolder
}; };
} }
private static readonly List<string> _CommentsGot = new List<string>(); private static readonly List<string> _CommentsGot = new List<string>();
@@ -542,7 +605,7 @@ namespace Vocaluxe.Base
return devices.Any(t => t.PlayerChannel.Contains(player)); return devices.Any(t => t.PlayerChannel.Contains(player));
for (int p = 0; p < CSettings.MaxNumPlayer; ++p) for (int p = 0; p < CSettings.MaxNumPlayer; ++p)
if (devices.Any(t => t.PlayerChannel.Contains(p+1))) if (devices.Any(t => t.PlayerChannel.Contains(p + 1)))
{ {
return true; return true;
} }
@@ -647,7 +710,7 @@ namespace Vocaluxe.Base
switch (parts.Length) switch (parts.Length)
{ {
//Only found a parameter //Only found a parameter
case 1: case 1:
if (parts[0] != "") if (parts[0] != "")
{ {
@@ -660,7 +723,7 @@ namespace Vocaluxe.Base
break; break;
//Found parameter and value //Found parameter and value
case 2: case 2:
if (parts[0] != "") if (parts[0] != "")
{ {
+3 -3
View File
@@ -54,11 +54,11 @@ namespace Vocaluxe.Base
public static EProgramState ProgramState = EProgramState.Start; public static EProgramState ProgramState = EProgramState.Start;
//Adjusting of programName and version now in the assembly config. //Adjusting of programName and version now in the assembly config.
private static readonly Dictionary<string,string> _CodeNames = new Dictionary<string, string>() private static readonly Dictionary<string, string> _CodeNames = new Dictionary<string, string>()
{ {
{"0.3.", "Shining Heaven"}, {"0.3.", "Shining Heaven"},
{"0.4.", "Blue Sunrise"} {"0.4.", "Blue Sunrise"}
}; };
private static string _ProgramCodeName private static string _ProgramCodeName
{ {
@@ -233,7 +233,7 @@ namespace Vocaluxe.Base
public static string GetFullVersionText() public static string GetFullVersionText()
{ {
string version = ProgramName; string version = ProgramName;
if (_ProgramCodeName != "") if (_ProgramCodeName != "")
version += " \"" + _ProgramCodeName + "\""; version += " \"" + _ProgramCodeName + "\"";
+5 -5
View File
@@ -31,14 +31,14 @@ namespace Vocaluxe.Base
// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBePrivate.Global
public static void Reset() public static void Reset()
// ReSharper restore MemberCanBePrivate.Global // ReSharper restore MemberCanBePrivate.Global
{ {
_Stopwatch.Reset(); _Stopwatch.Reset();
} }
// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBePrivate.Global
public static void Start() public static void Start()
// ReSharper restore MemberCanBePrivate.Global // ReSharper restore MemberCanBePrivate.Global
{ {
_Stopwatch.Start(); _Stopwatch.Start();
} }
@@ -127,7 +127,7 @@ namespace Vocaluxe.Base
{ {
_KeysPool.Add(pool); _KeysPool.Add(pool);
} }
catch (Exception) {} catch (Exception) { }
} }
_Timer.Reset(); _Timer.Reset();
@@ -173,7 +173,7 @@ namespace Vocaluxe.Base
// ReSharper disable UnusedParameter.Global // ReSharper disable UnusedParameter.Global
public void KeyUp(KeyEventArgs e) public void KeyUp(KeyEventArgs e)
// ReSharper restore UnusedParameter.Global // ReSharper restore UnusedParameter.Global
{ {
_CheckModifiers(); _CheckModifiers();
_KeyPressed = false; _KeyPressed = false;
@@ -290,7 +290,7 @@ namespace Vocaluxe.Base
// ReSharper disable UnusedParameter.Global // ReSharper disable UnusedParameter.Global
public void MouseUp(MouseEventArgs e) public void MouseUp(MouseEventArgs e)
// ReSharper restore UnusedParameter.Global // ReSharper restore UnusedParameter.Global
{ {
//CheckModifiers(); //CheckModifiers();
//Add(_ModALT, _ModSHIFT, _ModCTRL, e.X, e.Y, e.Button == MouseButtons.Left, e.Button == MouseButtons.Right, e.Delta); //Add(_ModALT, _ModSHIFT, _ModCTRL, e.X, e.Y, e.Button == MouseButtons.Left, e.Button == MouseButtons.Right, e.Delta);
+10 -10
View File
@@ -86,7 +86,7 @@ namespace Vocaluxe.Lib.Draw
/// </summary> /// </summary>
public CDirect3D() public CDirect3D()
{ {
_Form = new CRenderFormHook {ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH)}; _Form = new CRenderFormHook { ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH) };
try try
{ {
@@ -110,15 +110,15 @@ namespace Vocaluxe.Lib.Draw
_Form.MouseEnter += _OnMouseEnter; _Form.MouseEnter += _OnMouseEnter;
_PresentParameters = new PresentParameters _PresentParameters = new PresentParameters
{ {
Windowed = true, Windowed = true,
SwapEffect = SwapEffect.Discard, SwapEffect = SwapEffect.Discard,
BackBufferHeight = CConfig.Config.Graphics.ScreenH, BackBufferHeight = CConfig.Config.Graphics.ScreenH,
BackBufferWidth = CConfig.Config.Graphics.ScreenW, BackBufferWidth = CConfig.Config.Graphics.ScreenW,
BackBufferFormat = _D3D.Adapters.DefaultAdapter.CurrentDisplayMode.Format, BackBufferFormat = _D3D.Adapters.DefaultAdapter.CurrentDisplayMode.Format,
Multisample = MultisampleType.None, Multisample = MultisampleType.None,
MultisampleQuality = 0 MultisampleQuality = 0
}; };
//Apply antialiasing and check if antialiasing mode is supported //Apply antialiasing and check if antialiasing mode is supported
+6 -6
View File
@@ -259,7 +259,7 @@ namespace Vocaluxe.Lib.Draw
{ {
base.Close(); base.Close();
} }
catch {} catch { }
Dispose(); Dispose();
} }
@@ -308,9 +308,9 @@ namespace Vocaluxe.Lib.Draw
_Backbuffer.Save(file, ImageFormat.Png); _Backbuffer.Save(file, ImageFormat.Png);
} }
public void DrawRect(SColorF color, SRectF rect) {} public void DrawRect(SColorF color, SRectF rect) { }
public void DrawRectReflection(SColorF color, SRectF rect, float space, float height) {} public void DrawRectReflection(SColorF color, SRectF rect, float space, float height) { }
public CTextureRef AddTexture(Bitmap bmp) public CTextureRef AddTexture(Bitmap bmp)
{ {
@@ -433,9 +433,9 @@ namespace Vocaluxe.Lib.Draw
coloredBitmap.Dispose(); coloredBitmap.Dispose();
} }
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end) {} public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end) { }
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) {} public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) { }
public int GetTextureCount() public int GetTextureCount()
{ {
@@ -448,7 +448,7 @@ namespace Vocaluxe.Lib.Draw
using (Graphics g = Graphics.FromImage(newBitmap)) using (Graphics g = Graphics.FromImage(newBitmap))
{ {
var cm = new ColorMatrix {Matrix33 = color.A, Matrix00 = color.R, Matrix11 = color.G, Matrix22 = color.B, Matrix44 = 1}; var cm = new ColorMatrix { Matrix33 = color.A, Matrix00 = color.R, Matrix11 = color.G, Matrix22 = color.B, Matrix44 = 1 };
using (var ia = new ImageAttributes()) using (var ia = new ImageAttributes())
{ {
+4 -4
View File
@@ -100,7 +100,7 @@ namespace Vocaluxe.Lib.Draw
public COpenGL() public COpenGL()
{ {
_Form = new CFormHook {ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH)}; _Form = new CFormHook { ClientSize = new Size(CConfig.Config.Graphics.ScreenW, CConfig.Config.Graphics.ScreenH) };
//OpenGL needs that here but D3D needs it in the constructor, so do NOT unify! //OpenGL needs that here but D3D needs it in the constructor, so do NOT unify!
//Check AA Mode //Check AA Mode
@@ -109,11 +109,11 @@ namespace Vocaluxe.Lib.Draw
bool ok = false; bool ok = false;
try try
{ {
#if WIN #if WIN
var gm = new GraphicsMode(32, 24, 0, (int)CConfig.Config.Graphics.AAMode); var gm = new GraphicsMode(32, 24, 0, (int)CConfig.Config.Graphics.AAMode);
#else #else
var gm = new GraphicsMode(24, 24, 0, (int)CConfig.Config.Graphics.AAMode); var gm = new GraphicsMode(24, 24, 0, (int)CConfig.Config.Graphics.AAMode);
#endif #endif
_Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default); _Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default);
if (_Control.GraphicsMode != null) if (_Control.GraphicsMode != null)
ok = true; ok = true;
+22 -22
View File
@@ -129,7 +129,7 @@ namespace Vocaluxe.Screens
{ {
base.Init(); base.Init();
var texts = new List<string> {_TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown}; var texts = new List<string> { _TextSongName, _TextTime, _TextPause, _TextDuetName1, _TextDuetName2, _TextMedleyCountdown };
_BuildTextStrings(texts); _BuildTextStrings(texts);
_ThemeTexts = texts.ToArray(); _ThemeTexts = texts.ToArray();
@@ -152,9 +152,9 @@ namespace Vocaluxe.Screens
_BuildStaticStrings(ref statics); _BuildStaticStrings(ref statics);
_ThemeStatics = statics.ToArray(); _ThemeStatics = statics.ToArray();
_ThemeButtons = new string[] {_ButtonCancel, _ButtonContinue, _ButtonSkip}; _ThemeButtons = new string[] { _ButtonCancel, _ButtonContinue, _ButtonSkip };
_ThemeLyrics = new string[] {_LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop}; _ThemeLyrics = new string[] { _LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop };
_ThemeSingNotes = new string[] {_SingBars}; _ThemeSingNotes = new string[] { _SingBars };
_TimeRects = new List<STimeRect>(); _TimeRects = new List<STimeRect>();
_TimerSongText = new Stopwatch(); _TimerSongText = new Stopwatch();
@@ -577,8 +577,8 @@ namespace Vocaluxe.Screens
} }
else else
{ {
for (int i = 0; i < CGame.NumPlayers; i++) for (int i = 0; i < CGame.NumPlayers; i++)
CGame.Players [i].VoiceNr = voiceAssignments [i]; CGame.Players[i].VoiceNr = voiceAssignments[i];
} }
} }
@@ -804,8 +804,8 @@ namespace Vocaluxe.Screens
private void _BuildTextStrings(List<string> texts) private void _BuildTextStrings(List<string> texts)
{ {
_TextScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; _TextScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
_TextNames = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; _TextNames = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
{ {
@@ -826,8 +826,8 @@ namespace Vocaluxe.Screens
private void _BuildStaticStrings(ref List<string> statics) private void _BuildStaticStrings(ref List<string> statics)
{ {
_StaticScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; _StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
_StaticAvatars = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer]; _StaticAvatars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
{ {
@@ -860,30 +860,30 @@ namespace Vocaluxe.Screens
_Texts[_TextDuetName1].Visible = false; _Texts[_TextDuetName1].Visible = false;
_Texts[_TextDuetName2].Visible = false; _Texts[_TextDuetName2].Visible = false;
List<string> staticsExtra = new List<string> (); List<string> staticsExtra = new List<string>();
List<string> textsExtra = new List<string> (); List<string> textsExtra = new List<string>();
//Everything Static or Text with Extra should be only visible //Everything Static or Text with Extra should be only visible
//If Player-Number matches CGame.NumPlayers //If Player-Number matches CGame.NumPlayers
foreach(CStatic st in _Statics) foreach (CStatic st in _Statics)
if(st.GetThemeName().StartsWith("StaticExtra")) if (st.GetThemeName().StartsWith("StaticExtra"))
staticsExtra.Add(st.GetThemeName()); staticsExtra.Add(st.GetThemeName());
foreach(CText tx in _Texts) foreach (CText tx in _Texts)
if(tx.GetThemeName().StartsWith("TextExtra")) if (tx.GetThemeName().StartsWith("TextExtra"))
textsExtra.Add(tx.GetThemeName()); textsExtra.Add(tx.GetThemeName());
string curN = "N"+(CGame.NumPlayers); string curN = "N" + (CGame.NumPlayers);
foreach (string st in staticsExtra) foreach (string st in staticsExtra)
{ {
string n = st.Substring(st.Length - 2); string n = st.Substring(st.Length - 2);
_Statics[st].Visible = n == curN; _Statics[st].Visible = n == curN;
} }
foreach (string tx in textsExtra) foreach (string tx in textsExtra)
{ {
string n = tx.Substring(tx.Length - 2); string n = tx.Substring(tx.Length - 2);
_Texts[tx].Visible = n == curN; _Texts[tx].Visible = n == curN;
} }
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++) for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
@@ -1333,7 +1333,7 @@ namespace Vocaluxe.Screens
{ {
foreach (CSongLine line in voice.Lines.Where(line => line.VisibleInTimeLine)) foreach (CSongLine line in voice.Lines.Where(line => line.VisibleInTimeLine))
{ {
var trect = new STimeRect {StartBeat = line.FirstNoteBeat, EndBeat = line.EndBeat}; var trect = new STimeRect { StartBeat = line.FirstNoteBeat, EndBeat = line.EndBeat };
trect.Rect = GetNewStatic(null, trect.Rect = GetNewStatic(null,
new SColorF(1f, 1f, 1f, 1f), new SColorF(1f, 1f, 1f, 1f),
new SRectF( new SRectF(
+2 -1
View File
@@ -27,7 +27,8 @@ namespace VocaluxeLib.Menu
[XmlType("ParticleEffect")] [XmlType("ParticleEffect")]
public struct SThemeParticleEffect public struct SThemeParticleEffect
{ {
[XmlAttribute(AttributeName = "Name")] public string Name; [XmlAttribute(AttributeName = "Name")]
public string Name;
public string Skin; public string Skin;
public SRectF Rect; public SRectF Rect;
+3 -2
View File
@@ -26,7 +26,8 @@ namespace VocaluxeLib.Menu
[XmlType("Static")] [XmlType("Static")]
public struct SThemeStatic public struct SThemeStatic
{ {
[XmlAttribute(AttributeName = "Name")] public string Name; [XmlAttribute(AttributeName = "Name")]
public string Name;
public string Skin; public string Skin;
public SThemeColor Color; public SThemeColor Color;
public SRectF Rect; public SRectF Rect;
@@ -187,7 +188,7 @@ namespace VocaluxeLib.Menu
CBase.Drawing.DrawRect(new SColorF(1f, 1f, 1f, 0.5f), rect); CBase.Drawing.DrawRect(new SColorF(1f, 1f, 1f, 0.5f), rect);
} }
public void UnloadSkin() {} public void UnloadSkin() { }
public void LoadSkin() public void LoadSkin()
{ {
+11 -6
View File
@@ -25,19 +25,24 @@ namespace VocaluxeLib.Menu
[XmlType("Text")] [XmlType("Text")]
public struct SThemeText public struct SThemeText
{ {
[XmlAttribute(AttributeName = "Name")] public string Name; [XmlAttribute(AttributeName = "Name")]
public string Name;
public float X; public float X;
public float Y; public float Y;
public float Z; public float Z;
[XmlElement("H")] public float FontHeight; [XmlElement("H")]
[XmlElement("MaxW")] public float MaxWidth; public float FontHeight;
[XmlElement("MaxW")]
public float MaxWidth;
public SThemeColor Color; public SThemeColor Color;
public SThemeColor SelColor; //for Buttons public SThemeColor SelColor; //for Buttons
public EAlignment Align; public EAlignment Align;
public EHAlignment ResizeAlign; public EHAlignment ResizeAlign;
[XmlElement("Style")] public EStyle FontStyle; [XmlElement("Style")]
[XmlElement("Font")] public string FontFamily; public EStyle FontStyle;
[XmlElement("Font")]
public string FontFamily;
public string Text; public string Text;
public SReflection? Reflection; public SReflection? Reflection;
} }
@@ -428,7 +433,7 @@ namespace VocaluxeLib.Menu
Y -= ry; Y -= ry;
} }
public void UnloadSkin() {} public void UnloadSkin() { }
public void LoadSkin() public void LoadSkin()
{ {