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
// ReSharper disable MemberCanBePrivate.Global
public struct SConfigInfo
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore MemberCanBePrivate.Global
{
// ReSharper disable NotAccessedField.Global
// ReSharper disable NotAccessedField.Local
@@ -63,110 +63,173 @@ namespace Vocaluxe.Base
public struct SConfigDebug
{
[DefaultValue(EDebugLevel.TR_CONFIG_OFF)] public EDebugLevel DebugLevel;
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn SaveModifiedSongs;
[DefaultValue(EDebugLevel.TR_CONFIG_OFF)]
public EDebugLevel DebugLevel;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn SaveModifiedSongs;
}
public struct SConfigGraphics
{
#if WIN
[DefaultValue(ERenderer.TR_CONFIG_DIRECT3D)] public ERenderer Renderer;
[DefaultValue(ERenderer.TR_CONFIG_DIRECT3D)]
public ERenderer Renderer;
#else
[DefaultValue(ERenderer.TR_CONFIG_OPENGL)] public ERenderer Renderer;
#endif
[DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)] public ETextureQuality TextureQuality;
[XmlRanged(32, 1024), DefaultValue(256)] public int CoverSize;
[DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)]
public ETextureQuality TextureQuality;
[XmlRanged(32, 1024), DefaultValue(256)]
public int CoverSize;
[DefaultValue(1024)] public int ScreenW;
[DefaultValue(576)] public int ScreenH;
[DefaultValue(EGeneralAlignment.Middle)] public EGeneralAlignment ScreenAlignment;
[DefaultValue(0)] public int BorderLeft;
[DefaultValue(0)] public int BorderRight;
[DefaultValue(0)] public int BorderTop;
[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;
[DefaultValue(1024)]
public int ScreenW;
[DefaultValue(576)]
public int ScreenH;
[DefaultValue(EGeneralAlignment.Middle)]
public EGeneralAlignment ScreenAlignment;
[DefaultValue(0)]
public int BorderLeft;
[DefaultValue(0)]
public int BorderRight;
[DefaultValue(0)]
public int BorderTop;
[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
{
[XmlElement("Name"), DefaultValue("Ambient")] public string Theme;
[DefaultValue("Blue")] public string Skin;
[XmlElement("Cover"), DefaultValue("Ambient Blue")] public string CoverTheme;
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn DrawNoteLines;
[DefaultValue(EOffOn.TR_CONFIG_ON)] 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;
[XmlElement("Name"), DefaultValue("Ambient")]
public string Theme;
[DefaultValue("Blue")]
public string Skin;
[XmlElement("Cover"), DefaultValue("Ambient Blue")]
public string CoverTheme;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn DrawNoteLines;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
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
{
[DefaultValue(EPlaybackLib.GstreamerSharp)] public EPlaybackLib PlayBackLib;
[DefaultValue(ERecordLib.PortAudio)] public ERecordLib RecordLib;
[DefaultValue(EBufferSize.B2048)] public EBufferSize AudioBufferSize;
[XmlRanged(-500, 500)] public int AudioLatency;
[DefaultValue(EPlaybackLib.GstreamerSharp)]
public EPlaybackLib PlayBackLib;
[DefaultValue(ERecordLib.PortAudio)]
public ERecordLib RecordLib;
[DefaultValue(EBufferSize.B2048)]
public EBufferSize AudioBufferSize;
[XmlRanged(-500, 500)]
public int AudioLatency;
// ReSharper disable MemberHidesStaticFromOuterClass
[DefaultValue(EBackgroundMusicOffOn.TR_CONFIG_ON)] public EBackgroundMusicOffOn BackgroundMusic;
[XmlRanged(0, 100), DefaultValue(30)] public int BackgroundMusicVolume;
[DefaultValue(EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)] public EBackgroundMusicSource BackgroundMusicSource;
[DefaultValue(EOffOn.TR_CONFIG_ON)] 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;
[DefaultValue(EBackgroundMusicOffOn.TR_CONFIG_ON)]
public EBackgroundMusicOffOn BackgroundMusic;
[XmlRanged(0, 100), DefaultValue(30)]
public int BackgroundMusicVolume;
[DefaultValue(EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)]
public EBackgroundMusicSource BackgroundMusicSource;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
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
}
public struct SConfigGame
{
[DefaultValue(CSettings.FallbackLanguage)] public string Language;
[DefaultValue(CSettings.FallbackLanguage)]
public string Language;
public string[] SongFolder;
// ReSharper disable MemberHidesStaticFromOuterClass
[DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)] public ESongMenu SongMenu;
[DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)]
public ESongMenu SongMenu;
// ReSharper restore MemberHidesStaticFromOuterClass
[DefaultValue(ESongSorting.TR_CONFIG_ARTIST)] public ESongSorting SongSorting;
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn IgnoreArticles;
[DefaultValue(10)] public float ScoreAnimationTime;
[DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)] public ETimerMode TimerMode;
[XmlAltName("NumPlayer"), DefaultValue(2)] 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;
[DefaultValue(ESongSorting.TR_CONFIG_ARTIST)]
public ESongSorting SongSorting;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn IgnoreArticles;
[DefaultValue(10)]
public float ScoreAnimationTime;
[DefaultValue(ETimerMode.TR_CONFIG_TIMERMODE_REMAINING)]
public ETimerMode TimerMode;
[XmlAltName("NumPlayer"), DefaultValue(2)]
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
{
[DefaultValue(EVideoDecoder.FFmpeg)] public EVideoDecoder VideoDecoder;
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn VideoBackgrounds;
[DefaultValue(EOffOn.TR_CONFIG_ON)] 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;
[DefaultValue(EVideoDecoder.FFmpeg)]
public EVideoDecoder VideoDecoder;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn VideoBackgrounds;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
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 struct SConfigRecord
{
public SMicConfig[] MicConfig;
[DefaultValue(200)] public int MicDelay; //[ms]
[DefaultValue(200)]
public int MicDelay; //[ms]
}
public struct SConfigServer
{
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn ServerActive;
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn ServerEncryption;
[DefaultValue(3000)] public int ServerPort;
[DefaultValue(70)] public int SongCountCoverThreshold;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn ServerActive;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn ServerEncryption;
[DefaultValue(3000)]
public int ServerPort;
[DefaultValue(70)]
public int SongCountCoverThreshold;
}
#pragma warning restore 649
// ReSharper restore UnassignedField.Global
@@ -369,16 +432,16 @@ namespace Vocaluxe.Base
Config.Server.ServerPort = 3000;
Config.Info = new SConfigInfo
{
Version = CSettings.GetFullVersionText(),
Time = DateTime.Now.ToString(),
Platform = Environment.OSVersion.Platform.ToString(),
OSVersion = Environment.OSVersion.ToString(),
ProcessorCount = Environment.ProcessorCount,
Screens = Screen.AllScreens.Length,
PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(),
Directory = CSettings.ProgramFolder
};
{
Version = CSettings.GetFullVersionText(),
Time = DateTime.Now.ToString(),
Platform = Environment.OSVersion.Platform.ToString(),
OSVersion = Environment.OSVersion.ToString(),
ProcessorCount = Environment.ProcessorCount,
Screens = Screen.AllScreens.Length,
PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(),
Directory = CSettings.ProgramFolder
};
}
private static readonly List<string> _CommentsGot = new List<string>();
@@ -542,7 +605,7 @@ namespace Vocaluxe.Base
return devices.Any(t => t.PlayerChannel.Contains(player));
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;
}
@@ -647,7 +710,7 @@ namespace Vocaluxe.Base
switch (parts.Length)
{
//Only found a parameter
//Only found a parameter
case 1:
if (parts[0] != "")
{
@@ -660,7 +723,7 @@ namespace Vocaluxe.Base
break;
//Found parameter and value
//Found parameter and value
case 2:
if (parts[0] != "")
{
+3 -3
View File
@@ -54,11 +54,11 @@ namespace Vocaluxe.Base
public static EProgramState ProgramState = EProgramState.Start;
//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.4.", "Blue Sunrise"}
};
};
private static string _ProgramCodeName
{
@@ -233,7 +233,7 @@ namespace Vocaluxe.Base
public static string GetFullVersionText()
{
string version = ProgramName;
if (_ProgramCodeName != "")
version += " \"" + _ProgramCodeName + "\"";
+5 -5
View File
@@ -31,14 +31,14 @@ namespace Vocaluxe.Base
// ReSharper disable MemberCanBePrivate.Global
public static void Reset()
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore MemberCanBePrivate.Global
{
_Stopwatch.Reset();
}
// ReSharper disable MemberCanBePrivate.Global
public static void Start()
// ReSharper restore MemberCanBePrivate.Global
// ReSharper restore MemberCanBePrivate.Global
{
_Stopwatch.Start();
}
@@ -127,7 +127,7 @@ namespace Vocaluxe.Base
{
_KeysPool.Add(pool);
}
catch (Exception) {}
catch (Exception) { }
}
_Timer.Reset();
@@ -173,7 +173,7 @@ namespace Vocaluxe.Base
// ReSharper disable UnusedParameter.Global
public void KeyUp(KeyEventArgs e)
// ReSharper restore UnusedParameter.Global
// ReSharper restore UnusedParameter.Global
{
_CheckModifiers();
_KeyPressed = false;
@@ -290,7 +290,7 @@ namespace Vocaluxe.Base
// ReSharper disable UnusedParameter.Global
public void MouseUp(MouseEventArgs e)
// ReSharper restore UnusedParameter.Global
// ReSharper restore UnusedParameter.Global
{
//CheckModifiers();
//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>
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
{
@@ -110,15 +110,15 @@ namespace Vocaluxe.Lib.Draw
_Form.MouseEnter += _OnMouseEnter;
_PresentParameters = new PresentParameters
{
Windowed = true,
SwapEffect = SwapEffect.Discard,
BackBufferHeight = CConfig.Config.Graphics.ScreenH,
BackBufferWidth = CConfig.Config.Graphics.ScreenW,
BackBufferFormat = _D3D.Adapters.DefaultAdapter.CurrentDisplayMode.Format,
Multisample = MultisampleType.None,
MultisampleQuality = 0
};
{
Windowed = true,
SwapEffect = SwapEffect.Discard,
BackBufferHeight = CConfig.Config.Graphics.ScreenH,
BackBufferWidth = CConfig.Config.Graphics.ScreenW,
BackBufferFormat = _D3D.Adapters.DefaultAdapter.CurrentDisplayMode.Format,
Multisample = MultisampleType.None,
MultisampleQuality = 0
};
//Apply antialiasing and check if antialiasing mode is supported
+6 -6
View File
@@ -259,7 +259,7 @@ namespace Vocaluxe.Lib.Draw
{
base.Close();
}
catch {}
catch { }
Dispose();
}
@@ -308,9 +308,9 @@ namespace Vocaluxe.Lib.Draw
_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)
{
@@ -433,9 +433,9 @@ namespace Vocaluxe.Lib.Draw
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()
{
@@ -448,7 +448,7 @@ namespace Vocaluxe.Lib.Draw
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())
{
+4 -4
View File
@@ -100,7 +100,7 @@ namespace Vocaluxe.Lib.Draw
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!
//Check AA Mode
@@ -109,11 +109,11 @@ namespace Vocaluxe.Lib.Draw
bool ok = false;
try
{
#if WIN
#if WIN
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);
#endif
#endif
_Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default);
if (_Control.GraphicsMode != null)
ok = true;
+22 -22
View File
@@ -129,7 +129,7 @@ namespace Vocaluxe.Screens
{
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);
_ThemeTexts = texts.ToArray();
@@ -152,9 +152,9 @@ namespace Vocaluxe.Screens
_BuildStaticStrings(ref statics);
_ThemeStatics = statics.ToArray();
_ThemeButtons = new string[] {_ButtonCancel, _ButtonContinue, _ButtonSkip};
_ThemeLyrics = new string[] {_LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop};
_ThemeSingNotes = new string[] {_SingBars};
_ThemeButtons = new string[] { _ButtonCancel, _ButtonContinue, _ButtonSkip };
_ThemeLyrics = new string[] { _LyricMain, _LyricSub, _LyricMainDuet, _LyricSubDuet, _LyricMainTop, _LyricSubTop };
_ThemeSingNotes = new string[] { _SingBars };
_TimeRects = new List<STimeRect>();
_TimerSongText = new Stopwatch();
@@ -577,8 +577,8 @@ namespace Vocaluxe.Screens
}
else
{
for (int i = 0; i < CGame.NumPlayers; i++)
CGame.Players [i].VoiceNr = voiceAssignments [i];
for (int i = 0; i < CGame.NumPlayers; i++)
CGame.Players[i].VoiceNr = voiceAssignments[i];
}
}
@@ -804,8 +804,8 @@ namespace Vocaluxe.Screens
private void _BuildTextStrings(List<string> texts)
{
_TextScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
_TextNames = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
_TextScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
_TextNames = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
{
@@ -826,8 +826,8 @@ namespace Vocaluxe.Screens
private void _BuildStaticStrings(ref List<string> statics)
{
_StaticScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
_StaticAvatars = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
_StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
_StaticAvatars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
{
@@ -860,30 +860,30 @@ namespace Vocaluxe.Screens
_Texts[_TextDuetName1].Visible = false;
_Texts[_TextDuetName2].Visible = false;
List<string> staticsExtra = new List<string> ();
List<string> textsExtra = new List<string> ();
List<string> staticsExtra = new List<string>();
List<string> textsExtra = new List<string>();
//Everything Static or Text with Extra should be only visible
//If Player-Number matches CGame.NumPlayers
foreach(CStatic st in _Statics)
if(st.GetThemeName().StartsWith("StaticExtra"))
foreach (CStatic st in _Statics)
if (st.GetThemeName().StartsWith("StaticExtra"))
staticsExtra.Add(st.GetThemeName());
foreach(CText tx in _Texts)
if(tx.GetThemeName().StartsWith("TextExtra"))
foreach (CText tx in _Texts)
if (tx.GetThemeName().StartsWith("TextExtra"))
textsExtra.Add(tx.GetThemeName());
string curN = "N"+(CGame.NumPlayers);
foreach (string st in staticsExtra)
string curN = "N" + (CGame.NumPlayers);
foreach (string st in staticsExtra)
{
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);
_Texts[tx].Visible = n == curN;
_Texts[tx].Visible = n == curN;
}
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))
{
var trect = new STimeRect {StartBeat = line.FirstNoteBeat, EndBeat = line.EndBeat};
var trect = new STimeRect { StartBeat = line.FirstNoteBeat, EndBeat = line.EndBeat };
trect.Rect = GetNewStatic(null,
new SColorF(1f, 1f, 1f, 1f),
new SRectF(
+2 -1
View File
@@ -27,7 +27,8 @@ namespace VocaluxeLib.Menu
[XmlType("ParticleEffect")]
public struct SThemeParticleEffect
{
[XmlAttribute(AttributeName = "Name")] public string Name;
[XmlAttribute(AttributeName = "Name")]
public string Name;
public string Skin;
public SRectF Rect;
+3 -2
View File
@@ -26,7 +26,8 @@ namespace VocaluxeLib.Menu
[XmlType("Static")]
public struct SThemeStatic
{
[XmlAttribute(AttributeName = "Name")] public string Name;
[XmlAttribute(AttributeName = "Name")]
public string Name;
public string Skin;
public SThemeColor Color;
public SRectF Rect;
@@ -187,7 +188,7 @@ namespace VocaluxeLib.Menu
CBase.Drawing.DrawRect(new SColorF(1f, 1f, 1f, 0.5f), rect);
}
public void UnloadSkin() {}
public void UnloadSkin() { }
public void LoadSkin()
{
+11 -6
View File
@@ -25,19 +25,24 @@ namespace VocaluxeLib.Menu
[XmlType("Text")]
public struct SThemeText
{
[XmlAttribute(AttributeName = "Name")] public string Name;
[XmlAttribute(AttributeName = "Name")]
public string Name;
public float X;
public float Y;
public float Z;
[XmlElement("H")] public float FontHeight;
[XmlElement("MaxW")] public float MaxWidth;
[XmlElement("H")]
public float FontHeight;
[XmlElement("MaxW")]
public float MaxWidth;
public SThemeColor Color;
public SThemeColor SelColor; //for Buttons
public EAlignment Align;
public EHAlignment ResizeAlign;
[XmlElement("Style")] public EStyle FontStyle;
[XmlElement("Font")] public string FontFamily;
[XmlElement("Style")]
public EStyle FontStyle;
[XmlElement("Font")]
public string FontFamily;
public string Text;
public SReflection? Reflection;
}
@@ -428,7 +433,7 @@ namespace VocaluxeLib.Menu
Y -= ry;
}
public void UnloadSkin() {}
public void UnloadSkin() { }
public void LoadSkin()
{