Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into develop

This commit is contained in:
Florian Kuepper committed 2012-12-21 15:04:53 +01:00
commit 8e51252284
127 files changed
+10669 -2505

No files matched your search

+12
View File
@@ -103,8 +103,20 @@
<!--ScreenMain-->
<TR_SCREENMAIN_MENU>Hauptmenü</TR_SCREENMAIN_MENU>
<TR_SCREENMAIN_BUTTON_SING>Singen</TR_SCREENMAIN_BUTTON_SING>
<TR_SCREENMAIN_BUTTON_PARTY>Party</TR_SCREENMAIN_BUTTON_PARTY>
<TR_SCREENMAIN_BUTTON_OPTIONS>Optionen</TR_SCREENMAIN_BUTTON_OPTIONS>
<TR_SCREENMAIN_BUTTON_PROFILES>Profile</TR_SCREENMAIN_BUTTON_PROFILES>
<!--ScreenParty-->
<TR_SCREENPARTY_TITLE>Party-Modus Auswahl</TR_SCREENPARTY_TITLE>
<TR_SCREENPARTY_MODES>Party-Modus</TR_SCREENPARTY_MODES>
<TR_SCREENPARTY_DESCRIPTION>Beschreibung</TR_SCREENPARTY_DESCRIPTION>
<TR_SCREENPARTY_AUTHOR>Autor</TR_SCREENPARTY_AUTHOR>
<TR_SCREENPARTY_VERSION>Version</TR_SCREENPARTY_VERSION>
<TR_SCREENPARTY_ERROR>Dieser Party-Modus konnte nicht geladen werden.</TR_SCREENPARTY_ERROR>
<TR_SCREENPARTY_TARGETAUDIENCE>Zielgruppe</TR_SCREENPARTY_TARGETAUDIENCE>
<TR_SCREENPARTY_NOTEAMS>Keine Teams</TR_SCREENPARTY_NOTEAMS>
<TR_SCREENPARTY_NUMTEAMS>Anzahl der Teams</TR_SCREENPARTY_NUMTEAMS>
<TR_SCREENPARTY_NUMPLAYERS>Anzahl der Spieler</TR_SCREENPARTY_NUMPLAYERS>
<!--ScreenNames-->
<TR_SCREENNAMES_MENU>Spielerauswahl</TR_SCREENNAMES_MENU>
<TR_SCREENNAMES_PLAYER>Spieler</TR_SCREENNAMES_PLAYER>
+12
View File
@@ -103,8 +103,20 @@
<!--ScreenMain-->
<TR_SCREENMAIN_MENU>Main Menu</TR_SCREENMAIN_MENU>
<TR_SCREENMAIN_BUTTON_SING>Sing</TR_SCREENMAIN_BUTTON_SING>
<TR_SCREENMAIN_BUTTON_PARTY>Party</TR_SCREENMAIN_BUTTON_PARTY>
<TR_SCREENMAIN_BUTTON_OPTIONS>Options</TR_SCREENMAIN_BUTTON_OPTIONS>
<TR_SCREENMAIN_BUTTON_PROFILES>Profiles</TR_SCREENMAIN_BUTTON_PROFILES>
<!--ScreenParty-->
<TR_SCREENPARTY_TITLE>Party Mode Selection</TR_SCREENPARTY_TITLE>
<TR_SCREENPARTY_MODES>Party Mode</TR_SCREENPARTY_MODES>
<TR_SCREENPARTY_DESCRIPTION>Description</TR_SCREENPARTY_DESCRIPTION>
<TR_SCREENPARTY_AUTHOR>Author</TR_SCREENPARTY_AUTHOR>
<TR_SCREENPARTY_VERSION>Version</TR_SCREENPARTY_VERSION>
<TR_SCREENPARTY_ERROR>Can't load this party-mode.</TR_SCREENPARTY_ERROR>
<TR_SCREENPARTY_TARGETAUDIENCE>Target audience</TR_SCREENPARTY_TARGETAUDIENCE>
<TR_SCREENPARTY_NOTEAMS>No teams</TR_SCREENPARTY_NOTEAMS>
<TR_SCREENPARTY_NUMTEAMS>Number of teams</TR_SCREENPARTY_NUMTEAMS>
<TR_SCREENPARTY_NUMPLAYERS>Number of players</TR_SCREENPARTY_NUMPLAYERS>
<!--ScreenNames-->
<TR_SCREENNAMES_MENU>Player Selection</TR_SCREENNAMES_MENU>
<TR_SCREENNAMES_PLAYER>Player</TR_SCREENNAMES_PLAYER>
+12
View File
@@ -103,8 +103,20 @@
<!--ScreenMain-->
<TR_SCREENMAIN_MENU>Menu Principal</TR_SCREENMAIN_MENU>
<TR_SCREENMAIN_BUTTON_SING>Chanter</TR_SCREENMAIN_BUTTON_SING>
<TR_SCREENMAIN_BUTTON_PARTY>TODO: Party</TR_SCREENMAIN_BUTTON_PARTY>
<TR_SCREENMAIN_BUTTON_OPTIONS>Options</TR_SCREENMAIN_BUTTON_OPTIONS>
<TR_SCREENMAIN_BUTTON_PROFILES>Profils</TR_SCREENMAIN_BUTTON_PROFILES>
<!--ScreenParty-->
<TR_SCREENPARTY_TITLE>TODO: Party Mode Selection</TR_SCREENPARTY_TITLE>
<TR_SCREENPARTY_MODES>TODO: Party Mode</TR_SCREENPARTY_MODES>
<TR_SCREENPARTY_DESCRIPTION>TODO: Description</TR_SCREENPARTY_DESCRIPTION>
<TR_SCREENPARTY_AUTHOR>TODO: Author</TR_SCREENPARTY_AUTHOR>
<TR_SCREENPARTY_VERSION>TODO: Version</TR_SCREENPARTY_VERSION>
<TR_SCREENPARTY_ERROR>TODO: Can't load this party-mode.</TR_SCREENPARTY_ERROR>
<TR_SCREENPARTY_TARGETAUDIENCE>TODO: Target audience</TR_SCREENPARTY_TARGETAUDIENCE>
<TR_SCREENPARTY_NOTEAMS>TODO: No Teams</TR_SCREENPARTY_NOTEAMS>
<TR_SCREENPARTY_NUMTEAMS>TODO: Number of teams</TR_SCREENPARTY_NUMTEAMS>
<TR_SCREENPARTY_NUMPLAYERS>TODO: Number of players</TR_SCREENPARTY_NUMPLAYERS>
<!--ScreenNames-->
<TR_SCREENNAMES_MENU>Sélection des joueurs</TR_SCREENNAMES_MENU>
<TR_SCREENNAMES_PLAYER>Joueur</TR_SCREENNAMES_PLAYER>
+12
View File
@@ -97,8 +97,20 @@
<!--ScreenMain-->
<TR_SCREENMAIN_MENU>Menú Principal</TR_SCREENMAIN_MENU>
<TR_SCREENMAIN_BUTTON_SING>Cantar</TR_SCREENMAIN_BUTTON_SING>
<TR_SCREENMAIN_BUTTON_PARTY>TODO: Party</TR_SCREENMAIN_BUTTON_PARTY>
<TR_SCREENMAIN_BUTTON_OPTIONS>Opciones</TR_SCREENMAIN_BUTTON_OPTIONS>
<TR_SCREENMAIN_BUTTON_PROFILES>Perfiles</TR_SCREENMAIN_BUTTON_PROFILES>
<!--ScreenParty-->
<TR_SCREENPARTY_TITLE>TODO: Party Mode Selection</TR_SCREENPARTY_TITLE>
<TR_SCREENPARTY_MODES>TODO: Party Mode</TR_SCREENPARTY_MODES>
<TR_SCREENPARTY_DESCRIPTION>TODO: Description</TR_SCREENPARTY_DESCRIPTION>
<TR_SCREENPARTY_AUTHOR>TODO: Author</TR_SCREENPARTY_AUTHOR>
<TR_SCREENPARTY_VERSION>TODO: Version</TR_SCREENPARTY_VERSION>
<TR_SCREENPARTY_ERROR>TODO: Can't load this party-mode.</TR_SCREENPARTY_ERROR>
<TR_SCREENPARTY_TARGETAUDIENCE>TODO: Target audience</TR_SCREENPARTY_TARGETAUDIENCE>
<TR_SCREENPARTY_NOTEAMS>TODO: No Teams</TR_SCREENPARTY_NOTEAMS>
<TR_SCREENPARTY_NUMTEAMS>TODO: Number of teams</TR_SCREENPARTY_NUMTEAMS>
<TR_SCREENPARTY_NUMPLAYERS>TODO: Number of players</TR_SCREENPARTY_NUMPLAYERS>
<!--ScreenNames-->
<TR_SCREENNAMES_MENU>Selección de Jugadores</TR_SCREENNAMES_MENU>
<TR_SCREENNAMES_PLAYER>Jugador</TR_SCREENNAMES_PLAYER>
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyModeSystemVersion>1</PartyModeSystemVersion>
<Info>
<Name>TR_PARTYMODE_NAME</Name>
<Author>brunzel</Author>
<Description>TR_PARTYMODE_DESCRIPTION</Description>
<Folder>Challenge</Folder>
<PartyModeFile>PartyModeChallenge</PartyModeFile>
<PartyModeVersionMajor>0</PartyModeVersionMajor>
<PartyModeVersionMinor>1</PartyModeVersionMinor>
<TargetAudience>TR_PARTYMODE_AUDIENCE</TargetAudience>
</Info>
<PartyScreens>
<ScreenFile>PartyScreenChallengeMain</ScreenFile>
<ScreenFile>PartyScreenChallengeConfig</ScreenFile>
<ScreenFile>PartyScreenChallengeNames</ScreenFile>
</PartyScreens>
</root>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Info>
<Name>Deutsch</Name>
</Info>
<Texts>
<!--General-->
<TR_PARTYMODE_NAME>Challenge Modus</TR_PARTYMODE_NAME>
<TR_PARTYMODE_DESCRIPTION>Spiele mit bis zu X Spielern einen Wettkampfmodus</TR_PARTYMODE_DESCRIPTION>
<TR_PARTYMODE_AUDIENCE>Für alle, die Spaß am Wettkampf haben.</TR_PARTYMODE_AUDIENCE>
<TR_BUTTON_NEXT>Weiter</TR_BUTTON_NEXT>
<TR_BUTTON_BACK>Zurück</TR_BUTTON_BACK>
<TR_BUTTON_START>Start</TR_BUTTON_START>
<TR_BUTTON_NEXT_ROUND>Nächste Runde</TR_BUTTON_NEXT_ROUND>
<!--ScreenConfig-->
<TR_SCREENCONFIG_TITLE>Challenge Modus: Einstellungen</TR_SCREENCONFIG_TITLE>
<TR_SCREENCONFIG_NUMPLAYERS>Anzahl der Spieler</TR_SCREENCONFIG_NUMPLAYERS>
<TR_SCREENCONFIG_NUMMICS>Anzahl der Mikrofone</TR_SCREENCONFIG_NUMMICS>
<TR_SCREENCONFIG_NUMROUNDS>Anzahl der Runden</TR_SCREENCONFIG_NUMROUNDS>
<!--ScreenNames-->
<TR_SCREENNAMES_TITLE>Challenge Modus: Spielerwahl</TR_SCREENNAMES_TITLE>
<!--ScreenMain-->
<TR_SCREENMAIN_TITLE>Challenge Modus: Übersicht</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_POS>Pos</TR_SCREENMAIN_TABLE_POS>
<TR_SCREENMAIN_TABLE_PLAYERNAME>Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>S</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>U</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>N</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_SINGPOINTS>Sing-Punkte</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>Punkte</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
</root>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Info>
<Name>English</Name>
</Info>
<Texts>
<!--General-->
<TR_PARTYMODE_NAME>Challenge Mode</TR_PARTYMODE_NAME>
<TR_PARTYMODE_DESCRIPTION>Challenge with up to X Players</TR_PARTYMODE_DESCRIPTION>
<TR_PARTYMODE_AUDIENCE>For all who are interested in duel fights.</TR_PARTYMODE_AUDIENCE>
<TR_BUTTON_NEXT>Next</TR_BUTTON_NEXT>
<TR_BUTTON_BACK>Back</TR_BUTTON_BACK>
<TR_BUTTON_START>Start</TR_BUTTON_START>
<TR_BUTTON_NEXT_ROUND>Next Round</TR_BUTTON_NEXT_ROUND>
<!--ScreenConfig-->
<TR_SCREENCONFIG_TITLE>Challenge Mode: Configuration</TR_SCREENCONFIG_TITLE>
<TR_SCREENCONFIG_NUMPLAYERS>Number of players</TR_SCREENCONFIG_NUMPLAYERS>
<TR_SCREENCONFIG_NUMMICS>Number of mics</TR_SCREENCONFIG_NUMMICS>
<TR_SCREENCONFIG_NUMROUNDS>Number of rounds</TR_SCREENCONFIG_NUMROUNDS>
<!--ScreenNames-->
<TR_SCREENNAMES_TITLE>Challenge Mode: Choose Player</TR_SCREENNAMES_TITLE>
<!--ScreenMain-->
<TR_SCREENMAIN_TITLE>Challenge Mode: Overview</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_POS>Pos</TR_SCREENMAIN_TABLE_POS>
<TR_SCREENMAIN_TABLE_PLAYERNAME>Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>W</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>D</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>L</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_SINGPOINTS>Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
</root>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Info>
<Name>Français</Name>
</Info>
<Texts>
<!--General-->
<TR_PARTYMODE_NAME>TODO: Challenge Mode</TR_PARTYMODE_NAME>
<TR_PARTYMODE_DESCRIPTION>TODO: Challenge with up to X Players</TR_PARTYMODE_DESCRIPTION>
<TR_PARTYMODE_AUDIENCE>TODO: For all who are interested in duel fights.</TR_PARTYMODE_AUDIENCE>
<TR_BUTTON_NEXT>TODO: Next</TR_BUTTON_NEXT>
<TR_BUTTON_BACK>Retour</TR_BUTTON_BACK>
<TR_BUTTON_START>Démarrer</TR_BUTTON_START>
<TR_BUTTON_NEXT_ROUND>TODO: Next Round</TR_BUTTON_NEXT_ROUND>
<!--ScreenConfig-->
<TR_SCREENCONFIG_TITLE>TODO: Challenge Mode: Configuration</TR_SCREENCONFIG_TITLE>
<TR_SCREENCONFIG_NUMPLAYERS>TODO: Number of players</TR_SCREENCONFIG_NUMPLAYERS>
<TR_SCREENCONFIG_NUMMICS>TODO: Number of mics</TR_SCREENCONFIG_NUMMICS>
<TR_SCREENCONFIG_NUMROUNDS>TODO: Number of rounds</TR_SCREENCONFIG_NUMROUNDS>
<!--ScreenNames-->
<TR_SCREENNAMES_TITLE>TODO: Challenge Mode: Choose Player</TR_SCREENNAMES_TITLE>
<!--ScreenMain-->
<TR_SCREENMAIN_TITLE>TODO: Challenge Mode: Overview</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_POS>TODO: Pos</TR_SCREENMAIN_TABLE_POS>
<TR_SCREENMAIN_TABLE_PLAYERNAME>TODO: Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>TODO: W</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>TODO: D</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>TODO: L</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_SINGPOINTS>TODO: Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>TODO: Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
</root>
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Info>
<Name>Español</Name>
</Info>
<Texts>
<!--General-->
<TR_PARTYMODE_NAME>TODO: Challenge Mode</TR_PARTYMODE_NAME>
<TR_PARTYMODE_DESCRIPTION>TODO: Challenge with up to X Players</TR_PARTYMODE_DESCRIPTION>
<TR_PARTYMODE_AUDIENCE>TODO: For all who are interested in duel fights.</TR_PARTYMODE_AUDIENCE>
<TR_BUTTON_NEXT>TODO: Next</TR_BUTTON_NEXT>
<TR_BUTTON_BACK>Volver</TR_BUTTON_BACK>
<TR_BUTTON_START>Comenzar</TR_BUTTON_START>
<TR_BUTTON_NEXT_ROUND>TODO: Next Round</TR_BUTTON_NEXT_ROUND>
<!--ScreenConfig-->
<TR_SCREENCONFIG_TITLE>TODO: Challenge Mode: Configuration</TR_SCREENCONFIG_TITLE>
<TR_SCREENCONFIG_NUMPLAYERS>TODO: Number of players</TR_SCREENCONFIG_NUMPLAYERS>
<TR_SCREENCONFIG_NUMMICS>TODO: Number of mics</TR_SCREENCONFIG_NUMMICS>
<TR_SCREENCONFIG_NUMROUNDS>TODO: Number of rounds</TR_SCREENCONFIG_NUMROUNDS>
<!--ScreenNames-->
<TR_SCREENNAMES_TITLE>TODO: Challenge Mode: Choose Player</TR_SCREENNAMES_TITLE>
<!--ScreenMain-->
<TR_SCREENMAIN_TITLE>TODO: Challenge Mode: Overview</TR_SCREENMAIN_TITLE>
<TR_SCREENMAIN_TABLE_PLAYERNAME>TODO: Name</TR_SCREENMAIN_TABLE_PLAYERNAME>
<TR_SCREENMAIN_TABLE_WON>TODO: W</TR_SCREENMAIN_TABLE_WON>
<TR_SCREENMAIN_TABLE_DRAWN>TODO: D</TR_SCREENMAIN_TABLE_DRAWN>
<TR_SCREENMAIN_TABLE_LOST>TODO: L</TR_SCREENMAIN_TABLE_LOST>
<TR_SCREENMAIN_TABLE_SINGPOINTS>TODO: Sing Points</TR_SCREENMAIN_TABLE_SINGPOINTS>
<TR_SCREENMAIN_TABLE_GAMEPOINTS>TODO: Score</TR_SCREENMAIN_TABLE_GAMEPOINTS>
</Texts>
</root>
@@ -0,0 +1,458 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyScreenChallengeConfig>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
<!--<Video>: Background video name-->
<Video>BG_Video</Video>
<!--<Skin>: Background Texture name-->
<Skin>BG_Default</Skin>
<!--<Color>: Background color for type "Color" from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>BackgroundColor</Color>
</Background1>
<Static1>
<!--<Skin>: Texture name-->
<Skin>Menu</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>40</X>
<Y>40</Y>
<Z>0,00</Z>
<W>1200</W>
<H>50</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Static1>
<Text1>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>48</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENCONFIG_TITLE</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<Text2>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>105</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENCONFIG_NUMPLAYERS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text2>
<Text3>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>165</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENCONFIG_NUMMICS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text3>
<Text4>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>225</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENCONFIG_NUMROUNDS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text4>
<ButtonNext>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>985</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_NEXT</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonNext>
<ButtonBack>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_BACK</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonBack>
<SelectSlideNumPlayers>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>SelectSlide</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>500</X>
<Y>100</Y>
<Z>0,00</Z>
<W>700</W>
<H>50</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>505</ArrowLeftX>
<ArrowLeftY>105</ArrowLeftY>
<ArrowLeftZ>0,00</ArrowLeftZ>
<ArrowLeftW>40</ArrowLeftW>
<ArrowLeftH>40</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>1170</ArrowRightX>
<ArrowRightY>105</ArrowRightY>
<ArrowRightZ>0,00</ArrowRightZ>
<ArrowRightW>40</ArrowRightW>
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
<!--<ArrowSColor>: Selected arrow color from ColorScheme (high priority)-->
<!--or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)-->
<ArrowSColor>ArrowSColor</ArrowSColor>
<!--<TextColor>: Text color from ColorScheme (high priority)-->
<!--or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)-->
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>205,33</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>9</NumVisible>
</SelectSlideNumPlayers>
<SelectSlideNumMics>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>SelectSlide</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>500</X>
<Y>160</Y>
<Z>0,00</Z>
<W>700</W>
<H>50</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>505</ArrowLeftX>
<ArrowLeftY>165</ArrowLeftY>
<ArrowLeftZ>0,00</ArrowLeftZ>
<ArrowLeftW>40</ArrowLeftW>
<ArrowLeftH>40</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>1170</ArrowRightX>
<ArrowRightY>165</ArrowRightY>
<ArrowRightZ>0,00</ArrowRightZ>
<ArrowRightW>40</ArrowRightW>
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
<!--<ArrowSColor>: Selected arrow color from ColorScheme (high priority)-->
<!--or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)-->
<ArrowSColor>ArrowSColor</ArrowSColor>
<!--<TextColor>: Text color from ColorScheme (high priority)-->
<!--or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)-->
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>205,33</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>2</NumVisible>
</SelectSlideNumMics>
<SelectSlideNumRounds>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>SelectSlide</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>500</X>
<Y>220</Y>
<Z>0,00</Z>
<W>700</W>
<H>50</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>505</ArrowLeftX>
<ArrowLeftY>225</ArrowLeftY>
<ArrowLeftZ>0,00</ArrowLeftZ>
<ArrowLeftW>40</ArrowLeftW>
<ArrowLeftH>40</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>1170</ArrowRightX>
<ArrowRightY>225</ArrowRightY>
<ArrowRightZ>0,00</ArrowRightZ>
<ArrowRightW>40</ArrowRightW>
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
<!--<ArrowSColor>: Selected arrow color from ColorScheme (high priority)-->
<!--or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)-->
<ArrowSColor>ArrowSColor</ArrowSColor>
<!--<TextColor>: Text color from ColorScheme (high priority)-->
<!--or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)-->
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>205,33</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>10</NumVisible>
</SelectSlideNumRounds>
</PartyScreenChallengeConfig>
</root>
@@ -0,0 +1,322 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyScreenChallengeMain>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
<!--<Video>: Background video name-->
<Video>BG_Video</Video>
<!--<Skin>: Background Texture name-->
<Skin>BG_Default</Skin>
<!--<Color>: Background color for type "Color" from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>BackgroundColor</Color>
</Background1>
<Static1>
<!--<Skin>: Texture name-->
<Skin>Menu</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>40</X>
<Y>40</Y>
<Z>0,00</Z>
<W>1200</W>
<H>50</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Static1>
<Text1>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>48</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TITLE</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<TextPosition>
<!--<X>, <Y>: Text position-->
<X>100</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Right</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_POS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPosition>
<TextPlayerName>
<!--<X>, <Y>: Text position-->
<X>110</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_PLAYERNAME</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayerName>
<TextWon>
<!--<X>, <Y>: Text position-->
<X>400</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Right</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_WON</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextWon>
<TextDrawn>
<!--<X>, <Y>: Text position-->
<X>475</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Right</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_DRAWN</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextDrawn>
<TextLost>
<!--<X>, <Y>: Text position-->
<X>550</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Right</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_LOST</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextLost>
<TextSingPoints>
<!--<X>, <Y>: Text position-->
<X>750</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Right</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_SINGPOINTS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextSingPoints>
<TextGamePoints>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>100</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>37</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Right</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_TABLE_GAMEPOINTS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextGamePoints>
<ButtonNextRound>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>985</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_NEXT_ROUND</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonNextRound>
</PartyScreenChallengeMain>
</root>
@@ -0,0 +1,274 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PartyScreenChallengeNames>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
<!--<Video>: Background video name-->
<Video>BG_Video</Video>
<!--<Skin>: Background Texture name-->
<Skin>BG_Default</Skin>
<!--<Color>: Background color for type "Color" from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>BackgroundColor</Color>
</Background1>
<Static1>
<!--<Skin>: Texture name-->
<Skin>Menu</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>40</X>
<Y>40</Y>
<Z>0,00</Z>
<W>1200</W>
<H>50</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Static1>
<Text1>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>48</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENNAMES_TITLE</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<ButtonNext>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>985</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_NEXT</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonNext>
<ButtonBack>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_BACK</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonBack>
<ButtonPlayerDestination>
<!--<Skin>: Texture name-->
<Skin>CoverTile</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>CoverTile</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>0</X>
<Y>0</Y>
<Z>0,00</Z>
<W>100</W>
<H>100</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>50</X>
<Y>102</Y>
<!--<H>: Text height-->
<H>20</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>98</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonPlayerDestination>
<ButtonPlayerChoose>
<!--<Skin>: Texture name-->
<Skin>CoverTile</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>CoverTile</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>0</X>
<Y>0</Y>
<Z>0,00</Z>
<W>100</W>
<H>100</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>50</X>
<Y>102</Y>
<!--<H>: Text height-->
<H>20</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>98</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonPlayerChoose>
</PartyScreenChallengeNames>
</root>
+22 -2
View File
@@ -96,8 +96,14 @@ or from the console:
-SongPath [Path] : Deprecated, see SongFolder [Path]. This alias is provided for convenience.
-PlaylistFolder [Path] : Use [Path] as playlist folder. The path needs to be an absolute path. Vocaluxe will
load playlist from this path.
Example:
Vocaluxe.exe -PlaylistFolder D:\MyPlaylists
Complete example:
Vocaluxe.exe -ConfigFile MyConfig.xml -ScoreFile C:\Vocaluxe\Highscores\MyHighscoreDB.sqlite -SongFolder D:\MySongCollection
Vocaluxe.exe -ConfigFile MyConfig.xml -ScoreFile C:\Vocaluxe\Highscores\MyHighscoreDB.sqlite -SongFolder D:\MySongCollection -PlaylistFolder D:\MyPlaylists
=================================
@@ -115,14 +121,28 @@ Vocaluxe.exe -ConfigFile MyConfig.xml -ScoreFile C:\Vocaluxe\Highscores\MyHighsc
to change the size and position of the element on the screens. You can save
your changes with [S] before leaving the theme edit mode.
[TAB] to open the background music controls (not on all screens).
[SHIFT] + [+] to increase volume
[SHIFT] + [-] to decrease volume
Songscreen
Song screen
[CTRL] + [R] to select a random song
[F3] to open/close the song search menu
[A] to sing all songs
[SHIFT] + [A] to sing all songs from a category
[SPACE] to open/close the song menu
Name selection screen
[1]..[6] to activate player selection.
[Cursor] to select a profile.
[Enter] to confirm a selection.
Sing screen
[P] to toggle pause.
[CTRL] + [S] to skip a song if there is another one in the playlist.
[T] to change the time format of the timer.
[I] to change view of player information.
[W] to activate the configured webcam.
=================================
= 5. Help & Suppport =
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@@ -86,6 +86,63 @@
<Height>26</Height>
</SReflection>
</ButtonSing>
<ButtonParty>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>355</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENMAIN_BUTTON_PARTY</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonParty>
<ButtonOptions>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -0,0 +1,654 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<ScreenParty>
<ScreenVersion>1</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
<!--<Video>: Background video name-->
<Video>BG_Video</Video>
<!--<Skin>: Background Texture name-->
<Skin>BG_Default</Skin>
<!--<Color>: Background color for type "Color" from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>BackgroundColor</Color>
</Background1>
<Static1>
<!--<Skin>: Texture name-->
<Skin>Menu</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>40</X>
<Y>40</Y>
<Z>0,00</Z>
<W>1200</W>
<H>50</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Static1>
<Text1>
<!--<X>, <Y>: Text position-->
<X>640</X>
<Y>48</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_TITLE</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<Text2>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>105</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_MODES</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text2>
<Text3>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>165</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_DESCRIPTION</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text3>
<Text4>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>225</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_TARGETAUDIENCE</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text4>
<Text5>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>285</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_NUMTEAMS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text5>
<Text6>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>345</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_NUMPLAYERS</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text6>
<Text7>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>405</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_AUTHOR</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text7>
<Text8>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>465</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_VERSION</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text8>
<TextDescription>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>165</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text></Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextDescription>
<TextTargetAudience>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>225</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text></Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextTargetAudience>
<TextNumTeams>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>285</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text></Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextNumTeams>
<TextNumPlayers>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>345</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text></Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextNumPlayers>
<TextAuthor>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>405</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text></Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextAuthor>
<TextVersion>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>465</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text></Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextVersion>
<TextError>
<!--<X>, <Y>: Text position-->
<X>850</X>
<Y>525</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>600</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>TextWarningColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPARTY_ERROR</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextError>
<SelectSlideModes>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>SelectSlide</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>500</X>
<Y>100</Y>
<Z>0,00</Z>
<W>700</W>
<H>50</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>505</ArrowLeftX>
<ArrowLeftY>105</ArrowLeftY>
<ArrowLeftZ>0,00</ArrowLeftZ>
<ArrowLeftW>40</ArrowLeftW>
<ArrowLeftH>40</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>1170</ArrowRightX>
<ArrowRightY>105</ArrowRightY>
<ArrowRightZ>0,00</ArrowRightZ>
<ArrowRightW>40</ArrowRightW>
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
<!--<ArrowSColor>: Selected arrow color from ColorScheme (high priority)-->
<!--or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)-->
<ArrowSColor>ArrowSColor</ArrowSColor>
<!--<TextColor>: Text color from ColorScheme (high priority)-->
<!--or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)-->
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>600</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>1</NumVisible>
</SelectSlideModes>
<ButtonStart>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>985</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_START</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonStart>
<ButtonExit>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_EXIT</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonExit>
</ScreenParty>
</root>
@@ -228,6 +228,186 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextOptionsTitle>
<TextPlayer1>
<!--<X>, <Y>: Text position-->
<X>1070</X>
<Y>65</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player1</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player1</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer1>
<TextPlayer2>
<!--<X>, <Y>: Text position-->
<X>1070</X>
<Y>135</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player2</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player2</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer2>
<TextPlayer3>
<!--<X>, <Y>: Text position-->
<X>1070</X>
<Y>205</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player3</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player3</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer3>
<TextPlayer4>
<!--<X>, <Y>: Text position-->
<X>1070</X>
<Y>275</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player4</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player4</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer4>
<TextPlayer5>
<!--<X>, <Y>: Text position-->
<X>1070</X>
<Y>345</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player5</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player5</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer5>
<TextPlayer6>
<!--<X>, <Y>: Text position-->
<X>1070</X>
<Y>415</Y>
<!--<Z>: Text position-->
<Z>-2,11</Z>
<!--<H>: Text height-->
<H>50</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>350</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player6</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player6</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</TextPlayer6>
<ButtonOptionsClose>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -669,6 +849,357 @@
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonOpenOptions>
<ButtonJoker1>
<!--<Skin>: Texture name-->
<Skin>Random</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Random</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>980</X>
<Y>50</Y>
<Z>-1,01</Z>
<W>80</W>
<H>80</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player1Dim</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player1</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>40</X>
<Y>20</Y>
<!--<H>: Text height-->
<H>40</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>60</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonJoker1>
<ButtonJoker2>
<!--<Skin>: Texture name-->
<Skin>Random</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Random</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>980</X>
<Y>120</Y>
<Z>-1,01</Z>
<W>80</W>
<H>80</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player2Dim</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player2</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>40</X>
<Y>20</Y>
<!--<H>: Text height-->
<H>40</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>60</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonJoker2>
<ButtonJoker3>
<!--<Skin>: Texture name-->
<Skin>Random</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Random</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>980</X>
<Y>190</Y>
<Z>-1,01</Z>
<W>80</W>
<H>80</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player3Dim</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player3</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>40</X>
<Y>20</Y>
<!--<H>: Text height-->
<H>40</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>60</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonJoker3>
<ButtonJoker4>
<!--<Skin>: Texture name-->
<Skin>Random</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Random</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>980</X>
<Y>260</Y>
<Z>-1,01</Z>
<W>80</W>
<H>80</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player4Dim</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player4</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>40</X>
<Y>20</Y>
<!--<H>: Text height-->
<H>40</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>60</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonJoker4>
<ButtonJoker5>
<!--<Skin>: Texture name-->
<Skin>Random</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Random</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>980</X>
<Y>330</Y>
<Z>-1,01</Z>
<W>80</W>
<H>80</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player5Dim</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player5</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>40</X>
<Y>20</Y>
<!--<H>: Text height-->
<H>40</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>60</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonJoker5>
<ButtonJoker6>
<!--<Skin>: Texture name-->
<Skin>Random</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Random</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>980</X>
<Y>400</Y>
<Z>-1,01</Z>
<W>80</W>
<H>80</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>Player6Dim</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>Player6</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>40</X>
<Y>20</Y>
<!--<H>: Text height-->
<H>40</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>60</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonJoker6>
<ButtonStart>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>985</X>
<Y>500</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_BUTTON_START</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonStart>
<SelectSlideOptionsMode>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
+1
View File
@@ -335,6 +335,7 @@
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
<Random>Random.png</Random>
</Skins>
<Videos>
<BG_Video>[Blue]BG_Video.mp4</BG_Video>
+1
View File
@@ -329,6 +329,7 @@
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
<Random>Random.png</Random>
</Skins>
<Videos>
<BG_Video>[Green]BG_Video.mp4</BG_Video>
+1
View File
@@ -329,6 +329,7 @@
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
<Random>Random.png</Random>
</Skins>
<Videos>
<BG_Video>[Red]BG_Video.mp4</BG_Video>
+1
View File
@@ -329,6 +329,7 @@
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
<Random>Random.png</Random>
</Skins>
<Videos>
<BG_Video>[Yellow]BG_Video.mp4</BG_Video>
Binary file not shown.
Binary file not shown.
+251
View File
@@ -0,0 +1,251 @@
using System;
using System.Collections.Generic;
using System.Text;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
{
public class ChallengeRounds
{
private Random _Rand;
private int _NumPlayer;
public List<Combination> Rounds;
public ChallengeRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce)
{
Rounds = new List<Combination>();
_Rand = new Random(System.DateTime.Now.Millisecond);
if (NumPlayerAtOnce < 1 || NumRounds < 1 || NumPlayer == 0)
_NumPlayer = 0;
else
{
_NumPlayer = NumPlayer;
BuildRounds(NumRounds, NumPlayerAtOnce, _Rand);
}
}
public Combination GetRound(int RoundNr)
{
if (RoundNr >= Rounds.Count || _NumPlayer == 0 || Rounds.Count == 0)
return null;
return Rounds[RoundNr];
}
private void BuildRounds(int NumRounds, int NumPlayerAtOnce, Random Rand)
{
Combinations Combinations = new Combinations(_NumPlayer, NumPlayerAtOnce, Rand);
Rounds.Add(Combinations.GetNextCombination(null));
for (int i = 1; i < NumRounds; i++)
{
Rounds.Add(Combinations.GetNextCombination(GetPlayerDemand(i)));
}
}
private List<int> GetPlayerDemand(int RoundIndex)
{
List<int> NumPlayed = new List<int>(_NumPlayer);
for (int i = 0; i < _NumPlayer; i++)
{
NumPlayed.Add(0);
}
for (int i = 0; i < RoundIndex; i++)
{
foreach (int PlayerIndex in Rounds[i].Player)
{
NumPlayed[PlayerIndex]++;
}
}
int max = 0;
foreach (int p in NumPlayed)
{
if (p > max)
max = p;
}
int num = Rounds[0].Player.Count;
List<int> result = new List<int>();
List<int> other = new List<int>();
List<int> last = new List<int>();
for (int i = 0; i < NumPlayed.Count; i++)
{
if (NumPlayed[i] == 0 || NumPlayed[i] < max)
result.Add(i);
else
{
if (RoundIndex > 0)
{
if (!Rounds[RoundIndex - 1].IsAvailable(i))
other.Add(i);
else
last.Add(i);
}
else
last.Add(i);
}
}
while (result.Count < num && other.Count > 0)
{
int n = other.Count;
int r = _Rand.Next(n);
result.Add(other[r]);
other.RemoveAt(r);
}
while (result.Count < num)
{
int n = last.Count;
int r = _Rand.Next(n);
result.Add(last[r]);
last.RemoveAt(r);
}
result.Sort();
return result;
}
}
class Combinations
{
private List<Combination> _Combs;
private Random _Rand;
private int _NumPlayer;
private int _NumMics;
public Combinations(int NumPlayer, int NumMics, Random Rand)
{
_Combs = new List<Combination>();
_NumMics = NumMics;
_NumPlayer = NumPlayer;
_Rand = Rand;
}
public Combination GetNextCombination(List<int> PlayerNrDemand)
{
if (_Combs.Count == 0)
Create();
Combination combs = new Combination();
if (_NumPlayer == _NumMics)
{
return _Combs[0];
}
//filter against PlayerNrDemand
List<Combination> combsFiltered = new List<Combination>();
if (PlayerNrDemand != null)
{
for (int i = 0; i < _Combs.Count; i++)
{
if (_Combs[i].IsAvailableAll(PlayerNrDemand))
combsFiltered.Add(_Combs[i]);
}
}
//1st fallback
if (PlayerNrDemand != null && combsFiltered.Count == 0)
{
for (int i = 0; i < _Combs.Count; i++)
{
if (_Combs[i].IsAvailableSomeone(PlayerNrDemand))
combsFiltered.Add(_Combs[i]);
}
}
//2nd fallback
if (combsFiltered.Count == 0)
{
for (int i = 0; i < _Combs.Count; i++)
{
combsFiltered.Add(_Combs[i]);
}
}
int num = combsFiltered.Count;
int rand = _Rand.Next(num);
Combination c = new Combination();
for (int i = 0; i < combsFiltered[rand].Player.Count; i++)
{
c.Player.Add(combsFiltered[rand].Player[i]);
}
_Combs.Remove(combsFiltered[rand]);
return combsFiltered[rand];
}
private void Create()
{
_Combs.Clear();
int num = (int)Math.Pow(2, _NumPlayer);
for (int i = 1; i <= num; i++)
{
Combination c = new Combination();
for (int j = 0; j < _NumPlayer; j++)
{
if ((i & (1 << j)) > 0)
{
c.Player.Add(j);
}
}
if (c.Player.Count == _NumMics)
_Combs.Add(c);
}
}
}
public class Combination
{
public List<int> Player;
public Combination()
{
Player = new List<int>();
}
public bool IsAvailable(int PlayerIndex)
{
foreach (int p in Player)
{
if (p == PlayerIndex)
return true;
}
return false;
}
public bool IsAvailableAll(List<int> PlayerIndices)
{
bool result = true;
foreach (int p in PlayerIndices)
{
result &= IsAvailable(p);
}
return result;
}
public bool IsAvailableSomeone(List<int> PlayerIndices)
{
bool result = false;
foreach (int p in PlayerIndices)
{
result |= IsAvailable(p);
}
return result;
}
}
}
+612
View File
@@ -0,0 +1,612 @@
using System;
using System.Collections.Generic;
using System.Text;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
{
#region Communication
#region ToScreen
public struct DataToScreenConfig
{
public int NumPlayer;
public int NumPlayerAtOnce;
public int NumRounds;
}
public struct DataToScreenNames
{
public int NumPlayer;
public List<int> ProfileIDs;
}
public struct DataToScreenMain
{
public int CurrentRoundNr;
public int NumPlayerAtOnce;
public List<Combination> Combs;
public List<ResultTableRow> ResultTable;
}
public class ResultTableRow : IComparable
{
public int PlayerID;
public int NumPlayed;
public int NumWon;
public int NumDrawn;
public int NumLost;
public int SumSingPoints;
public int NumGamePoints;
public int CompareTo(object obj)
{
if (obj is ResultTableRow)
{
ResultTableRow row = (ResultTableRow)obj;
int res = row.NumGamePoints.CompareTo(NumGamePoints);
if (res == 0)
{
res = row.SumSingPoints.CompareTo(SumSingPoints);
if (res == 0)
{
res = row.NumWon.CompareTo(NumWon);
}
}
return res;
}
throw new ArgumentException("object is not a ResultTableRow");
}
}
#endregion ToScreen
#region FromScreen
public struct DataFromScreen
{
public FromScreenConfig ScreenConfig;
public FromScreenNames ScreenNames;
public FromScreenMain ScreenMain;
}
public struct FromScreenConfig
{
public int NumPlayer;
public int NumPlayerAtOnce;
public int NumRounds;
}
public struct FromScreenNames
{
public bool FadeToConfig;
public bool FadeToMain;
public List<int> ProfileIDs;
}
public struct FromScreenMain
{
public bool FadeToSongSelection;
}
#endregion FromScreen
#endregion Communication
public sealed class PartyModeChallenge : CPartyMode
{
private const int MaxPlayer = 12;
private const int MinPlayer = 1;
private const int MaxTeams = 0;
private const int MinTeams = 0;
private const int MaxNumRounds = 100;
enum EStage
{
NotStarted,
Config,
Names,
Main,
Singing
}
struct Data
{
public int NumPlayer;
public int NumPlayerAtOnce;
public int NumRounds;
public List<int> ProfileIDs;
public ChallengeRounds Rounds;
public List<ResultTableRow> ResultTable;
public int CurrentRoundNr;
}
struct Stats
{
public int ProfileID;
public int SingPoints;
public int GamePoints;
public int Won;
public int Drawn;
public int Lost;
}
private DataToScreenConfig ToScreenConfig;
private DataToScreenNames ToScreenNames;
private DataToScreenMain ToScreenMain;
private Data GameData;
private EStage _Stage;
public PartyModeChallenge()
{
_ScreenSongOptions.Selection.RandomOnly = false;
_ScreenSongOptions.Selection.PartyMode = true;
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
_ScreenSongOptions.Sorting.SearchString = String.Empty;
_ScreenSongOptions.Sorting.SearchStringVisible = false;
_ScreenSongOptions.Sorting.ShowDuetSongs = false;
_Stage = EStage.NotStarted;
ToScreenConfig = new DataToScreenConfig();
ToScreenNames = new DataToScreenNames();
ToScreenMain = new DataToScreenMain();
GameData = new Data();
GameData.NumPlayer = 4;
GameData.NumPlayerAtOnce = 2;
GameData.NumRounds = 2;
GameData.CurrentRoundNr = 1;
GameData.ProfileIDs = new List<int>();
}
public override bool Init()
{
_Stage = EStage.NotStarted;
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
_ScreenSongOptions.Sorting.SongSorting = ESongSorting.TR_CONFIG_FOLDER;
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
ToScreenMain.ResultTable = new List<ResultTableRow>();
GameData.ResultTable = new List<ResultTableRow>();
return true;
}
public override void DataFromScreen(string ScreenName, Object Data)
{
DataFromScreen data = new DataFromScreen();
switch (ScreenName)
{
case "PartyScreenChallengeConfig":
try
{
data = (DataFromScreen)Data;
GameData.NumPlayer = data.ScreenConfig.NumPlayer;
GameData.NumPlayerAtOnce = data.ScreenConfig.NumPlayerAtOnce;
GameData.NumRounds = data.ScreenConfig.NumRounds;
_Stage = EStage.Config;
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
}
catch (Exception e)
{
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
}
break;
case "PartyScreenChallengeNames":
try
{
data = (DataFromScreen)Data;
if (data.ScreenNames.FadeToConfig)
_Stage = EStage.NotStarted;
else
{
GameData.ProfileIDs = data.ScreenNames.ProfileIDs;
_Stage = EStage.Names;
}
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
}
catch (Exception e)
{
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
}
break;
case "PartyScreenChallengeMain":
try
{
data = (DataFromScreen)Data;
if (data.ScreenMain.FadeToSongSelection)
_Stage = EStage.Singing;
}
catch (Exception e)
{
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
}
if (_Stage == EStage.Singing)
StartNextRound();
break;
default:
_Base.Log.LogError("Error in party mode challenge. Wrong screen is sending: " + ScreenName);
break;
}
}
public override void UpdateGame()
{
if (_Base.Songs.GetCurrentCategoryIndex() != -1)
_ScreenSongOptions.Selection.RandomOnly = true;
else
_ScreenSongOptions.Selection.RandomOnly = false;
}
public override CMenuParty GetNextPartyScreen(out EScreens AlternativeScreen)
{
CMenuParty Screen = null;
AlternativeScreen = EScreens.ScreenSong;
switch (_Stage)
{
case EStage.NotStarted:
_Screens.TryGetValue("PartyScreenChallengeConfig", out Screen);
if (_Screens != null)
{
ToScreenConfig.NumPlayer = GameData.NumPlayer;
ToScreenConfig.NumPlayerAtOnce = GameData.NumPlayerAtOnce;
ToScreenConfig.NumRounds = GameData.NumRounds;
Screen.DataToScreen(ToScreenConfig);
}
break;
case EStage.Config:
_Screens.TryGetValue("PartyScreenChallengeNames", out Screen);
if (_Screens != null)
{
ToScreenNames.NumPlayer = GameData.NumPlayer;
ToScreenNames.ProfileIDs = GameData.ProfileIDs;
Screen.DataToScreen(ToScreenNames);
}
break;
case EStage.Names:
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
if (_Screens != null)
{
_Base.Songs.ResetPartySongSung();
GameData.Rounds = new ChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
GameData.CurrentRoundNr = 1;
ToScreenMain.CurrentRoundNr = 1;
ToScreenMain.NumPlayerAtOnce = GameData.NumPlayerAtOnce;
ToScreenMain.Combs = GameData.Rounds.Rounds;
UpdateScores();
ToScreenMain.ResultTable = GameData.ResultTable;
Screen.DataToScreen(ToScreenMain);
}
break;
case EStage.Main:
//nothing to do
break;
case EStage.Singing:
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
if (_Screens != null)
{
UpdateScores();
ToScreenMain.CurrentRoundNr = GameData.CurrentRoundNr;
ToScreenMain.Combs = GameData.Rounds.Rounds;
Screen.DataToScreen(ToScreenMain);
}
break;
default:
break;
}
return Screen;
}
public override EScreens GetStartScreen()
{
return EScreens.ScreenPartyDummy;
}
public override EScreens GetMainScreen()
{
return EScreens.ScreenPartyDummy;
}
public override ScreenSongOptions GetScreenSongOptions()
{
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
_ScreenSongOptions.Sorting.Tabs = _Base.Config.GetTabs();
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
return _ScreenSongOptions;
}
public override void SetSearchString(string SearchString, bool Visible)
{
_ScreenSongOptions.Sorting.SearchString = SearchString;
_ScreenSongOptions.Sorting.SearchStringVisible = Visible;
}
public override int GetMaxPlayer()
{
return MaxPlayer;
}
public override int GetMinPlayer()
{
return MinPlayer;
}
public override int GetMaxTeams()
{
return MaxTeams;
}
public override int GetMinTeams()
{
return MinTeams;
}
public override int GetMaxNumRounds()
{
return MaxNumRounds;
}
public override void JokerUsed(int TeamNr)
{
if (_ScreenSongOptions.Selection.NumJokers == null)
return;
if (TeamNr >= _ScreenSongOptions.Selection.NumJokers.Length)
return;
if (!_ScreenSongOptions.Selection.CategoryChangeAllowed)
_ScreenSongOptions.Selection.NumJokers[TeamNr]--;
_ScreenSongOptions.Selection.RandomOnly = true;
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
}
public override void SongSelected(int SongID)
{
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
_Base.Game.Reset();
_Base.Game.ClearSongs();
_Base.Game.AddSong(SongID, gm);
_Base.Game.SetNumPlayer(GameData.NumPlayerAtOnce);
SPlayer[] player = _Base.Game.GetPlayer();
if (player == null)
return;
if (player.Length < GameData.NumPlayerAtOnce)
return;
SProfile[] profiles = _Base.Profiles.GetProfiles();
Combination c = GameData.Rounds.GetRound(GameData.CurrentRoundNr - 1);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
//default values
player[i].Name = "foobar";
player[i].Difficulty = EGameDifficulty.TR_CONFIG_EASY;
player[i].ProfileID = -1;
//try to fill with the right data
if (c != null)
{
if (GameData.ProfileIDs[c.Player[i]] < profiles.Length)
{
player[i].Name = profiles[GameData.ProfileIDs[c.Player[i]]].PlayerName;
player[i].Difficulty = profiles[GameData.ProfileIDs[c.Player[i]]].Difficulty;
player[i].ProfileID = GameData.ProfileIDs[c.Player[i]];
}
}
}
_Base.Songs.AddPartySongSung(SongID);
_Base.Graphics.FadeTo(EScreens.ScreenSing);
}
public override void LeavingHighscore()
{
//TODO:
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
}
private void StartNextRound()
{
_ScreenSongOptions.Selection.RandomOnly = false;
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
GameData.CurrentRoundNr++;
SetNumJokers();
SetTeamNames();
_Base.Graphics.FadeTo(EScreens.ScreenSong);
}
private void SetNumJokers()
{
switch (GameData.NumPlayerAtOnce)
{
case 1:
_ScreenSongOptions.Selection.NumJokers = new int[] { 10 };
break;
case 2:
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
break;
case 3:
_ScreenSongOptions.Selection.NumJokers = new int[] { 4, 4, 4 };
break;
case 4:
_ScreenSongOptions.Selection.NumJokers = new int[] { 3, 3, 3, 3 };
break;
case 5:
_ScreenSongOptions.Selection.NumJokers = new int[] { 2, 2, 2, 2, 2 };
break;
case 6:
_ScreenSongOptions.Selection.NumJokers = new int[] { 2, 2, 2, 2, 2, 2 };
break;
default:
_ScreenSongOptions.Selection.NumJokers = new int[] { 5, 5 };
break;
}
}
private void SetTeamNames()
{
SProfile[] profiles = _Base.Profiles.GetProfiles();
if (profiles == null)
{
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
return;
}
if (GameData.NumPlayerAtOnce < 1 || GameData.ProfileIDs.Count < GameData.NumPlayerAtOnce || profiles.Length < GameData.NumPlayerAtOnce)
{
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
return;
}
_ScreenSongOptions.Selection.TeamNames = new string[GameData.NumPlayerAtOnce];
Combination c = GameData.Rounds.GetRound(GameData.CurrentRoundNr - 1);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
if (c != null)
{
if (GameData.ProfileIDs[c.Player[i]] < profiles.Length)
_ScreenSongOptions.Selection.TeamNames[i] = profiles[GameData.ProfileIDs[c.Player[i]]].PlayerName;
else
_ScreenSongOptions.Selection.TeamNames[i] = "foobar";
}
else
_ScreenSongOptions.Selection.TeamNames[i] = "foobar";
}
}
private void UpdateScores()
{
if (GameData.ResultTable.Count == 0)
{
for (int i = 0; i < GameData.NumPlayer; i++)
{
ResultTableRow row = new ResultTableRow();
row.PlayerID = GameData.ProfileIDs[i];
row.NumPlayed = 0;
row.NumWon = 0;
row.NumDrawn = 0;
row.NumLost = 0;
row.SumSingPoints = 0;
row.NumGamePoints = 0;
GameData.ResultTable.Add(row);
}
}
else
{
SPlayer[] results = _Base.Game.GetPlayer();
if (results == null)
return;
if (results.Length < GameData.NumPlayerAtOnce)
return;
List<Stats> points = GetPointsForPlayer(results);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
int index = -1;
for (int j = 0; j < GameData.ResultTable.Count; j++)
{
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID)
{
index = j;
break;
}
}
if (index != -1)
{
ResultTableRow row = GameData.ResultTable[index];
row.NumPlayed++;
row.NumWon += points[i].Won;
row.NumDrawn += points[i].Drawn;
row.NumLost += points[i].Lost;
row.SumSingPoints += points[i].SingPoints;
row.NumGamePoints += points[i].GamePoints;
GameData.ResultTable[index] = row;
}
}
}
GameData.ResultTable.Sort();
}
private List<Stats> GetPointsForPlayer(SPlayer[] Results)
{
List<Stats> result = new List<Stats>();
for(int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
Stats stat = new Stats();
stat.ProfileID = Results[i].ProfileID;
stat.SingPoints = (int)Results[i].Points;
stat.Won = 0;
stat.Drawn = 0;
stat.Lost = 0;
stat.GamePoints = 0;
result.Add(stat);
}
result.Sort(delegate(Stats s1, Stats s2) { return s1.SingPoints.CompareTo(s2.SingPoints); });
int current = result[result.Count - 1].SingPoints;
int points = result.Count;
for (int i = result.Count - 1; i >= 0; i--)
{
Stats res = result[i];
if (i < result.Count - 1)
{
if (current > res.SingPoints)
{
res.GamePoints = i * 2;
}
else
res.GamePoints = points;
}
else
res.GamePoints = i * 2;
current = res.SingPoints;
points = res.GamePoints;
result[i] = res;
}
return result;
}
}
}
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6F3E1874-F28A-40E9-AFBD-31934D593679}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PartyModeChallenge</RootNamespace>
<AssemblyName>PartyModeChallenge</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWin|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugLinux|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseLinux|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|x64'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Output\PartyModes\Challenge\Code</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="ChallengeRounds.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyModeChallenge.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeConfig.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeMain.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyScreenChallengeNames.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,257 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
{
public class PartyScreenChallengeConfig : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
const string SelectSlideNumMics = "SelectSlideNumMics";
const string SelectSlideNumRounds = "SelectSlideNumRounds";
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
private int _MaxNumMics = 2;
private int _MaxNumRounds = 100;
private int _RoundSteps = 1;
DataFromScreen Data;
public PartyScreenChallengeConfig()
{
}
protected override void Init()
{
base.Init();
_ThemeName = "PartyScreenChallengeConfig";
_ThemeSelectSlides = new string[] { SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds };
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
_ScreenVersion = ScreenVersion;
Data = new DataFromScreen();
FromScreenConfig config = new FromScreenConfig();
config.NumPlayer = 4;
config.NumPlayerAtOnce = 2;
config.NumRounds = 12;
Data.ScreenConfig = config;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenConfig config = new DataToScreenConfig();
try
{
config = (DataToScreenConfig)ReceivedData;
Data.ScreenConfig.NumPlayer = config.NumPlayer;
Data.ScreenConfig.NumPlayerAtOnce = config.NumPlayerAtOnce;
Data.ScreenConfig.NumRounds = config.NumRounds;
}
catch (Exception e)
{
_Base.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
}
}
public override bool HandleInput(KeyEvent KeyEvent)
{
base.HandleInput(KeyEvent);
if (KeyEvent.KeyPressed)
{
}
else
{
switch (KeyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
Back();
break;
case Keys.Enter:
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
Next();
break;
case Keys.Left:
UpdateSlides();
break;
case Keys.Right:
UpdateSlides();
break;
}
}
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
{
base.HandleMouse(MouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
UpdateSlides();
if (Buttons[htButtons(ButtonBack)].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
Next();
}
if (MouseEvent.RB)
{
Back();
}
return true;
}
public override void OnShow()
{
base.OnShow();
_MaxNumMics = _Base.Config.GetMaxNumMics();
if (_MaxNumMics > 6)
_MaxNumMics = 6;
_MaxNumRounds = _PartyMode.GetMaxNumRounds();
RebuildSlides();
}
public override bool UpdateGame()
{
return true;
}
public override bool Draw()
{
base.Draw();
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void RebuildSlides()
{
// build num player slide (min player ... max player);
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
{
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection = Data.ScreenConfig.NumPlayer - _PartyMode.GetMinPlayer();
UpdateMicsAtOnce();
SetRoundSteps();
UpdateSlideRounds();
}
private void UpdateSlides()
{
int player = Data.ScreenConfig.NumPlayer;
int mics = Data.ScreenConfig.NumPlayerAtOnce;
Data.ScreenConfig.NumPlayer = SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + _PartyMode.GetMinPlayer();
Data.ScreenConfig.NumRounds = (SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1) * _RoundSteps;
UpdateMicsAtOnce();
SetRoundSteps();
if (player != Data.ScreenConfig.NumPlayer || mics != Data.ScreenConfig.NumPlayerAtOnce)
{
int num = CHelper.nCk(Data.ScreenConfig.NumPlayer, Data.ScreenConfig.NumPlayerAtOnce);
while (num > _MaxNumRounds)
{
num -= _RoundSteps;
}
Data.ScreenConfig.NumRounds = num;
}
UpdateSlideRounds();
}
private void UpdateMicsAtOnce()
{
//Data.ScreenConfig.NumPlayerAtOnce
int MaxNum = _MaxNumMics;
if (Data.ScreenConfig.NumPlayer < _MaxNumMics)
MaxNum = Data.ScreenConfig.NumPlayer;
if (Data.ScreenConfig.NumPlayerAtOnce > MaxNum)
Data.ScreenConfig.NumPlayerAtOnce = MaxNum;
// build mics at once slide
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
for (int i = 1; i <= MaxNum; i++)
{
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - _PartyMode.GetMinPlayer();
}
private void UpdateSlideRounds()
{
// build num rounds slide
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
for (int i = _RoundSteps; i <= _MaxNumRounds; i += _RoundSteps)
{
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
}
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection = Data.ScreenConfig.NumRounds / _RoundSteps - 1;
}
private void SetRoundSteps()
{
if (Data.ScreenConfig.NumPlayerAtOnce < 1 || Data.ScreenConfig.NumPlayer < 1 || Data.ScreenConfig.NumPlayerAtOnce > Data.ScreenConfig.NumPlayer)
{
_RoundSteps = 1;
return;
}
int res = Data.ScreenConfig.NumPlayer / Data.ScreenConfig.NumPlayerAtOnce;
int mod = Data.ScreenConfig.NumPlayer % Data.ScreenConfig.NumPlayerAtOnce;
if (mod == 0)
_RoundSteps = res;
else
_RoundSteps = Data.ScreenConfig.NumPlayer;
}
private void Back()
{
FadeTo(EScreens.ScreenParty);
}
private void Next()
{
_PartyMode.DataFromScreen(_ThemeName, Data);
}
}
}
@@ -0,0 +1,235 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
{
struct TableRow
{
public CText Pos;
public CText Name;
public CText Won;
public CText Drawn;
public CText Lost;
public CText SingPoints;
public CText GamePoints;
}
public class PartyScreenChallengeMain : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
const string TextPosition = "TextPosition";
const string TextPlayerName = "TextPlayerName";
const string TextWon = "TextWon";
const string TextDrawn = "TextDrawn";
const string TextLost = "TextLost";
const string TextSingPoints = "TextSingPoints";
const string TextGamePoints = "TextGamePoints";
const string ButtonNextRound = "ButtonNextRound";
private DataFromScreen Data;
private DataToScreenMain GameState;
private List<TableRow> Table;
public PartyScreenChallengeMain()
{
Data = new DataFromScreen();
Data.ScreenMain = new FromScreenMain();
}
protected override void Init()
{
base.Init();
_ThemeName = "PartyScreenChallengeMain";
_ThemeTexts = new string[] { TextPosition, TextPlayerName, TextWon, TextDrawn, TextLost, TextSingPoints, TextGamePoints };
_ThemeButtons = new string[] { "ButtonNextRound" };
_ScreenVersion = ScreenVersion;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
GameState = new DataToScreenMain();
BuildTable();
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenMain data = new DataToScreenMain();
try
{
data = (DataToScreenMain)ReceivedData;
GameState = data;
}
catch (Exception e)
{
_Base.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
}
}
public override bool HandleInput(KeyEvent KeyEvent)
{
base.HandleInput(KeyEvent);
if (KeyEvent.KeyPressed)
{
}
else
{
switch (KeyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
EndParty();
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonNextRound)].Selected)
NextRound();
break;
}
}
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
{
base.HandleMouse(MouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonNextRound)].Selected)
NextRound();
}
if (MouseEvent.RB)
{
EndParty();
}
return true;
}
public override void OnShow()
{
base.OnShow();
Updatetable();
}
public override bool UpdateGame()
{
return true;
}
public override bool Draw()
{
base.Draw();
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void NextRound()
{
Data.ScreenMain.FadeToSongSelection = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
}
private void EndParty()
{
//TODO
}
private void BuildTable()
{
Table = new List<TableRow>();
float delta = Texts[htTexts(TextPosition)].Height * 1.2f;
for (int i = 0; i < _PartyMode.GetMaxPlayer(); i++)
{
TableRow row = new TableRow();
row.Pos = GetNewText(Texts[htTexts(TextPosition)]);
row.Name = GetNewText(Texts[htTexts(TextPlayerName)]);
row.Won = GetNewText(Texts[htTexts(TextWon)]);
row.Drawn = GetNewText(Texts[htTexts(TextDrawn)]);
row.Lost = GetNewText(Texts[htTexts(TextLost)]);
row.SingPoints = GetNewText(Texts[htTexts(TextSingPoints)]);
row.GamePoints = GetNewText(Texts[htTexts(TextGamePoints)]);
row.Pos.Y += delta * (i + 1);
row.Name.Y += delta * (i + 1);
row.Won.Y += delta * (i + 1);
row.Drawn.Y += delta * (i + 1);
row.Lost.Y += delta * (i + 1);
row.SingPoints.Y += delta * (i + 1);
row.GamePoints.Y += delta * (i + 1);
row.Pos.Text = (i + 1).ToString() + ")";
row.Pos.Visible = false;
row.Name.Visible = false;
row.Won.Visible = false;
row.Drawn.Visible = false;
row.Lost.Visible = false;
row.SingPoints.Visible = false;
row.GamePoints.Visible = false;
AddText(row.Pos);
AddText(row.Name);
AddText(row.Won);
AddText(row.Drawn);
AddText(row.Lost);
AddText(row.SingPoints);
AddText(row.GamePoints);
Table.Add(row);
}
}
private void Updatetable()
{
SProfile[] profiles = _Base.Profiles.GetProfiles();
for (int i = 0; i < Table.Count; i++)
{
if (i < GameState.ResultTable.Count)
{
TableRow row = Table[i];
row.Pos.Visible = true;
row.Name.Visible = true;
row.Won.Visible = true;
row.Drawn.Visible = true;
row.Lost.Visible = true;
row.SingPoints.Visible = true;
row.GamePoints.Visible = true;
row.Name.Text = profiles[GameState.ResultTable[i].PlayerID].PlayerName;
row.Won.Text = GameState.ResultTable[i].NumWon.ToString();
row.Drawn.Text = GameState.ResultTable[i].NumDrawn.ToString();
row.Lost.Text = GameState.ResultTable[i].NumLost.ToString();
row.SingPoints.Text = GameState.ResultTable[i].SumSingPoints.ToString();
row.GamePoints.Text = GameState.ResultTable[i].NumGamePoints.ToString();
}
}
}
}
}
@@ -0,0 +1,531 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Menu;
namespace Vocaluxe.PartyModes
{
public class PartyScreenChallengeNames : CMenuParty
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
const string ButtonNext = "ButtonNext";
const string ButtonBack = "ButtonBack";
const string ButtonPlayerDestination = "ButtonPlayerDestination";
const string ButtonPlayerChoose = "ButtonPlayerChoose";
private List<CPlayerChooseButton> PlayerChooseButtons;
private List<CButton> PlayerDestinationButtons;
//PlayerDestinationButtons-Option
private const int PlayerDestinationButtonsNumH = 3;
private const int PlayerDestinationButtonsNumW = 4;
private const int PlayerDestinationButtonsFirstX = 900;
private const int PlayerDestinationButtonsFirstY = 105;
private const int PlayerDestinationButtonsSpaceH = 15;
private const int PlayerDestinationButtonsSpaceW = 25;
//PlayerChooseButtons-Option
private List<int> PlayerChooseButtonsVisibleProfiles;
private const int PlayerChooseButtonsNumH = 7;
private const int PlayerChooseButtonsNumW = 4;
private const int PlayerChooseButtonsFirstX = 52;
private const int PlayerChooseButtonsFirstY = 105;
private const int PlayerChooseButtonsSpaceH = 15;
private const int PlayerChooseButtonsSpaceW = 25;
private int PlayerChooseButtonsOffset = 0;
private CStatic chooseAvatarStatic;
private bool SelectingMouseActive = false;
private int OldMouseX = 0;
private int OldMouseY = 0;
private int SelectedPlayerNr = -1;
private bool ButtonsAdded = false;
private int NumPlayer = 4;
private DataFromScreen Data;
private class CPlayerChooseButton
{
public CButton Button;
public int ProfileID;
}
public PartyScreenChallengeNames()
{
}
protected override void Init()
{
base.Init();
chooseAvatarStatic = GetNewStatic();
chooseAvatarStatic.Visible = false;
PlayerChooseButtonsVisibleProfiles = new List<int>();
Data.ScreenNames.ProfileIDs = new List<int>();
_ThemeName = "PartyScreenChallengeNames";
List<string> buttons = new List<string>();
_ThemeButtons = new string[] { ButtonBack, ButtonNext, ButtonPlayerDestination, ButtonPlayerChoose };
_ScreenVersion = ScreenVersion;
Data = new DataFromScreen();
FromScreenNames names = new FromScreenNames();
names.FadeToConfig = false;
names.FadeToMain = false;
names.ProfileIDs = new List<int>();
Data.ScreenNames = names;
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override void DataToScreen(object ReceivedData)
{
DataToScreenNames config = new DataToScreenNames();
try
{
config = (DataToScreenNames)ReceivedData;
Data.ScreenNames.ProfileIDs = config.ProfileIDs;
if (Data.ScreenNames.ProfileIDs == null)
Data.ScreenNames.ProfileIDs = new List<int>();
NumPlayer = config.NumPlayer;
while (Data.ScreenNames.ProfileIDs.Count > NumPlayer)
{
Data.ScreenNames.ProfileIDs.RemoveAt(Data.ScreenNames.ProfileIDs.Count - 1);
}
}
catch (Exception e)
{
_Base.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
}
}
public override bool HandleInput(KeyEvent KeyEvent)
{
base.HandleInput(KeyEvent);
if (KeyEvent.KeyPressed)
{
}
else
{
switch (KeyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
Back();
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonBack)].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
Next();
if (!OnAdd())
OnRemove();
break;
case Keys.Delete:
OnRemove();
break;
}
}
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
{
base.HandleMouse(MouseEvent);
/*
//Check if LeftButton is hold and Select-Mode inactive
if (MouseEvent.LBH && !SelectingMouseActive)
{
//Save mouse-coords
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
//Check if mouse if over tile
for (int i = 0; i < PlayerChooseButtons.Count; i++)
{
if (PlayerChooseButtons[i].Button.Selected)
{
SelectedPlayerNr = PlayerChooseButtons[i].ProfileID;
if (SelectedPlayerNr != -1)
{
//Activate mouse-selecting
SelectingMouseActive = true;
//Update of Drag/Drop-Texture
chooseAvatarStatic.Visible = true;
chooseAvatarStatic.Rect = PlayerChooseButtons[i].Button.Rect;
chooseAvatarStatic.Rect.Z = -100;
chooseAvatarStatic.Color = new SColorF(1, 1, 1, 1);
chooseAvatarStatic.Texture = _Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
}
}
}
}*/
//Check if LeftButton is hold and Select-Mode active
if (MouseEvent.LBH && SelectingMouseActive)
{
//Update coords for Drag/Drop-Texture
chooseAvatarStatic.Rect.X += (MouseEvent.X - OldMouseX);
chooseAvatarStatic.Rect.Y += (MouseEvent.Y - OldMouseY);
OldMouseX = MouseEvent.X;
OldMouseY = MouseEvent.Y;
}
// LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar
else if (SelectingMouseActive)
{
//Check if really a player was selected
if (SelectedPlayerNr != -1)
{
//Foreach Drop-Area
for (int i = 0; i < PlayerDestinationButtons.Count; i++)
{
//Check first, if area is "active"
if (PlayerDestinationButtons[i].Visible == true)
{
//Check if Mouse is in area
if (CHelper.IsInBounds(PlayerDestinationButtons[i].Rect, MouseEvent))
{
int added = -1;
//Add Player-ID to list.
if (Data.ScreenNames.ProfileIDs.Count < (i + 1))
{
Data.ScreenNames.ProfileIDs.Add(SelectedPlayerNr);
added = Data.ScreenNames.ProfileIDs.Count - 1;
}
else if (Data.ScreenNames.ProfileIDs.Count >= (i + 1))
{
Data.ScreenNames.ProfileIDs[i] = SelectedPlayerNr;
added = i;
}
UpdateButtonNext();
//Update texture and name
PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
PlayerDestinationButtons[added].Texture = chooseAvatarStatic.Texture;
PlayerDestinationButtons[added].STexture = chooseAvatarStatic.Texture;
PlayerDestinationButtons[added].Text.Text = _Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
//Update Tiles-List
UpdateButtonPlayerChoose();
}
}
}
SelectedPlayerNr = -1;
}
//Reset variables
SelectingMouseActive = false;
chooseAvatarStatic.Visible = false;
}
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonBack)].Selected)
Back();
if (Buttons[htButtons(ButtonNext)].Selected)
Next();
if (!OnAdd())
OnRemove();
}
if (MouseEvent.RB)
{
Back();
}
return true;
}
public override void OnShow()
{
base.OnShow();
if (!ButtonsAdded)
{
AddButtonPlayerDestination();
AddButtonPlayerChoose();
ButtonsAdded = true;
}
UpdateButtonPlayerDestination();
UpdateButtonPlayerChoose();
UpdateButtonNext();
}
public override bool UpdateGame()
{
return true;
}
public override bool Draw()
{
base.Draw();
if (chooseAvatarStatic.Visible)
chooseAvatarStatic.Draw();
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void AddButtonPlayerDestination()
{
Buttons[htButtons(ButtonPlayerDestination)].Visible = false;
PlayerDestinationButtons = new List<CButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerDestination)]);
b.Rect.X = PlayerDestinationButtonsFirstX + column * (b.Rect.W + PlayerDestinationButtonsSpaceH);
b.Rect.Y = PlayerDestinationButtonsFirstY + row * (b.Rect.H + PlayerDestinationButtonsSpaceW);
PlayerDestinationButtons.Add(b);
column++;
if (column >= PlayerDestinationButtonsNumH)
{
row++;
column = 0;
}
b.Visible = true;
b.Enabled = false;
AddButton(b);
}
}
private void AddButtonPlayerChoose()
{
Buttons[htButtons(ButtonPlayerChoose)].Visible = false;
PlayerChooseButtons = new List<CPlayerChooseButton>();
int row = 0;
int column = 0;
for (int i = 1; i <= PlayerChooseButtonsNumH * PlayerChooseButtonsNumW; i++)
{
CButton b = GetNewButton(Buttons[htButtons(ButtonPlayerChoose)]);
b.Rect.X = PlayerChooseButtonsFirstX + column * (b.Rect.W + PlayerChooseButtonsSpaceH);
b.Rect.Y = PlayerChooseButtonsFirstY + row * (b.Rect.H + PlayerChooseButtonsSpaceW);
CPlayerChooseButton pcb = new CPlayerChooseButton();
pcb.Button = b;
pcb.ProfileID = -1;
PlayerChooseButtons.Add(pcb);
column++;
if (column >= PlayerChooseButtonsNumH)
{
row++;
column = 0;
}
b.Visible = true;
b.Enabled = false;
AddButton(b);
}
}
private void UpdateButtonPlayerChoose()
{
UpdateVisibleProfiles();
if ((PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * (PlayerChooseButtonsOffset + 1) - PlayerChooseButtonsVisibleProfiles.Count >= (PlayerChooseButtonsNumW * PlayerChooseButtonsNumH) * PlayerChooseButtonsOffset)
{
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset - 1);
}
else
{
UpdateButtonPlayerChoose(PlayerChooseButtonsOffset);
}
}
private void UpdateButtonPlayerChoose(int Offset)
{
int NumButtonPlayerChoose = PlayerChooseButtonsNumW * PlayerChooseButtonsNumH;
if (Offset < 0)
Offset = 0;
if (NumButtonPlayerChoose * (Offset + 1) - PlayerChooseButtonsVisibleProfiles.Count <= NumButtonPlayerChoose)
{
for (int i = 0; i < NumButtonPlayerChoose; i++)
{
if ((i + Offset * NumButtonPlayerChoose) < PlayerChooseButtonsVisibleProfiles.Count)
{
PlayerChooseButtons[i].ProfileID = PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose];
PlayerChooseButtons[i].Button.Text.Text = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
PlayerChooseButtons[i].Button.Texture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
PlayerChooseButtons[i].Button.STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f);
PlayerChooseButtons[i].Button.SColor = new SColorF(1, 1, 1, 1);
PlayerChooseButtons[i].Button.Enabled = true;
}
else
{
PlayerChooseButtons[i].ProfileID = -1;
PlayerChooseButtons[i].Button.Text.Text = String.Empty;
PlayerChooseButtons[i].Button.Texture = Buttons[htButtons(ButtonPlayerChoose)].Texture;
PlayerChooseButtons[i].Button.STexture = Buttons[htButtons(ButtonPlayerChoose)].STexture;
PlayerChooseButtons[i].Button.Color = Buttons[htButtons(ButtonPlayerChoose)].Color;
PlayerChooseButtons[i].Button.SColor = Buttons[htButtons(ButtonPlayerChoose)].SColor;
PlayerChooseButtons[i].Button.Enabled = false;
}
}
}
}
private void UpdateVisibleProfiles()
{
PlayerChooseButtonsVisibleProfiles.Clear();
for (int i = 0; i < _Base.Profiles.GetProfiles().Length; i++)
{
bool visible = false;
//Show profile only if active
if (_Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
{
visible = true;
for (int p = 0; p < Data.ScreenNames.ProfileIDs.Count; p++)
{
//Don't show profile if is selected, but if selected and guest
if (Data.ScreenNames.ProfileIDs[p] == i && _Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF)
{
visible = false;
break;
}
}
}
if (visible)
{
PlayerChooseButtonsVisibleProfiles.Add(i);
}
}
}
private void UpdateButtonPlayerDestination()
{
for (int i = 0; i < PlayerDestinationButtons.Count; i++)
{
if (NumPlayer > i)
{
PlayerDestinationButtons[i].Visible = true;
PlayerDestinationButtons[i].Enabled = true;
}
else
{
PlayerDestinationButtons[i].Visible = false;
PlayerDestinationButtons[i].Enabled = false;
}
}
for (int i = 0; i < NumPlayer; i++)
{
if (i < Data.ScreenNames.ProfileIDs.Count)
{
if (Data.ScreenNames.ProfileIDs[i] != -1)
{
PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f);
PlayerDestinationButtons[i].SColor = new SColorF(1, 1, 1, 1);
PlayerDestinationButtons[i].Texture = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
PlayerDestinationButtons[i].STexture = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
PlayerDestinationButtons[i].Text.Text = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
PlayerDestinationButtons[i].Enabled = true;
}
}
else
{
PlayerDestinationButtons[i].Color = Buttons[htButtons(ButtonPlayerDestination)].Color;
PlayerDestinationButtons[i].SColor = Buttons[htButtons(ButtonPlayerDestination)].SColor;
PlayerDestinationButtons[i].Texture = Buttons[htButtons(ButtonPlayerDestination)].Texture;
PlayerDestinationButtons[i].STexture = Buttons[htButtons(ButtonPlayerDestination)].STexture;
PlayerDestinationButtons[i].Text.Text = String.Empty;
PlayerDestinationButtons[i].Enabled = false;
}
}
}
private void UpdateButtonNext()
{
if (Data.ScreenNames.ProfileIDs.Count == NumPlayer)
Buttons[htButtons(ButtonNext)].Visible = true;
else
Buttons[htButtons(ButtonNext)].Visible = false;
}
private bool OnAdd()
{
for (int i = 0; i < PlayerChooseButtons.Count; i++)
{
if (PlayerChooseButtons[i].Button.Selected && PlayerChooseButtons[i].ProfileID != -1)
{
if (Data.ScreenNames.ProfileIDs.Count < NumPlayer)
{
Data.ScreenNames.ProfileIDs.Add(PlayerChooseButtons[i].ProfileID);
int added = Data.ScreenNames.ProfileIDs.Count - 1;
UpdateButtonNext();
//Update texture and name
PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
PlayerDestinationButtons[added].Texture = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
PlayerDestinationButtons[added].STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
PlayerDestinationButtons[added].Text.Text = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
PlayerDestinationButtons[added].Enabled = true;
//Update Tiles-List
UpdateButtonPlayerChoose();
CheckInteraction();
return true;
}
}
}
return false;
}
private bool OnRemove()
{
for (int i = 0; i < PlayerDestinationButtons.Count; i++)
{
if (PlayerDestinationButtons[i].Selected)
{
if ((i + 1) <= Data.ScreenNames.ProfileIDs.Count)
{
Data.ScreenNames.ProfileIDs.RemoveAt(i);
UpdateButtonNext();
UpdateButtonPlayerDestination();
UpdateButtonPlayerChoose();
CheckInteraction();
return true;
}
}
}
return false;
}
private void Back()
{
Data.ScreenNames.FadeToConfig = true;
Data.ScreenNames.FadeToMain = false;
_PartyMode.DataFromScreen(_ThemeName, Data);
}
private void Next()
{
Data.ScreenNames.FadeToConfig = false;
Data.ScreenNames.FadeToMain = true;
_PartyMode.DataFromScreen(_ThemeName, Data);
}
}
}
+38 -13
View File
@@ -2,36 +2,61 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
ProjectSection(ProjectDependencies) = postProject
{6F3E1874-F28A-40E9-AFBD-31934D593679} = {6F3E1874-F28A-40E9-AFBD-31934D593679}
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC} = {D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VocaluxeLib", "VocaluxeLib\VocaluxeLib.csproj", "{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PartyModeChallenge", "PartyModeChallenge\PartyModeChallenge.csproj", "{6F3E1874-F28A-40E9-AFBD-31934D593679}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugWin|x64 = DebugWin|x64
DebugWin|x86 = DebugWin|x86
ReleaseWin|x64 = ReleaseWin|x64
ReleaseWin|x86 = ReleaseWin|x86
DebugLinux|x64 = DebugLinux|x64
DebugLinux|x86 = DebugLinux|x86
DebugWin|x64 = DebugWin|x64
DebugWin|x86 = DebugWin|x86
ReleaseLinux|x64 = ReleaseLinux|x64
ReleaseLinux|x86 = ReleaseLinux|x86
ReleaseWin|x64 = ReleaseWin|x64
ReleaseWin|x86 = ReleaseWin|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x64.ActiveCfg = DebugWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x64.Build.0 = DebugWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x86.ActiveCfg = DebugWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x86.Build.0 = DebugWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x64.Build.0 = ReleaseWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x86.Build.0 = ReleaseWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x64.ActiveCfg = DebugLinux|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x64.Build.0 = DebugLinux|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x86.ActiveCfg = DebugLinux|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugLinux|x86.Build.0 = DebugLinux|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x64.ActiveCfg = DebugWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x64.Build.0 = DebugWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x86.ActiveCfg = DebugWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.DebugWin|x86.Build.0 = DebugWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseLinux|x86.Build.0 = ReleaseLinux|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x64.Build.0 = ReleaseWin|x64
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}.ReleaseWin|x86.Build.0 = ReleaseWin|x86
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugLinux|x64.ActiveCfg = DebugLinux|x64
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugLinux|x64.Build.0 = DebugLinux|x64
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugLinux|x86.ActiveCfg = DebugLinux|x86
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugWin|x64.ActiveCfg = DebugWin|x64
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugWin|x64.Build.0 = DebugWin|x64
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.DebugWin|x86.ActiveCfg = DebugWin|x86
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
{6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugLinux|x64.ActiveCfg = DebugLinux|x64
{6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugLinux|x86.ActiveCfg = DebugLinux|x86
{6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugWin|x64.ActiveCfg = DebugWin|x64
{6F3E1874-F28A-40E9-AFBD-31934D593679}.DebugWin|x86.ActiveCfg = DebugWin|x86
{6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64
{6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86
{6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{6F3E1874-F28A-40E9-AFBD-31934D593679}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
File renamed without changes.
File renamed without changes.
+3 -2
View File
@@ -1,14 +1,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.IO;
using Vocaluxe.Base;
using System.Diagnostics;
using Vocaluxe.Lib.Song;
using Vocaluxe.Lib.Draw;
using System.Drawing;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Base
{
+30 -223
View File
@@ -12,183 +12,10 @@ using OpenTK.Platform;
using Vocaluxe.Lib.Sound;
using Vocaluxe.Lib.Webcam;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
#region Enums
public enum ERenderer
{
#if WIN
TR_CONFIG_DIRECT3D,
#endif
TR_CONFIG_OPENGL,
TR_CONFIG_SOFTWARE
}
public enum EAntiAliasingModes
{
x0 = 0,
x2 = 2,
x4 = 4,
x8 = 8,
x16 = 16,
x32 = 32
}
public enum EColorDeep
{
Bit8 = 8,
Bit16 = 16,
Bit24 = 24,
Bit32 = 32
}
public enum ETextureQuality
{
TR_CONFIG_TEXTURE_LOWEST,
TR_CONFIG_TEXTURE_LOW,
TR_CONFIG_TEXTURE_MEDIUM,
TR_CONFIG_TEXTURE_HIGH,
TR_CONFIG_TEXTURE_HIGHEST
}
public enum EOffOn
{
TR_CONFIG_OFF,
TR_CONFIG_ON
}
public enum EDebugLevel
{
// don't change the order!
TR_CONFIG_OFF, //no debug infos
TR_CONFIG_ONLY_FPS,
TR_CONFIG_LEVEL1,
TR_CONFIG_LEVEL2,
TR_CONFIG_LEVEL3,
TR_CONFIG_LEVEL_MAX //all debug infos
}
public enum EBufferSize
{
b0 = 0,
b512 = 512,
b1024 = 1024,
b1536 = 1536,
b2048 = 2048,
b2560 = 2560,
b3072 = 3072,
b3584 = 3584,
b4096 = 4096
}
public enum EPlaybackLib
{
PortAudio,
OpenAL
}
public enum EWebcamLib
{
OpenCV,
AForgeNet
}
public enum ERecordLib
{
#if WIN
DirectSound,
#endif
PortAudio
}
public enum EVideoDecoder
{
FFmpeg
}
public enum ESongMenu
{
//TR_CONFIG_LIST, //a simple list
//TR_CONFIG_DREIDEL, //as in ultrastar deluxe
TR_CONFIG_TILE_BOARD, //chessboard like
//TR_CONFIG_BOOK //for playlists
}
public enum ESongSorting
{
TR_CONFIG_NONE,
//TR_CONFIG_RANDOM,
TR_CONFIG_FOLDER,
TR_CONFIG_ARTIST,
TR_CONFIG_ARTIST_LETTER,
TR_CONFIG_TITLE_LETTER,
TR_CONFIG_EDITION,
TR_CONFIG_GENRE,
TR_CONFIG_LANGUAGE,
TR_CONFIG_YEAR,
TR_CONFIG_DECADE
}
public enum ECoverLoading
{
TR_CONFIG_COVERLOADING_ONDEMAND,
TR_CONFIG_COVERLOADING_ATSTART,
TR_CONFIG_COVERLOADING_DYNAMIC
}
public enum EGameDifficulty
{
TR_CONFIG_EASY,
TR_CONFIG_NORMAL,
TR_CONFIG_HARD
}
public enum ETimerMode
{
TR_CONFIG_TIMERMODE_CURRENT,
TR_CONFIG_TIMERMODE_REMAINING,
TR_CONFIG_TIMERMODE_TOTAL
}
public enum ETimerLook
{
TR_CONFIG_TIMERLOOK_NORMAL,
TR_CONFIG_TIMERLOOK_EXPANDED
}
public enum EBackgroundMusicSource
{
TR_CONFIG_NO_OWN_MUSIC,
TR_CONFIG_OWN_MUSIC,
TR_CONFIG_ONLY_OWN_MUSIC
}
public enum EPlayerInfo
{
TR_CONFIG_PLAYERINFO_BOTH,
TR_CONFIG_PLAYERINFO_NAME,
TR_CONFIG_PLAYERINFO_AVATAR,
TR_CONFIG_PLAYERINFO_OFF
}
public enum EFadePlayerInfo
{
TR_CONFIG_FADEPLAYERINFO_ALL,
TR_CONFIG_FADEPLAYERINFO_INFO,
TR_CONFIG_FADEPLAYERINFO_OFF
}
public enum ELyricStyle
{
Fill,
Jump,
Slide,
Zoom
}
#endregion Enums
static class CConfig
{
private static XmlWriterSettings _settings = new XmlWriterSettings();
@@ -513,7 +340,7 @@ namespace Vocaluxe.Base
#region Debug
writer.WriteStartElement("Debug");
writer.WriteComment("DebugLevel: " + ListStrings(Enum.GetNames(typeof(EDebugLevel))));
writer.WriteComment("DebugLevel: " + CHelper.ListStrings(Enum.GetNames(typeof(EDebugLevel))));
writer.WriteElementString("DebugLevel", Enum.GetName(typeof(EDebugLevel), DebugLevel));
writer.WriteEndElement();
@@ -522,10 +349,10 @@ namespace Vocaluxe.Base
#region Graphics
writer.WriteStartElement("Graphics");
writer.WriteComment("Renderer: " + ListStrings(Enum.GetNames(typeof(ERenderer))));
writer.WriteComment("Renderer: " + CHelper.ListStrings(Enum.GetNames(typeof(ERenderer))));
writer.WriteElementString("Renderer", Enum.GetName(typeof(ERenderer), Renderer));
writer.WriteComment("TextureQuality: " + ListStrings(Enum.GetNames(typeof(ETextureQuality))));
writer.WriteComment("TextureQuality: " + CHelper.ListStrings(Enum.GetNames(typeof(ETextureQuality))));
writer.WriteElementString("TextureQuality", Enum.GetName(typeof(ETextureQuality), TextureQuality));
writer.WriteComment("CoverSize (pixels): 32, 64, 128, 256, 512, 1024 (default: 128)");
@@ -535,19 +362,19 @@ namespace Vocaluxe.Base
writer.WriteElementString("ScreenW", ScreenW.ToString());
writer.WriteElementString("ScreenH", ScreenH.ToString());
writer.WriteComment("AAMode: " + ListStrings(Enum.GetNames(typeof(EAntiAliasingModes))));
writer.WriteComment("AAMode: " + CHelper.ListStrings(Enum.GetNames(typeof(EAntiAliasingModes))));
writer.WriteElementString("AAMode", Enum.GetName(typeof(EAntiAliasingModes), AAMode));
writer.WriteComment("Colors: " + ListStrings(Enum.GetNames(typeof(EColorDeep))));
writer.WriteComment("Colors: " + CHelper.ListStrings(Enum.GetNames(typeof(EColorDeep))));
writer.WriteElementString("Colors", Enum.GetName(typeof(EColorDeep), Colors));
writer.WriteComment("MaxFPS should be between 1..200");
writer.WriteElementString("MaxFPS", MaxFPS.ToString("#"));
writer.WriteComment("VSync: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("VSync: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("VSync", Enum.GetName(typeof(EOffOn), VSync));
writer.WriteComment("FullScreen: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("FullScreen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("FullScreen", Enum.GetName(typeof(EOffOn), FullScreen));
writer.WriteComment("FadeTime should be between 0..3 Seconds");
@@ -568,25 +395,25 @@ namespace Vocaluxe.Base
writer.WriteComment("Name of cover-theme");
writer.WriteElementString("Cover", CoverTheme);
writer.WriteComment("Draw note-lines:" + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Draw note-lines:" + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("DrawNoteLines", Enum.GetName(typeof(EOffOn), DrawNoteLines));
writer.WriteComment("Draw tone-helper:" + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Draw tone-helper:" + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("DrawToneHelper", Enum.GetName(typeof(EOffOn), DrawToneHelper));
writer.WriteComment("Look of timer:" + ListStrings(Enum.GetNames(typeof(ETimerLook))));
writer.WriteComment("Look of timer:" + CHelper.ListStrings(Enum.GetNames(typeof(ETimerLook))));
writer.WriteElementString("TimerLook", Enum.GetName(typeof(ETimerLook), TimerLook));
writer.WriteComment("Information about players on SingScreen:" + ListStrings(Enum.GetNames(typeof(EPlayerInfo))));
writer.WriteComment("Information about players on SingScreen:" + CHelper.ListStrings(Enum.GetNames(typeof(EPlayerInfo))));
writer.WriteElementString("PlayerInfo", Enum.GetName(typeof(EPlayerInfo), PlayerInfo));
writer.WriteComment("Fade player-information with lyrics and notebars:" + ListStrings(Enum.GetNames(typeof(EFadePlayerInfo))));
writer.WriteComment("Fade player-information with lyrics and notebars:" + CHelper.ListStrings(Enum.GetNames(typeof(EFadePlayerInfo))));
writer.WriteElementString("FadePlayerInfo", Enum.GetName(typeof(EFadePlayerInfo), FadePlayerInfo));
writer.WriteComment("Cover Loading:" + ListStrings(Enum.GetNames(typeof(ECoverLoading))));
writer.WriteComment("Cover Loading:" + CHelper.ListStrings(Enum.GetNames(typeof(ECoverLoading))));
writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading));
writer.WriteComment("Lyric Style:" + ListStrings(Enum.GetNames(typeof(ELyricStyle))));
writer.WriteComment("Lyric Style:" + CHelper.ListStrings(Enum.GetNames(typeof(ELyricStyle))));
writer.WriteElementString("LyricStyle", Enum.GetName(typeof(ELyricStyle), LyricStyle));
writer.WriteEndElement();
@@ -595,13 +422,13 @@ namespace Vocaluxe.Base
#region Sound
writer.WriteStartElement("Sound");
writer.WriteComment("PlayBackLib: " + ListStrings(Enum.GetNames(typeof(EPlaybackLib))));
writer.WriteComment("PlayBackLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EPlaybackLib))));
writer.WriteElementString("PlayBackLib", Enum.GetName(typeof(EPlaybackLib), PlayBackLib));
writer.WriteComment("RecordLib: " + ListStrings(Enum.GetNames(typeof(ERecordLib))));
writer.WriteComment("RecordLib: " + CHelper.ListStrings(Enum.GetNames(typeof(ERecordLib))));
writer.WriteElementString("RecordLib", Enum.GetName(typeof(ERecordLib), RecordLib));
writer.WriteComment("AudioBufferSize: " + ListStrings(Enum.GetNames(typeof(EBufferSize))));
writer.WriteComment("AudioBufferSize: " + CHelper.ListStrings(Enum.GetNames(typeof(EBufferSize))));
writer.WriteElementString("AudioBufferSize", Enum.GetName(typeof(EBufferSize), AudioBufferSize));
writer.WriteComment("AudioLatency from -500 to 500 ms");
@@ -652,28 +479,28 @@ namespace Vocaluxe.Base
}
}
writer.WriteComment("SongMenu: " + ListStrings(Enum.GetNames(typeof(ESongMenu))));
writer.WriteComment("SongMenu: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongMenu))));
writer.WriteElementString("SongMenu", Enum.GetName(typeof(ESongMenu), SongMenu));
writer.WriteComment("SongSorting: " + ListStrings(Enum.GetNames(typeof(ESongSorting))));
writer.WriteComment("SongSorting: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongSorting))));
writer.WriteElementString("SongSorting", Enum.GetName(typeof(ESongSorting), SongSorting));
writer.WriteComment("Ignore articles on song-sorting: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Ignore articles on song-sorting: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("IgnoreArticles", Enum.GetName(typeof(EOffOn), IgnoreArticles));
writer.WriteComment("ScoreAnimationTime: Values >= 1 or 0 for no animation. Time is in seconds.");
writer.WriteElementString("ScoreAnimationTime", ScoreAnimationTime.ToString());
writer.WriteComment("TimerMode: " + ListStrings(Enum.GetNames(typeof(ETimerMode))));
writer.WriteComment("TimerMode: " + CHelper.ListStrings(Enum.GetNames(typeof(ETimerMode))));
writer.WriteElementString("TimerMode", Enum.GetName(typeof(ETimerMode), TimerMode));
writer.WriteComment("NumPlayer: 1.." + CSettings.MaxNumPlayer.ToString());
writer.WriteElementString("NumPlayer", NumPlayer.ToString());
writer.WriteComment("Order songs in tabs: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs));
writer.WriteComment("Lyrics also on Top of screen: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(EOffOn), LyricsOnTop));
writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":");
@@ -690,22 +517,22 @@ namespace Vocaluxe.Base
#region Video
writer.WriteStartElement("Video");
writer.WriteComment("VideoDecoder: " + ListStrings(Enum.GetNames(typeof(EVideoDecoder))));
writer.WriteComment("VideoDecoder: " + CHelper.ListStrings(Enum.GetNames(typeof(EVideoDecoder))));
writer.WriteElementString("VideoDecoder", Enum.GetName(typeof(EVideoDecoder), VideoDecoder));
writer.WriteComment("VideoBackgrounds: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("VideoBackgrounds: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("VideoBackgrounds", Enum.GetName(typeof(EOffOn), VideoBackgrounds));
writer.WriteComment("VideoPreview: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("VideoPreview: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("VideoPreview", Enum.GetName(typeof(EOffOn), VideoPreview));
writer.WriteComment("Show Videos while singing: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Show Videos while singing: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("VideosInSongs", Enum.GetName(typeof(EOffOn), VideosInSongs));
writer.WriteComment("Show backgroundmusic videos as background: " + ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("Show backgroundmusic videos as background: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("VideosToBackground", Enum.GetName(typeof(EOffOn), VideosToBackground));
writer.WriteComment("WebcamLib: " + ListStrings(Enum.GetNames(typeof(EWebcamLib))));
writer.WriteComment("WebcamLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EWebcamLib))));
writer.WriteElementString("WebcamLib", Enum.GetName(typeof(EWebcamLib), WebcamLib));
writer.WriteStartElement("WebcamConfig");
@@ -1055,23 +882,6 @@ namespace Vocaluxe.Base
return true;
}
/// <summary>
/// Concat strings into one string with ", " as separator.
/// </summary>
public static string ListStrings(string[] str)
{
string _Result = string.Empty;
for (int i = 0; i < str.Length; i++)
{
_Result += str[i];
if(i < str.Length - 1)
_Result += ", ";
}
return _Result;
}
/// <summary>
/// Use saved players from config now for games
/// </summary>
@@ -1098,8 +908,5 @@ namespace Vocaluxe.Base
}
}
}
}
}
+1
View File
@@ -6,6 +6,7 @@ using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
+3 -2
View File
@@ -20,7 +20,8 @@ using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
using Community.CsharpSqlite;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Base
{
@@ -179,7 +180,7 @@ namespace Vocaluxe.Base
command.Parameters.Add("@Date", System.Data.DbType.Int64, 0).Value = player.DateTicks;
command.Parameters.Add("@Medley", System.Data.DbType.Int32, 0).Value = Medley;
command.Parameters.Add("@Duet", System.Data.DbType.Int32, 0).Value = Duet;
command.Parameters.Add("@ShortSong", System.Data.DbType.Int32, 0).Value = Duet;
command.Parameters.Add("@ShortSong", System.Data.DbType.Int32, 0).Value = ShortSong;
command.Parameters.Add("@Difficulty", System.Data.DbType.Int32, 0).Value = (int)player.Difficulty;
command.ExecuteNonQuery();
+1 -488
View File
@@ -231,7 +231,7 @@ namespace Vocaluxe.Base
_Draw.DrawTexture(Texture, rect, color, bounds);
}
public static void DrawTexture(STexture Texture, SRectF rect, SColorF color,bool mirrored)
public static void DrawTexture(STexture Texture, SRectF rect, SColorF color, bool mirrored)
{
_Draw.DrawTexture(Texture, rect, color, mirrored);
}
@@ -269,491 +269,4 @@ namespace Vocaluxe.Base
return _Draw.TextureCount();
}
}
enum EParticeType
{
Twinkle,
Star,
Snow,
Flare,
PerfNoteStar
}
class CParticle
{
#region private vars
private string _TextureName;
private STexture _Texture;
private SRectF _Rect;
private float _Size;
private SColorF _Color;
private float _Alpha;
private float _Angle; //0..360°
private float _MaxAge; //[s]
private float _Age; //[s]
private float _Vx; //movement speed in x-axis [pix/s]
private float _Vy; //movement speed in y-axis [pix/s]
private float _Vr; //rotation speed [rpm]
private float _Rotation; //start rotation 0..360°
private float _Vsize; //size changing speed: period [s]
private float _LastTime;
private EParticeType _Type;
private Stopwatch _Timer;
#endregion private vars
#region public vars
//public bool Visible;
public float Alpha2 = 1f;
public float X
{
get { return _Rect.X; }
set { _Rect.X = value; }
}
public float Y
{
get { return _Rect.Y; }
set { _Rect.Y = value; }
}
public float Size
{
get { return _Size; }
set
{
_Rect.W = value;
_Rect.H = value;
_Size = value;
}
}
public float Alpha
{
get { return _Alpha; }
set { _Alpha = value; }
}
public SColorF Color
{
get { return _Color; }
set { _Color = value; }
}
public bool IsAlive
{
get { return (_Age < _MaxAge || _MaxAge == 0f); }
}
#endregion public vars
#region Constructors
public CParticle(string textureName, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticeType type)
{
_TextureName = textureName;
_Texture = new STexture(-1);
_Color = color;
_Rect = new SRectF(x, y, size, size, z);
_Size = size;
_Alpha = 1f;
_Angle = 0f;
_Vx = vx;
_Vy = vy;
_Vr = vr;
_Vsize = vsize;
_LastTime = 0f;
_Type = type;
_Timer = new Stopwatch();
_Age = 0f;
_MaxAge = maxage;
_Rotation = (float)(CGame.Rand.NextDouble() * 360.0);
}
public CParticle(STexture texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticeType type)
{
_TextureName = String.Empty;
_Texture = texture;
_Color = color;
_Rect = new SRectF(x, y, size, size, z);
_Size = size;
_Alpha = 1f;
_Angle = 0f;
_Vx = vx;
_Vy = vy;
_Vr = vr;
_Vsize = vsize;
_LastTime = 0f;
_Type = type;
_Timer = new Stopwatch();
_Age = 0f;
_MaxAge = maxage;
_Rotation = (float)(CGame.Rand.NextDouble() * 360.0);
}
#endregion Constructors
public void Update()
{
if (!IsAlive)
return;
if (!_Timer.IsRunning)
_Timer.Start();
float CurrentTime = _Timer.ElapsedMilliseconds / 1000f;
float timediff = CurrentTime - _LastTime;
_Age = CurrentTime;
// update alpha
if (_MaxAge > 0f)
{
switch (_Type)
{
case EParticeType.Twinkle:
_Alpha = 1f - _Age / _MaxAge;
break;
case EParticeType.Star:
_Alpha = 1f - _Age / _MaxAge;
break;
case EParticeType.Snow:
_Alpha = (float)Math.Sqrt((Math.Sin(_Age / _MaxAge * Math.PI * 2 - 0.5 * Math.PI) + 1) / 2);
break;
case EParticeType.Flare:
_Alpha = 1f - _Age / _MaxAge;
break;
case EParticeType.PerfNoteStar:
_Alpha = 1f - _Age / _MaxAge;
break;
default:
break;
}
}
// update position
switch (_Type)
{
case EParticeType.Twinkle:
X += _Vx * timediff;
Y += _Vy * timediff;
break;
case EParticeType.Star:
X += _Vx * timediff;
Y += _Vy * timediff;
break;
case EParticeType.Snow:
int maxy = (int)Math.Round(CSettings.iRenderH - _Size * 0.4f);
if (Math.Round(Y) < maxy)
{
float vdx = 0f;
if (_Vx != 0)
vdx = (float)Math.Sin(CurrentTime / _Vx * Math.PI);
X += _Vx * timediff * (0.5f + vdx);
Y += _Vy * timediff * (vdx * vdx / 2f + 0.5f);
if (Y >= maxy)
Y = maxy;
}
break;
case EParticeType.Flare:
X += _Vx * timediff;
Y += _Vy * timediff;
break;
case EParticeType.PerfNoteStar:
X += _Vx * timediff;
Y += _Vy * timediff;
break;
default:
break;
}
// update size
if (_Vsize != 0f)
{
float size = _Size;
switch (_Type)
{
case EParticeType.Twinkle:
size = _Size * (1f - CurrentTime / _Vsize);
break;
case EParticeType.Star:
size = _Size * (1f - CurrentTime / _Vsize);
break;
case EParticeType.Snow:
size = _Size * (float)Math.Sqrt((Math.Sin(CurrentTime / _Vsize * Math.PI * 2 - 0.5 * Math.PI) + 1) / 2);
break;
case EParticeType.Flare:
size = _Size * (1f - CurrentTime / _Vsize);
break;
case EParticeType.PerfNoteStar:
size = _Size * (1f - CurrentTime / _Vsize);
break;
default:
break;
}
_Rect.X += (_Rect.W - size) / 2f;
_Rect.Y += (_Rect.H - size) / 2f;
_Rect.W = size;
_Rect.H = size;
}
// update rotation
if (_Vr != 0f)
{
float r = CurrentTime * _Vr / 60f;
_Angle = _Rotation + 360f * (r - (float)Math.Floor(r));
_Rect.Rotation = _Angle;
}
_LastTime = CurrentTime;
}
public void Pause()
{
_Timer.Stop();
}
public void Resume()
{
_Timer.Start();
}
public void Draw()
{
if (_TextureName != String.Empty)
CDraw.DrawTexture(CTheme.GetSkinTexture(_TextureName), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
else
CDraw.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
}
}
class CParticleEffect
{
private List<CParticle> _Stars;
private string _TextureName;
private STexture _Texture;
private int _MaxNumber;
private SRectF _Area;
private SColorF _Color;
private float _Size;
private EParticeType _Type;
private Stopwatch _SpawnTimer;
private float _NextSpawnTime;
public float Alpha = 1f;
public bool IsAlive
{
get
{
return (_Stars.Count > 0 || !_SpawnTimer.IsRunning);
}
}
public SRectF Area
{
get { return _Area; }
set { _Area = value; }
}
public CParticleEffect(int MaxNumber, SColorF Color, SRectF Area, string TextureName, float Size, EParticeType Type)
{
_Stars = new List<CParticle>();
_Area = Area;
_Color = Color;
_TextureName = TextureName;
_Texture = new STexture(-1);
_MaxNumber = MaxNumber;
_Size = Size;
_Type = Type;
_SpawnTimer = new Stopwatch();
_NextSpawnTime = 0f;
}
public CParticleEffect(int MaxNumber, SColorF Color, SRectF Area, STexture texture, float Size, EParticeType Type)
{
_Stars = new List<CParticle>();
_Area = Area;
_Color = Color;
_TextureName = String.Empty;
_Texture = texture;
_MaxNumber = MaxNumber;
_Size = Size;
_Type = Type;
_SpawnTimer = new Stopwatch();
_NextSpawnTime = 0f;
}
public void Update()
{
bool DoSpawn = false;
if (!_SpawnTimer.IsRunning)
{
_SpawnTimer.Start();
_NextSpawnTime = 0f;
DoSpawn = true;
}
if (_SpawnTimer.ElapsedMilliseconds / 1000f > _NextSpawnTime && _NextSpawnTime >= 0f)
{
DoSpawn = true;
_SpawnTimer.Reset();
_SpawnTimer.Start();
}
while (_Stars.Count < _MaxNumber && DoSpawn)
{
float size = CGame.Rand.Next((int)_Size / 2) + _Size / 2;
float lifetime = 0f;
float vx = 0f;
float vy = 0f;
float vr = 0f;
float vsize = 0f;
_NextSpawnTime = 0f;
switch (_Type)
{
case EParticeType.Twinkle:
size = CGame.Rand.Next((int)_Size / 2) + _Size / 2;
lifetime = CGame.Rand.Next(500) / 1000f + 0.5f;
vx = -CGame.Rand.Next(10000) / 50f + 100f;
vy = -CGame.Rand.Next(10000) / 50f + 100f;
vr = -CGame.Rand.Next(500) / 100f + 2.5f;
vsize = lifetime * 2f;
break;
case EParticeType.Star:
size = CGame.Rand.Next((int)_Size / 2) + _Size / 2;
lifetime = CGame.Rand.Next(1000) / 500f + 0.2f;
vx = -CGame.Rand.Next(1000) / 50f + 10f;
vy = -CGame.Rand.Next(1000) / 50f + 10f;
vr = -CGame.Rand.Next(500) / 100f + 2.5f;
vsize = lifetime * 2f;
break;
case EParticeType.Snow:
size = CGame.Rand.Next((int)_Size / 2) + _Size / 2;
lifetime = CGame.Rand.Next(5000) / 50f + 10f;
vx = -CGame.Rand.Next(1000) / 50f + 10f;
vy = CGame.Rand.Next(1000) / 50f + Math.Abs(vx) + 10f;
vr = -CGame.Rand.Next(200) / 50f + 2f;
vsize = lifetime * 2f;
_NextSpawnTime = lifetime / _MaxNumber;
DoSpawn = false;
break;
case EParticeType.Flare:
size = CGame.Rand.Next((int)_Size / 2) + _Size / 2;
lifetime = CGame.Rand.Next(500) / 1000f + 0.1f;
vx = -CGame.Rand.Next(2000) / 50f;
vy = -CGame.Rand.Next(2000) / 50f + 20f;
vr = -CGame.Rand.Next(2000) / 50f + 20f;
vsize = lifetime * 2f;
break;
case EParticeType.PerfNoteStar:
size = CGame.Rand.Next((int)_Size / 2) + _Size / 2;
lifetime = CGame.Rand.Next(1000) / 500f + 1.2f;
vx = 0f;
vy = 0f;
vr = CGame.Rand.Next(500) / 50f + 10f;
vsize = lifetime * 2f;
break;
default:
break;
}
int w = (int)(_Area.W - size / 4f);
int h = (int)(_Area.H - size / 4f);
if (w < 0)
w = 0;
if (h < 0)
h = 0;
CParticle star;
if (_TextureName != String.Empty)
{
star = new CParticle(_TextureName, _Color,
CGame.Rand.Next(w) + _Area.X - size / 4f,
CGame.Rand.Next(h) + _Area.Y - size / 4f,
size, lifetime, _Area.Z, vx, vy, vr, vsize, _Type);
}
else
{
star = new CParticle(_Texture, _Color,
CGame.Rand.Next(w) + _Area.X - size / 4f,
CGame.Rand.Next(h) + _Area.Y - size / 4f,
size, lifetime, _Area.Z, vx, vy, vr, vsize, _Type);
}
_Stars.Add(star);
}
if (_Type == EParticeType.Flare || _Type == EParticeType.PerfNoteStar || _Type == EParticeType.Twinkle)
_NextSpawnTime = -1f;
int i = 0;
while (i < _Stars.Count)
{
_Stars[i].Update();
if (!_Stars[i].IsAlive)
{
_Stars.RemoveAt(i);
}
else
i++;
}
}
public void Pause()
{
foreach (CParticle star in _Stars)
{
star.Pause();
}
}
public void Resume()
{
foreach (CParticle star in _Stars)
{
star.Resume();
}
}
public void Draw()
{
foreach (CParticle star in _Stars)
{
star.Alpha2 = Alpha;
star.Draw();
}
}
}
}
+106 -25
View File
@@ -15,29 +15,7 @@ using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
public enum EAlignment
{
Left,
Center,
Right
}
public enum EHAlignment
{
Top,
Center,
Bottom
}
public enum EStyle
{
Normal,
Italic,
Bold,
BoldItalic
}
{
class CGlyph
{
private float _SIZEh = 50f;
@@ -298,6 +276,7 @@ namespace Vocaluxe.Base
public string Name;
public bool IsThemeFont;
public int PartyModeID;
public string ThemeName;
public string Folder;
@@ -323,6 +302,9 @@ namespace Vocaluxe.Base
private static int _CurrentFont;
private static float _Height = 1f;
public static int PartyModeID
{ get; set; }
public static EStyle Style = EStyle.Normal;
public static int CurrentFont
@@ -377,6 +359,7 @@ namespace Vocaluxe.Base
_settings.ConformanceLevel = ConformanceLevel.Document;
_CurrentFont = 0;
PartyModeID = -1;
BuildFonts();
}
@@ -586,7 +569,20 @@ namespace Vocaluxe.Base
public static void SetFont(string FontName)
{
int Index = GetFontIndex(CConfig.Theme, FontName);
int Index = -1;
if (PartyModeID != -1)
{
Index = GetFontIndexParty(PartyModeID, FontName);
if (Index >= 0 && Index < _Fonts.Count)
{
_CurrentFont = Index;
return;
}
}
Index = GetFontIndex(CConfig.Theme, FontName);
if (Index >= 0 && Index < _Fonts.Count)
{
@@ -612,7 +608,7 @@ namespace Vocaluxe.Base
public static RectangleF GetTextBounds(CText text, float height)
{
Height = height;
return new RectangleF(text.X, text.Y, GetTextWidth(CLanguage.Translate(text.Text)), GetTextHeight(CLanguage.Translate(text.Text)));
return new RectangleF(text.X, text.Y, GetTextWidth(CLanguage.Translate(text.Text, text.PartyModeID)), GetTextHeight(CLanguage.Translate(text.Text, text.PartyModeID)));
}
public static float GetTextWidth(string text)
@@ -720,6 +716,7 @@ namespace Vocaluxe.Base
sf.Name = name;
sf.IsThemeFont = false;
sf.ThemeName = String.Empty;
sf.PartyModeID = -1;
CHelper.GetValueFromXML("//root/Font" + i.ToString() + "/FileItalic", navigator, ref value, value);
value = Path.Combine(Directory.GetCurrentDirectory(),
@@ -769,6 +766,7 @@ namespace Vocaluxe.Base
sf.IsThemeFont = true;
sf.ThemeName = ThemeName;
sf.PartyModeID = -1;
bool ok = true;
@@ -889,6 +887,75 @@ namespace Vocaluxe.Base
}
}
/// <summary>
/// Loads party mode fonts from skin file
/// </summary>
public static void LoadPartyModeFonts(int PartyModeID, string FontFolder, XPathNavigator navigator)
{
string value = string.Empty;
int i = 1;
while (CHelper.GetValueFromXML("//root/Fonts/Font" + i.ToString() + "/Folder", navigator, ref value, value))
{
SFont sf = new SFont();
sf.Folder = value;
sf.IsThemeFont = false;
sf.ThemeName = String.Empty;
sf.PartyModeID = PartyModeID;
bool ok = true;
ok &= CHelper.GetValueFromXML("//root/Fonts/Font" + i.ToString() + "/FileNormal", navigator, ref value, value);
sf.FileNormal = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
CFont f = new CFont(value);
sf.Normal = f;
string name = String.Empty;
ok &= CHelper.GetValueFromXML("//root/Fonts/Font" + i.ToString() + "/Name", navigator, ref name, value);
sf.Name = name;
ok &= CHelper.GetValueFromXML("//root/Fonts/Font" + i.ToString() + "/FileItalic", navigator, ref value, value);
sf.FileItalic = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
f = new CFont(value);
sf.Italic = f;
ok &= CHelper.GetValueFromXML("//root/Fonts/Font" + i.ToString() + "/FileBold", navigator, ref value, value);
sf.FileBold = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
f = new CFont(value);
sf.Bold = f;
ok &= CHelper.GetValueFromXML("//root/Fonts/Font" + i.ToString() + "/FileBoldItalic", navigator, ref value, value);
sf.FileBoldItalic = value;
value = Path.Combine(FontFolder, Path.Combine(sf.Folder, value));
f = new CFont(value);
sf.BoldItalic = f;
sf.Outline = 0f;
ok &= CHelper.TryGetFloatValueFromXML("//root/Fonts/Font" + i.ToString() + "/Outline", navigator, ref sf.Outline);
sf.OutlineColor = new SColorF(0f, 0f, 0f, 1f);
ok &= CHelper.TryGetFloatValueFromXML("//root/Fonts/Font" + i.ToString() + "/OutlineColorR", navigator, ref sf.OutlineColor.R);
ok &= CHelper.TryGetFloatValueFromXML("//root/Fonts/Font" + i.ToString() + "/OutlineColorG", navigator, ref sf.OutlineColor.G);
ok &= CHelper.TryGetFloatValueFromXML("//root/Fonts/Font" + i.ToString() + "/OutlineColorB", navigator, ref sf.OutlineColor.B);
ok &= CHelper.TryGetFloatValueFromXML("//root/Fonts/Font" + i.ToString() + "/OutlineColorA", navigator, ref sf.OutlineColor.A);
if (ok)
_Fonts.Add(sf);
else
{
CLog.LogError("Error loading theme fonts for party mode from Folder \"" + FontFolder + "\": Error in Font" + i.ToString());
}
i++;
}
CLog.StartBenchmark(1, "BuildGlyphs");
BuildGlyphs();
CLog.StopBenchmark(1, "BuildGlyphs");
}
private static int GetFontIndex(string ThemeName, string FontName)
{
if (ThemeName == String.Empty || FontName == String.Empty)
@@ -903,6 +970,20 @@ namespace Vocaluxe.Base
return -1;
}
private static int GetFontIndexParty(int PartyModeID, string FontName)
{
if (PartyModeID == -1 || FontName == String.Empty)
return -1;
for (int i = 0; i < _Fonts.Count; i++)
{
if (!_Fonts[i].IsThemeFont && _Fonts[i].Name == FontName && _Fonts[i].PartyModeID == PartyModeID)
return i;
}
return -1;
}
private static void BuildGlyphs()
{
string Text = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPGRSTUVWGXZ1234567890";
+14 -46
View File
@@ -6,42 +6,12 @@ using System.Text;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SingNotes;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Base
{
struct SPlayer
{
public int ProfileID;
public string Name;
public EGameDifficulty Difficulty;
public double Points;
public double PointsLineBonus;
public double PointsGoldenNotes;
public int NoteDiff;
public int LineNr;
public List<CLine> SingLine;
public int CurrentLine;
public int CurrentNote;
public int SongID;
public bool Medley;
public bool Duet;
public bool ShortSong;
public long DateTicks;
public bool SongFinished;
}
struct SScores
{
public string Name;
public int Score;
public string Date;
public EGameDifficulty Difficulty;
public int LineNr;
public int ID;
}
static class CGame
{
private static IGameMode _GameMode;
@@ -267,6 +237,10 @@ namespace Vocaluxe.Base
for (int beat = _OldBeatD + 1; beat <= _CurrentBeatD; beat++)
{
if ((_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_MEDLEY && song.Medley.EndBeat == beat) ||
(_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_SHORTSONG && song.ShortEnd == beat))
_Player[p].SongFinished = true;
CLine[] lines = song.Notes.GetLines(_Player[p].LineNr).Line;
int Line = -1;
@@ -300,7 +274,7 @@ namespace Vocaluxe.Base
Note = j;
break;
}
}
}
if (Note >= 0)
{
@@ -310,17 +284,11 @@ namespace Vocaluxe.Base
{
if (Note == lines[Line].NoteCount - 1)
{
if (notes[Note].EndBeat == beat
|| (_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_MEDLEY && song.Medley.EndBeat == beat)
|| (_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_SHORTSONG && song.ShortEnd == beat))
if (notes[Note].EndBeat == beat)
_Player[p].SongFinished = true;
}
}
if ((_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_MEDLEY && song.Medley.EndBeat == beat) ||
(_GameMode.GetCurrentGameMode() == EGameMode.TR_GAMEMODE_SHORTSONG && song.ShortEnd == beat))
_Player[p].SongFinished = true;
if (notes[Note].PointsForBeat > 0 && (CSound.RecordToneValid(p) || DEBUG_HIT))
{
int Tone = notes[Note].Tone;
@@ -351,7 +319,7 @@ namespace Vocaluxe.Base
{
CNote nt = _Player[p].SingLine[Line].LastNote;
if (notes[Note].StartBeat == beat || nt.EndBeat + 1 != beat || nt.Tone != Tone)
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
else
{
_Player[p].SingLine[Line].IncLastNoteLength();
@@ -359,7 +327,7 @@ namespace Vocaluxe.Base
}
else
{
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
}
_Player[p].SingLine[Line].LastNote.IsPerfect(notes[Note]);
@@ -371,7 +339,7 @@ namespace Vocaluxe.Base
{
CNote nt = _Player[p].SingLine[Line].LastNote;
if (nt.EndBeat + 1 != beat || nt.Hit)
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
else
{
if (nt.Tone == TonePlayer && nt.EndBeat + 1 == beat)
@@ -380,13 +348,13 @@ namespace Vocaluxe.Base
}
else
{
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
}
}
}
else
{
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
}
}
@@ -5,38 +5,12 @@ using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.PartyModes;
using Vocaluxe.Screens;
namespace Vocaluxe.Menu
namespace Vocaluxe.Base
{
enum EScreens
{
ScreenTest = 0,
ScreenLoad = 1,
ScreenMain = 2,
ScreenSong = 3,
ScreenOptions = 4,
ScreenSing = 5,
ScreenProfiles = 6,
ScreenScore = 7,
ScreenHighscore = 8,
ScreenOptionsGame = 9,
ScreenOptionsSound = 10,
ScreenOptionsRecord = 11,
ScreenOptionsVideo = 12,
ScreenOptionsLyrics = 13,
ScreenOptionsTheme = 14,
ScreenNames = 15,
ScreenCredits = 16,
ScreenNull = -1
}
enum EPopupScreens
{
PopupPlayerControl = 0,
@@ -194,12 +168,13 @@ namespace Vocaluxe.Menu
private static float _GlobalAlpha;
private static float _ZOffset;
private static IMenu _OldScreen;
private static EScreens _CurrentScreen;
private static EScreens _NextScreen;
private static EPopupScreens _CurrentPopupScreen;
private static List<CMenu> _Screens = new List<CMenu>();
private static List<CMenu> _PopupScreens = new List<CMenu>();
private static List<IMenu> _Screens = new List<IMenu>();
private static List<IMenu> _PopupScreens = new List<IMenu>();
private static float _SavedBackgroundMusicVolume;
private static float _SavedPreviewMusicVolume;
@@ -244,6 +219,8 @@ namespace Vocaluxe.Menu
_Screens.Add(new CScreenOptionsTheme());
_Screens.Add(new CScreenNames());
_Screens.Add(new CScreenCredits());
_Screens.Add(new CScreenParty());
_Screens.Add(new CScreenPartyDummy());
_PopupScreens.Add(new CPopupScreenPlayerControl());
_PopupScreens.Add(new CPopupScreenVolumeControl());
@@ -276,13 +253,15 @@ namespace Vocaluxe.Menu
for (int i = 0; i < _Screens.Count; i++)
{
CLog.StartBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
_Screens[i].LoadTheme();
_Screens[i].Initialize(CMain.Base);
_Screens[i].LoadTheme(CTheme.GetThemeScreensPath());
CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
}
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].LoadTheme();
_PopupScreens[i].Initialize(CMain.Base);
_PopupScreens[i].LoadTheme(CTheme.GetThemeScreensPath());
}
}
@@ -296,7 +275,7 @@ namespace Vocaluxe.Menu
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].ReloadTheme();
_PopupScreens[i].ReloadTheme();
}
}
@@ -324,7 +303,7 @@ namespace Vocaluxe.Menu
for (int i = 0; i < _PopupScreens.Count; i++)
{
_PopupScreens[i].SaveTheme();
_PopupScreens[i].SaveTheme();
}
}
@@ -357,6 +336,7 @@ namespace Vocaluxe.Menu
{
_Run &= HandleInputs(Keys, Mouse);
_Run &= Update();
CParty.UpdateGame();
}
else
{
@@ -374,7 +354,16 @@ namespace Vocaluxe.Menu
_Fading = true;
_FadingTimer.Reset();
_FadingTimer.Start();
_Screens[(int)_NextScreen].OnShow();
if (_NextScreen == EScreens.ScreenPartyDummy)
{
CFonts.PartyModeID = CParty.CurrentPartyModeID;
_Screens[(int)_NextScreen].OnShow();
CFonts.PartyModeID = -1;
}
else
_Screens[(int)_NextScreen].OnShow();
HidePopup(EPopupScreens.PopupPlayerControl);
}
@@ -392,11 +381,28 @@ namespace Vocaluxe.Menu
_GlobalAlpha = 1f;// -factor / 100f;
_ZOffset = CSettings.zFar/2;
_Screens[(int)_CurrentScreen].Draw();
if (_CurrentScreen == EScreens.ScreenPartyDummy)
{
CFonts.PartyModeID = CParty.CurrentPartyModeID;
_OldScreen.Draw();
CFonts.PartyModeID = -1;
}
else
_OldScreen.Draw();
_GlobalAlpha = factor;
_ZOffset = 0f;
_Screens[(int)_NextScreen].Draw();
if (_NextScreen == EScreens.ScreenPartyDummy)
{
CFonts.PartyModeID = CParty.CurrentPartyModeID;
_Screens[(int)_NextScreen].Draw();
CFonts.PartyModeID = -1;
}
else
_Screens[(int)_NextScreen].Draw();
_GlobalAlpha = 1f;
}
@@ -409,14 +415,32 @@ namespace Vocaluxe.Menu
CBackgroundMusic.Play();
_Screens[(int)_CurrentScreen].OnShowFinish();
_Screens[(int)_CurrentScreen].ProcessMouseMove(_Cursor.X, _Cursor.Y);
_Screens[(int)_CurrentScreen].Draw();
if (_CurrentScreen == EScreens.ScreenPartyDummy)
{
CFonts.PartyModeID = CParty.CurrentPartyModeID;
_Screens[(int)_CurrentScreen].Draw();
CFonts.PartyModeID = -1;
}
else
_Screens[(int)_CurrentScreen].Draw();
_Fading = false;
_FadingTimer.Stop();
}
}
else
{
_Screens[(int)_CurrentScreen].Draw();
if (_CurrentScreen == EScreens.ScreenPartyDummy)
{
CFonts.PartyModeID = CParty.CurrentPartyModeID;
_Screens[(int)_CurrentScreen].Draw();
CFonts.PartyModeID = -1;
}
else
_Screens[(int)_CurrentScreen].Draw();
_OldScreen = _Screens[(int)_CurrentScreen];
}
for (int i = 0; i < _PopupScreens.Count; i++)
@@ -432,9 +456,21 @@ namespace Vocaluxe.Menu
public static void FadeTo(EScreens Screen)
{
if (Screen == EScreens.ScreenPartyDummy)
{
EScreens alt;
CMenu scr = CParty.GetNextPartyScreen(out alt);
if (scr == null)
{
_NextScreen = alt;
return;
}
_Screens[(int)EScreens.ScreenPartyDummy] = scr;
}
_NextScreen = Screen;
}
public static void ShowPopup(EPopupScreens PopupScreen)
{
_PopupScreens[(int)PopupScreen].OnShow();
@@ -543,7 +579,7 @@ namespace Vocaluxe.Menu
UpdateMousePosition(MouseEvent.X, MouseEvent.Y);
bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].ScreenArea, MouseEvent);
bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].GetScreenArea(), MouseEvent);
if (PopupPlayerControlAllowed && isOverPopupPlayerControl)
{
if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
@@ -553,7 +589,7 @@ namespace Vocaluxe.Menu
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
HidePopup(EPopupScreens.PopupPlayerControl);
bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].ScreenArea, MouseEvent);
bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].GetScreenArea(), MouseEvent);
if (PopupVolumeControlAllowed && isOverPopupVolumeControl)
{
if (_CurrentPopupScreen == EPopupScreens.NoPopup)
+1
View File
@@ -4,6 +4,7 @@ using System.Text;
using Vocaluxe.Lib.Input;
using Vocaluxe.Lib.Input.WiiMote;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
+178 -25
View File
@@ -6,6 +6,8 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
struct SLanguage
@@ -14,6 +16,13 @@ namespace Vocaluxe.Base
public string LanguageFilePath;
public Hashtable Texts;
public List<SPartyLanguage> PartyModeTexts;
}
struct SPartyLanguage
{
public int PartyModeID;
public Hashtable Texts;
}
static class CLanguage
@@ -64,22 +73,32 @@ namespace Vocaluxe.Base
public static bool SetLanguage(string Language)
{
for (int i = 0; i < _Languages.Count; i++)
int nr = GetLanguageNr(Language);
if (nr != -1)
{
if (_Languages[i].Name == Language)
{
_CurrentLanguage = i;
return true;
}
_CurrentLanguage = nr;
return true;
}
return false;
}
public static int GetLanguageNr(string Language)
{
for (int i = 0; i < _Languages.Count; i++)
{
if (_Languages[i].Name == Language)
return i;
}
return -1;
}
public static string Translate(string KeyWord)
{
if (KeyWord == null)
return null;
return Translate(KeyWord, -1);
}
public static string Translate(string KeyWord, int PartyModeID)
{
if (KeyWord.Length < 3)
return KeyWord;
@@ -87,14 +106,38 @@ namespace Vocaluxe.Base
if (tag != "TR_")
return KeyWord;
string result = String.Empty;
try
string result = null;
int PartyModeNr = GetPartyModeNr(PartyModeID, _CurrentLanguage);
if (PartyModeID != -1)
{
result = (string)_Languages[_CurrentLanguage].Texts[KeyWord];
if (PartyModeNr != -1)
{
try
{
result = (string)_Languages[_CurrentLanguage].PartyModeTexts[PartyModeNr].Texts[KeyWord];
}
catch { }
}
if (result == null && (PartyModeNr = GetPartyModeNr(PartyModeID, _FallbackLanguage)) != -1)
{
try
{
result = (string)_Languages[_FallbackLanguage].PartyModeTexts[PartyModeNr].Texts[KeyWord];
}
catch { }
}
}
catch (Exception)
if (result == null)
{
;
try
{
result = (string)_Languages[_CurrentLanguage].Texts[KeyWord];
}
catch { }
}
if (result == null)
@@ -104,10 +147,7 @@ namespace Vocaluxe.Base
{
result = (string)_Languages[_FallbackLanguage].Texts[KeyWord];
}
catch (Exception)
{
;
}
catch { }
if (result == null)
return KeyWord;
@@ -117,6 +157,11 @@ namespace Vocaluxe.Base
}
public static bool TranslationExists(string KeyWord)
{
return TranslationExists(KeyWord, -1);
}
public static bool TranslationExists(string KeyWord, int PartyModeID)
{
if (KeyWord.Length < 3)
return false;
@@ -126,13 +171,37 @@ namespace Vocaluxe.Base
return false;
string result = String.Empty;
try
int PartyModeNr = GetPartyModeNr(PartyModeID, _CurrentLanguage);
if (PartyModeID != -1)
{
result = (string)_Languages[_CurrentLanguage].Texts[KeyWord];
if (PartyModeNr != -1)
{
try
{
result = (string)_Languages[_CurrentLanguage].PartyModeTexts[PartyModeNr].Texts[KeyWord];
}
catch { }
}
if (result == null && (PartyModeNr = GetPartyModeNr(PartyModeID, _FallbackLanguage)) != -1)
{
try
{
result = (string)_Languages[_FallbackLanguage].PartyModeTexts[PartyModeNr].Texts[KeyWord];
}
catch { }
}
}
catch (Exception)
if (result == null)
{
;
try
{
result = (string)_Languages[_CurrentLanguage].Texts[KeyWord];
}
catch { }
}
if (result == null)
@@ -142,10 +211,7 @@ namespace Vocaluxe.Base
{
result = (string)_Languages[_FallbackLanguage].Texts[KeyWord];
}
catch (Exception)
{
;
}
catch { }
if (result == null)
return false;
@@ -154,6 +220,82 @@ namespace Vocaluxe.Base
return true;
}
public static bool LoadPartyLanguageFiles(int PartyModeID, string Path)
{
List<string> files = new List<string>();
files.AddRange(Helper.ListFiles(Path, "*.xml", true, true));
foreach (string file in files)
{
if (!LoadPartyLanguageFile(PartyModeID, file))
return false;
}
return true;
}
private static bool LoadPartyLanguageFile(int PartyModeID, string file)
{
bool loaded = false;
XPathDocument xPathDoc = null;
XPathNavigator navigator = null;
try
{
xPathDoc = new XPathDocument(file);
navigator = xPathDoc.CreateNavigator();
loaded = true;
}
catch (Exception e)
{
loaded = false;
if (navigator != null)
navigator = null;
if (xPathDoc != null)
xPathDoc = null;
CLog.LogError("Error opening Party Language File " + file + ": " + e.Message);
}
if (loaded)
{
string value = string.Empty;
if (loaded == CHelper.GetValueFromXML("//root/Info/Name", navigator, ref value, value))
{
int nr = GetLanguageNr(value);
if (nr == -1)
return true;
SPartyLanguage lang = new SPartyLanguage();
lang.PartyModeID = PartyModeID;
lang.Texts = new Hashtable();
List<string> texts = CHelper.GetValuesFromXML("Texts", navigator);
for (int i = 0; i < texts.Count; i++)
{
if (CHelper.GetValueFromXML("//root/Texts/" + texts[i], navigator, ref value, value))
{
try
{
lang.Texts.Add(texts[i], value);
}
catch (Exception e)
{
CLog.LogError("Error reading Party Language File " + file + ": " + e.Message);
return false;
}
}
}
_Languages[nr].PartyModeTexts.Add(lang);
return true;
}
}
CLog.LogError("Error reading Party Language File " + file);
return false;
}
private static void LoadLanguageFile(string FileName)
{
bool loaded = false;
@@ -191,6 +333,7 @@ namespace Vocaluxe.Base
_FallbackLanguage = _Languages.Count;
lang.Texts = new Hashtable();
lang.PartyModeTexts = new List<SPartyLanguage>();
List<string> texts = CHelper.GetValuesFromXML("Texts", navigator);
for (int i = 0; i < texts.Count; i++)
@@ -213,5 +356,15 @@ namespace Vocaluxe.Base
}
}
}
private static int GetPartyModeNr(int PartyModeID, int Language)
{
for (int i = 0; i < _Languages[Language].PartyModeTexts.Count; i++)
{
if (_Languages[Language].PartyModeTexts[i].PartyModeID == PartyModeID)
return i;
}
return -1;
}
}
}
+821
View File
@@ -0,0 +1,821 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using Vocaluxe.GameModes;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Base
{
static class CMain
{
public static IConfig Config = new BConfig();
public static ISettings Settings = new BSettings();
public static ITheme Theme = new BTheme();
public static IHelper Helper = new BHelper();
public static IBackgroundMusic BackgroundMusic = new BBackgroundMusic();
public static IDrawing Draw = new BDraw();
public static IGraphics Graphics = new BGraphics();
public static ILog Log = new BLog();
public static IFonts Fonts = new BFonts();
public static ILanguage Language = new BLanguage();
public static IGame Game = new BGame();
public static IProfiles Profiles = new BProfiles();
public static IRecording Record = new BRecord();
public static ISongs Songs = new BSongs();
public static IVideo Video = new BVideo();
public static ISound Sound = new BSound();
public static ICover Cover = new BCover();
public static IDataBase DataBase = new BDataBase();
public static IInputs Input = new BInputs();
public static IPlaylist Playlist = new BPlaylist();
public static Basic Base = new Basic(
Config, Settings, Theme, Helper, Log, BackgroundMusic, Draw, Graphics, Fonts, Language, Game, Profiles, Record, Songs, Video, Sound, Cover, DataBase, Input, Playlist);
}
class BConfig : IConfig
{
public void SetBackgroundMusicVolume(int NewVolume)
{
if (NewVolume < 0)
CConfig.BackgroundMusicVolume = 0;
else if (NewVolume > 100)
CConfig.BackgroundMusicVolume = 100;
else
CConfig.BackgroundMusicVolume = NewVolume;
CConfig.SaveConfig();
}
public int GetBackgroundMusicVolume()
{
return CConfig.BackgroundMusicVolume;
}
public int GetPreviewMusicVolume()
{
return CConfig.PreviewMusicVolume;
}
public ESongMenu GetSongMenuType()
{
return CConfig.SongMenu;
}
public EOffOn GetVideosToBackground()
{
return CConfig.VideosToBackground;
}
public EOffOn GetVideoBackgrounds()
{
return CConfig.VideoBackgrounds;
}
public EOffOn GetVideoPreview()
{
return CConfig.VideoPreview;
}
public EOffOn GetDrawNoteLines()
{
return CConfig.DrawNoteLines;
}
public EOffOn GetDrawToneHelper()
{
return CConfig.DrawToneHelper;
}
public int GetCoverSize()
{
return CConfig.CoverSize;
}
public List<string> GetSongFolder()
{
return CConfig.SongFolder;
}
public ESongSorting GetSongSorting()
{
return CConfig.SongSorting;
}
public EOffOn GetTabs()
{
return CConfig.Tabs;
}
public EOffOn GetIgnoreArticles()
{
return CConfig.IgnoreArticles;
}
public bool IsMicConfigured(int PlayerNr)
{
return CConfig.IsMicConfig(PlayerNr);
}
public int GetMaxNumMics()
{
int max = 0;
for (int i = 0; i < CSettings.MaxNumPlayer; i++)
{
if (CConfig.IsMicConfig(i + 1))
max = i + 1;
else
break;
}
return max;
}
}
class BSettings : ISettings
{
public int GetRenderW()
{
return CSettings.iRenderW;
}
public int GetRenderH()
{
return CSettings.iRenderH;
}
public bool IsTabNavigation()
{
return CSettings.TabNavigation;
}
public float GetZFar()
{
return CSettings.zFar;
}
public float GetZNear()
{
return CSettings.zNear;
}
public EGameState GetGameState()
{
return CSettings.GameState;
}
public int GetToneMin()
{
return CSettings.ToneMin;
}
public int GetToneMax()
{
return CSettings.ToneMax;
}
public int GetNumNoteLines()
{
return CSettings.NumNoteLines;
}
public int GetMaxNumPlayer()
{
return CSettings.MaxNumPlayer;
}
public float GetDefaultMedleyFadeInTime()
{
return CSettings.DefaultMedleyFadeInTime;
}
public float GetDefaultMedleyFadeOutTime()
{
return CSettings.DefaultMedleyFadeOutTime;
}
public int GetMedleyMinSeriesLength()
{
return CSettings.MedleyMinSeriesLength;
}
public float GetMedleyMinDuration()
{
return CSettings.MedleyMinDuration;
}
}
class BTheme : ITheme
{
public string GetThemeScreensPath()
{
return CTheme.GetThemeScreensPath();
}
public int GetSkinIndex()
{
return CTheme.GetSkinIndex();
}
public STexture GetSkinTexture(string TextureName)
{
return CTheme.GetSkinTexture(TextureName);
}
public STexture GetSkinVideoTexture(string VideoName)
{
return CTheme.GetSkinVideoTexture(VideoName);
}
public void SkinVideoResume(string VideoName)
{
CTheme.SkinVideoResume(VideoName);
}
public void SkinVideoPause(string VideoName)
{
CTheme.SkinVideoPause(VideoName);
}
public SColorF GetColor(string ColorName)
{
return CTheme.GetColor(ColorName);
}
public bool GetColor(string ColorName, int SkinIndex, ref SColorF Color)
{
return CTheme.GetColor(ColorName, SkinIndex, ref Color);
}
public SColorF GetPlayerColor(int PlayerNr)
{
return CTheme.GetPlayerColor(PlayerNr);
}
public void UnloadSkins()
{
CTheme.UnloadSkins();
}
public void ListSkins()
{
CTheme.ListSkins();
}
public void LoadSkins()
{
CTheme.LoadSkins();
}
public void LoadTheme()
{
CTheme.LoadTheme();
}
}
class BHelper : IHelper
{
}
class BBackgroundMusic : IBackgroundMusic
{
public bool IsDisabled()
{
return CBackgroundMusic.Disabled;
}
public bool IsPlaying()
{
return CBackgroundMusic.Playing;
}
public bool SongHasVideo()
{
return CBackgroundMusic.SongHasVideo;
}
public bool VideoEnabled()
{
return CBackgroundMusic.VideoEnabled;
}
public void Next()
{
CBackgroundMusic.Next();
}
public void Previous()
{
CBackgroundMusic.Previous();
}
public void Pause()
{
CBackgroundMusic.Pause();
}
public void Play()
{
CBackgroundMusic.Play();
}
public void ApplyVolume()
{
CBackgroundMusic.ApplyVolume();
}
public STexture GetVideoTexture()
{
return CBackgroundMusic.GetVideoTexture();
}
}
class BDraw : IDrawing
{
public RectangleF GetTextBounds(CText text)
{
return CDraw.GetTextBounds(text);
}
public void DrawTexture(STexture Texture, SRectF Rect)
{
CDraw.DrawTexture(Texture, Rect);
}
public void DrawTexture(STexture Texture, SRectF Rect, SColorF Color)
{
CDraw.DrawTexture(Texture, Rect, Color);
}
public void DrawTexture(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds)
{
CDraw.DrawTexture(Texture, Rect, Color, Bounds);
}
public void DrawTexture(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds, bool Mirrored)
{
CDraw.DrawTexture(Texture, Rect, Color, Bounds, Mirrored);
}
public void DrawTextureReflection(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds, float ReflectionSpace, float ReflectionHeight)
{
CDraw.DrawTextureReflection(Texture, Rect, Color, Bounds, ReflectionSpace, ReflectionHeight);
}
public void RemoveTexture(ref STexture Texture)
{
CDraw.RemoveTexture(ref Texture);
}
public void DrawColor(SColorF Color, SRectF Rect)
{
CDraw.DrawColor(Color, Rect);
}
public void DrawColorReflection(SColorF Color, SRectF Rect, float Space, float Height)
{
CDraw.DrawColorReflection(Color, Rect, Space, Height);
}
}
class BGraphics : IGraphics
{
public void ReloadTheme()
{
CGraphics.ReloadTheme();
}
public void SaveTheme()
{
CGraphics.SaveTheme();
}
public void FadeTo(EScreens NextScreen)
{
CGraphics.FadeTo(NextScreen);
}
public float GetGlobalAlpha()
{
return CGraphics.GlobalAlpha;
}
}
class BLog : ILog
{
public void LogError(string ErrorText)
{
CLog.LogError(ErrorText);
}
}
class BFonts : IFonts
{
public void SetFont(string FontName)
{
CFonts.SetFont(FontName);
}
public void SetStyle(EStyle FontStyle)
{
CFonts.Style = FontStyle;
}
public RectangleF GetTextBounds(CText Text, float TextHeight)
{
return CFonts.GetTextBounds(Text, TextHeight);
}
public void DrawText(string Text, float TextHeight, float x, float y, float z, SColorF Color)
{
CFonts.DrawText(Text, TextHeight, x, y, z, Color);
}
public void DrawTextReflection(string Text, float TextHeight, float x, float y, float z, SColorF Color, float ReflectionSpace, float ReflectionHeight)
{
CFonts.DrawTextReflection(Text, TextHeight, x, y, z, Color, ReflectionSpace, ReflectionHeight);
}
public void DrawText(string Text, float TextHeight, float x, float y, float z, SColorF Color, float Begin, float End)
{
CFonts.DrawText(Text, TextHeight, x, y, z, Color, Begin, End);
}
}
class BLanguage : ILanguage
{
public string Translate(string KeyWord)
{
return CLanguage.Translate(KeyWord);
}
public string Translate(string KeyWord, int PartyModeID)
{
return CLanguage.Translate(KeyWord, PartyModeID);
}
public bool TranslationExists(string KeyWord)
{
return CLanguage.TranslationExists(KeyWord);
}
}
class BGame : IGame
{
public int GetNumPlayer()
{
return CGame.NumPlayer;
}
public void SetNumPlayer(int NumPlayer)
{
CGame.NumPlayer = NumPlayer;
}
public SPlayer[] GetPlayer()
{
return CGame.Player;
}
public float GetMidBeatD()
{
return CGame.MidBeatD;
}
public int GetCurrentBeatD()
{
return CGame.ActBeatD;
}
public int GetRandom(int Max)
{
return CGame.Rand.Next(Max);
}
public double GetRandomDouble()
{
return CGame.Rand.NextDouble();
}
public float GetTimeFromBeats(float Beat, float BPM)
{
return CGame.GetTimeFromBeats(Beat, BPM);
}
public void AddSong(int SongID, EGameMode GameMode)
{
CGame.AddSong(SongID, GameMode);
}
public void Reset()
{
CGame.Reset();
}
public void ClearSongs()
{
CGame.ClearSongs();
}
public int GetNumSongs()
{
return CGame.GetNumSongs();
}
}
class BProfiles : IProfiles
{
public SProfile[] GetProfiles()
{
return CProfiles.Profiles;
}
}
class BRecord : IRecording
{
public int GetToneAbs(int PlayerNr)
{
return CSound.RecordGetToneAbs(PlayerNr);
}
}
class BSongs : ISongs
{
public int GetNumVisibleSongs()
{
return CSongs.NumVisibleSongs;
}
public int GetNumCategories()
{
return CSongs.NumCategories;
}
public int NumSongsInCategory(int CategoryIndex)
{
return CSongs.NumSongsInCategory(CategoryIndex);
}
public int GetCurrentCategoryIndex()
{
return CSongs.Category;
}
public EOffOn GetTabs()
{
return CSongs.Tabs;
}
public string GetSearchFilter()
{
return CSongs.SearchFilter;
}
public void SetCategory(int CategoryIndex)
{
CSongs.Category = CategoryIndex;
}
public void UpdateRandomSongList()
{
CSongs.UpdateRandomSongList();
}
public CSong GetVisibleSong(int VisibleIndex)
{
if (VisibleIndex >= CSongs.NumVisibleSongs)
return null;
CSong song = CSongs.VisibleSongs[VisibleIndex];
if (song == null)
return null;
return new CSong(song);
}
public CSong GetSongByID(int SongID)
{
return new CSong(CSongs.GetSong(SongID));
}
public CCategory GetCategory(int Index)
{
if (Index >= CSongs.NumCategories)
return null;
return new CCategory(CSongs.Categories[Index]);
}
public void AddPartySongSung(int SongID)
{
CSongs.AddPartySongSung(SongID);
}
public void ResetPartySongSung()
{
CSongs.ResetPartySongSung();
}
public void ResetPartySongSung(int CatIndex)
{
CSongs.ResetPartySongSung(CatIndex);
}
public void NextCategory()
{
CSongs.NextCategory();
}
public void PrevCategory()
{
CSongs.PrevCategory();
}
}
class BVideo : IVideo
{
public int Load(string VideoFileName)
{
return CVideo.VdLoad(VideoFileName);
}
public bool Skip(int VideoStream, float StartPosition, float VideoGap)
{
return CVideo.VdSkip(VideoStream, StartPosition, VideoGap);
}
public bool GetFrame(int VideoStream, ref STexture VideoTexture, float Time, ref float VideoTime)
{
return CVideo.VdGetFrame(VideoStream, ref VideoTexture, Time, ref VideoTime);
}
public bool IsFinished(int VideoStream)
{
return CVideo.VdFinished(VideoStream);
}
public bool Close(int VideoStream)
{
return CVideo.VdClose(VideoStream);
}
}
class BSound : ISound
{
public int Load(string SoundFile, bool Prescan)
{
return CSound.Load(SoundFile, Prescan);
}
public void SetPosition(int SoundStream, float NewPosition)
{
CSound.SetPosition(SoundStream, NewPosition);
}
public void Play(int SoundStream)
{
CSound.Play(SoundStream);
}
public void Fade(int SoundStream, float TargetVolume, float Duration)
{
CSound.Fade(SoundStream, TargetVolume, Duration);
}
public bool IsFinished(int SoundStream)
{
return CSound.IsFinished(SoundStream);
}
public float GetPosition(int SoundStream)
{
return CSound.GetPosition(SoundStream);
}
public float GetLength(int SoundStream)
{
return CSound.GetLength(SoundStream);
}
public void FadeAndStop(int SoundStream, float TargetVolume, float Duration)
{
CSound.FadeAndStop(SoundStream, TargetVolume, Duration);
}
public void SetStreamVolume(int SoundStream, float Volume)
{
CSound.SetStreamVolume(SoundStream, Volume);
}
public void SetStreamVolumeMax(int SoundStream, float MaxVolume)
{
CSound.SetStreamVolumeMax(SoundStream, MaxVolume);
}
}
class BCover : ICover
{
public STexture GetNoCover()
{
return CCover.NoCover;
}
}
class BDataBase : IDataBase
{
public bool GetCover(string FileName, ref STexture Texture, int CoverSize)
{
return CDataBase.GetCover(FileName, ref Texture, CoverSize);
}
}
class BInputs : IInputs
{
public void SetRumble(float Duration)
{
CInput.SetRumble(Duration);
}
}
class BPlaylist : IPlaylist
{
public void SetPlaylistName(int PlaylistID, string Name)
{
CPlaylists.SetPlaylistName(PlaylistID, Name);
}
public string GetPlaylistName(int PlaylistID)
{
return CPlaylists.GetPlaylistName(PlaylistID);
}
public void DeletePlaylist(int PlaylistID)
{
CPlaylists.DeletePlaylist(PlaylistID);
}
public void SavePlaylist(int PlaylistID)
{
CPlaylists.SavePlaylist(PlaylistID);
}
public int GetNumPlaylists()
{
return CPlaylists.NumPlaylists;
}
public void AddPlaylistSong(int PlaylistID, int SongID)
{
CPlaylists.AddPlaylistSong(PlaylistID, SongID);
}
public void AddPlaylistSong(int PlaylistID, int SongID, EGameMode GameMode)
{
CPlaylists.AddPlaylistSong(PlaylistID, SongID, GameMode);
}
public void InsertPlaylistSong(int PlaylistID, int PositionIndex, int SongID, EGameMode GameMode)
{
CPlaylists.InsertPlaylistSong(PlaylistID, PositionIndex, SongID, GameMode);
}
public void MovePlaylistSong(int PlaylistID, int SourceIndex, int DestIndex)
{
CPlaylists.MovePlaylistSong(PlaylistID, SourceIndex, DestIndex);
}
public void MovePlaylistSongDown(int PlaylistID, int SongIndex)
{
CPlaylists.MovePlaylistSongDown(PlaylistID, SongIndex);
}
public void MovePlaylistSongUp(int PlaylistID, int SongIndex)
{
CPlaylists.MovePlaylistSongUp(PlaylistID, SongIndex);
}
public void DeletePlaylistSong(int PlaylistID, int SongIndex)
{
CPlaylists.DeletePlaylistSong(PlaylistID, SongIndex);
}
public int GetPlaylistSongCount(int PlaylistID)
{
return CPlaylists.GetPlaylistSongCount(PlaylistID);
}
public CPlaylistSong GetPlaylistSong(int PlaylistID, int SongIndex)
{
return CPlaylists.GetPlaylistSong(PlaylistID, SongIndex);
}
}
}
+395
View File
@@ -0,0 +1,395 @@
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Menu;
using Vocaluxe.PartyModes;
namespace Vocaluxe.Base
{
#region Structs
struct SPartyMode
{
public int PartyModeID;
public int PartyModeSystemVersion;
public string Name;
public string Description;
public string Author;
public string Folder;
public string PartyModeFile;
public List<string> ScreenFiles;
public int PartyModeVersionMajor;
public int PartyModeVersionMinor;
public string TargetAudience;
public bool NoErrors;
public IPartyMode PartyMode;
}
#endregion Structs
static class CParty
{
const int PartyModeSystemVersion = 1;
private static CHelper Helper;
private static Dictionary<int, SPartyMode> _PartyModes;
private static Queue<int> _IDs;
private static int _NormalGameModeID;
private static SPartyMode _CurrentPartyMode;
#region public stuff
public static void Init()
{
Helper = new CHelper();
_PartyModes = new Dictionary<int, SPartyMode>();
_IDs = new Queue<int>(1000);
for (int i = 0; i < 1000; i++)
_IDs.Enqueue(i);
//add dummy normal game mode and set it as default
SPartyMode pm = new SPartyMode();
pm.PartyMode = new CPartyModeNone();
pm.ScreenFiles = new List<string>();
pm.PartyMode.Initialize(CMain.Base);
pm.PartyModeID = _IDs.Dequeue();
_NormalGameModeID = pm.PartyModeID;
_PartyModes.Add(pm.PartyModeID, pm);
_CurrentPartyMode = pm;
//load other party modes
LoadPartyModes();
}
public static int CurrentPartyModeID
{
get
{
if (_CurrentPartyMode.PartyModeID != _NormalGameModeID)
return _CurrentPartyMode.PartyModeID;
return -1;
}
}
public static int NumModes
{
get { return _PartyModes.Count; }
}
public static List<SPartyModeInfos> GetPartyModeInfos()
{
List<SPartyModeInfos> infos = new List<SPartyModeInfos>();
int[] UsedKeys = new int[_PartyModes.Count];
_PartyModes.Keys.CopyTo(UsedKeys, 0);
for (int i = 0; i < UsedKeys.Length; i++)
{
if (UsedKeys[i] != _NormalGameModeID)
{
SPartyMode mode = new SPartyMode();
_PartyModes.TryGetValue(UsedKeys[i], out mode);
if (mode.PartyMode != null)
{
SPartyModeInfos info = new SPartyModeInfos();
info.Author = mode.Author;
info.Description = mode.Description;
info.Name = mode.Name;
info.PartyModeID = mode.PartyModeID;
info.Playable = mode.NoErrors;
info.VersionMajor = mode.PartyModeVersionMajor;
info.VersionMinor = mode.PartyModeVersionMinor;
info.TargetAudience = mode.TargetAudience;
info.MaxPlayers = mode.PartyMode.GetMaxPlayer();
info.MinPlayers = mode.PartyMode.GetMinPlayer();
info.MaxTeams = mode.PartyMode.GetMaxTeams();
info.MinTeams = mode.PartyMode.GetMinTeams();
infos.Add(info);
}
}
}
return infos;
}
public static void SetNormalGameMode()
{
CSongs.ResetPartySongSung();
SetPartyMode(_NormalGameModeID);
}
public static void SetPartyMode(int PartyModeID)
{
if (!_PartyModes.TryGetValue(PartyModeID, out _CurrentPartyMode))
CLog.LogError("CParty: Can't find party mode ID: " + PartyModeID.ToString());
_CurrentPartyMode.PartyMode.Init();
}
public static CMenu GetNextPartyScreen(out EScreens AlternativeScreen)
{
return _CurrentPartyMode.PartyMode.GetNextPartyScreen(out AlternativeScreen);
}
#endregion public stuff
#region Interface
public static void UpdateGame()
{
_CurrentPartyMode.PartyMode.UpdateGame();
}
public static EScreens GetStartScreen()
{
return _CurrentPartyMode.PartyMode.GetStartScreen();
}
public static EScreens GetMainScreen()
{
return _CurrentPartyMode.PartyMode.GetMainScreen();
}
public static ScreenSongOptions GetSongSelectionOptions()
{
return _CurrentPartyMode.PartyMode.GetScreenSongOptions();
}
public static void SetSearchString(string SearchString, bool Visible)
{
_CurrentPartyMode.PartyMode.SetSearchString(SearchString, Visible);
}
public static void JokerUsed(int TeamNr)
{
_CurrentPartyMode.PartyMode.JokerUsed(TeamNr);
}
public static void SongSelected(int SongID)
{
_CurrentPartyMode.PartyMode.SongSelected(SongID);
}
public static void FinishedSinging()
{
_CurrentPartyMode.PartyMode.FinishedSinging();
}
public static void LeavingScore()
{
_CurrentPartyMode.PartyMode.LeavingScore();
}
public static void LeavingHighscore()
{
_CurrentPartyMode.PartyMode.LeavingHighscore();
}
#endregion Interface
#region private stuff
private static void LoadPartyModes()
{
List<string> files = new List<string>();
files.AddRange(Helper.ListFiles(CSettings.sFolderPartyModes, "*.xml", false, true));
foreach (string file in files)
{
SPartyMode pm = LoadPartyMode(file);
_PartyModes.Add(pm.PartyModeID, pm);
}
}
private static SPartyMode LoadPartyMode(string file)
{
SPartyMode pm = new SPartyMode();
pm.PartyModeID = _IDs.Dequeue();
pm.ScreenFiles = new List<string>();
pm.NoErrors = false;
bool loaded = false;
XPathDocument xPathDoc = null;
XPathNavigator navigator = null;
try
{
xPathDoc = new XPathDocument(file);
navigator = xPathDoc.CreateNavigator();
loaded = true;
}
catch (Exception e)
{
loaded = false;
if (navigator != null)
navigator = null;
if (xPathDoc != null)
xPathDoc = null;
CLog.LogError("Error opening party mode file " + file + ": " + e.Message);
}
if (loaded)
{
loaded &= CHelper.TryGetIntValueFromXML("//root/PartyModeSystemVersion", navigator, ref pm.PartyModeSystemVersion);
loaded &= CHelper.GetValueFromXML("//root/Info/Name", navigator, ref pm.Name, "ERROR Name");
loaded &= CHelper.GetValueFromXML("//root/Info/Description", navigator, ref pm.Description, "ERROR Description");
loaded &= CHelper.GetValueFromXML("//root/Info/Author", navigator, ref pm.Author, "ERROR Author");
loaded &= CHelper.GetValueFromXML("//root/Info/Folder", navigator, ref pm.Folder, "ERROR Folder");
loaded &= CHelper.GetValueFromXML("//root/Info/PartyModeFile", navigator, ref pm.PartyModeFile, "ERROR PartyModeFile");
loaded &= CHelper.GetInnerValuesFromXML("PartyScreens", navigator, ref pm.ScreenFiles);
loaded &= CHelper.TryGetIntValueFromXML("//root/Info/PartyModeVersionMajor", navigator, ref pm.PartyModeVersionMajor);
loaded &= CHelper.TryGetIntValueFromXML("//root/Info/PartyModeVersionMinor", navigator, ref pm.PartyModeVersionMinor);
loaded &= CHelper.GetValueFromXML("//root/Info/TargetAudience", navigator, ref pm.TargetAudience, "ERROR TargetAudience");
if (pm.PartyModeSystemVersion != PartyModeSystemVersion)
{
CLog.LogError("Error loading PartyMode file (wrong PartyModeSystemVersion): " + file);
return pm;
}
if (pm.ScreenFiles.Count == 0)
{
CLog.LogError("Error loading PartyMode file (no ScreenFiles found): " + file);
return pm;
}
}
if (!loaded)
{
CLog.LogError("Error loading PartyMode file: " + file);
return pm;
}
string PathToCode = Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), CSettings.sFolderPartyModeCode);
List<string> FilesToCompile = new List<string>();
FilesToCompile.AddRange(Helper.ListFiles(PathToCode, "*.cs", false, true));
Assembly Output = CompileFiles(FilesToCompile.ToArray());
if (Output == null)
return pm;
if (!CLanguage.LoadPartyLanguageFiles(pm.PartyModeID, Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), CSettings.sFolderPartyModeLanguages)))
{
CLog.LogError("Error loading language files for PartyMode: " + file);
return pm;
}
object Instance = Output.CreateInstance("Vocaluxe.PartyModes." + pm.PartyModeFile);
if (Instance == null)
{
CLog.LogError("Error creating Instance of PartyMode file: " + file);
return pm;
}
try
{
pm.PartyMode = (IPartyMode)Instance;
}
catch (Exception e)
{
CLog.LogError("Error casting PartyMode file: " + file + "; " + e.Message);
return pm;
}
pm.PartyMode.Initialize(CMain.Base);
foreach (string screenfile in pm.ScreenFiles)
{
string XmlPath = Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), CSettings.sFolderPartyModeScreens);
CMenuParty Screen = GetPartyScreenInstance(
Output,
screenfile,
Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), CSettings.sFolderPartyModeScreens)
);
if (Screen != null)
{
Screen.Initialize(CMain.Base);
Screen.AssingPartyMode(pm.PartyMode);
Screen.SetPartyModeID(pm.PartyModeID);
Screen.LoadTheme(XmlPath);
pm.PartyMode.AddScreen(Screen, screenfile);
}
else
return pm;
}
pm.NoErrors = true;
return pm;
}
private static Assembly CompileFiles(string[] files)
{
if (files == null)
return null;
if (files.Length == 0)
return null;
CompilerParameters Params = new CompilerParameters();
Params.ReferencedAssemblies.Add("System.Windows.Forms.dll");
Params.ReferencedAssemblies.Add("VocaluxeLib.dll");
Params.GenerateInMemory = true;
#if DEBUG
Params.IncludeDebugInformation = true;
#endif
CodeDomProvider CDP = CodeDomProvider.CreateProvider("CSharp");
CompilerResults CompileResult = null;
try
{
CompileResult = CDP.CompileAssemblyFromFile(Params, files);
}
catch (Exception e)
{
CLog.LogError("Error Compiling Source (" + CHelper.ListStrings(files) + "): " + e.Message);
return null;
}
if (CompileResult.Errors.Count > 0)
{
for (int i = 0; i < CompileResult.Errors.Count; i++)
{
CLog.LogError("Error Compiling Source (" + CHelper.ListStrings(files) + "): " + CompileResult.Errors[i].ErrorText);
}
return null;
}
return CompileResult.CompiledAssembly;
}
private static CMenuParty GetPartyScreenInstance(Assembly Assembly, string ScreenName, string XmlPath)
{
if (Assembly == null)
return null;
object Instance = Assembly.CreateInstance("Vocaluxe.PartyModes." + ScreenName);
if (Instance == null)
{
CLog.LogError("Error creating Instance of PartyScreen: " + ScreenName);
return null;
}
CMenuParty Screen = null;
try
{
Screen = (CMenuParty)Instance;
}
catch (Exception e)
{
CLog.LogError("Error casting PartyScreen: " + ScreenName + "; " + e.Message);
return null;
}
return Screen;
}
#endregion private stuff
}
}
+100 -7
View File
@@ -5,8 +5,10 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Lib.Song;
using Vocaluxe.Lib.Playlist;
using Vocaluxe.GameModes;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Base
{
@@ -59,16 +61,20 @@ namespace Vocaluxe.Base
SortPlaylistsByName();
}
#region private methods
private static void SortPlaylistsByName()
public static string GetPlaylistName(int PlaylistID)
{
_Playlists.Sort(CompareByPlaylistName);
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return "Error: Can't find Playlist";
return _Playlists[PlaylistID].PlaylistName;
}
private static int CompareByPlaylistName(CPlaylistFile a, CPlaylistFile b)
public static void SetPlaylistName(int PlaylistID, string Name)
{
return String.Compare(a.PlaylistName, b.PlaylistName);
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].PlaylistName = Name;
}
public static void DeletePlaylist(int PlaylistID)
@@ -104,6 +110,93 @@ namespace Vocaluxe.Base
return (_Playlists.Count - 1);
}
public static void AddPlaylistSong(int PlaylistID, int SongID)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].AddSong(SongID);
}
public static void AddPlaylistSong(int PlaylistID, int SongID, EGameMode GameMode)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].AddSong(SongID, GameMode);
}
public static void InsertPlaylistSong(int PlaylistID, int PositionIndex, int SongID, EGameMode GameMode)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].SongInsert(PositionIndex, SongID, GameMode);
}
public static void MovePlaylistSong(int PlaylistID, int SourceIndex, int DestIndex)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].SongMove(SourceIndex, DestIndex);
}
public static void MovePlaylistSongDown(int PlaylistID, int SongIndex)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].SongDown(SongIndex);
}
public static void MovePlaylistSongUp(int PlaylistID, int SongIndex)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].SongUp(SongIndex);
}
public static void DeletePlaylistSong(int PlaylistID, int SongIndex)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return;
_Playlists[PlaylistID].DeleteSong(SongIndex);
}
public static int GetPlaylistSongCount(int PlaylistID)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return 0;
return _Playlists[PlaylistID].Songs.Count;
}
public static CPlaylistSong GetPlaylistSong(int PlaylistID, int SongIndex)
{
if (PlaylistID >= _Playlists.Count || PlaylistID < 0)
return null;
if (SongIndex >= _Playlists[PlaylistID].Songs.Count)
return null;
return _Playlists[PlaylistID].Songs[SongIndex];
}
#region private methods
private static void SortPlaylistsByName()
{
_Playlists.Sort(CompareByPlaylistName);
}
private static int CompareByPlaylistName(CPlaylistFile a, CPlaylistFile b)
{
return String.Compare(a.PlaylistName, b.PlaylistName);
}
#endregion
}
}
+2 -24
View File
@@ -6,32 +6,10 @@ using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
struct SProfile
{
public string PlayerName;
public string ProfileFile;
public EGameDifficulty Difficulty;
public SAvatar Avatar;
public EOffOn GuestProfile;
public EOffOn Active;
}
struct SAvatar
{
public string FileName;
public STexture Texture;
public SAvatar(int dummy)
{
FileName = String.Empty;
Texture = new STexture(-1);
}
}
{
static class CProfiles
{
private static XmlWriterSettings _settings = new XmlWriterSettings();
+11 -10
View File
@@ -3,15 +3,10 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
public enum EGameState
{
Start,
Normal,
EditTheme
}
enum ERevision
{
Alpha,
@@ -40,14 +35,14 @@ namespace Vocaluxe.Base
public static EGameState GameState = EGameState.Start;
public const string sProgramName = "Vocaluxe";
public const string sProgramCodeName = "Test";
public const string sProgramCodeName = "Sparkling Sky";
public const int iVersionMajor = 0;
public const int iVersionMinor = 2; // milestones
public const int iVersionSub = 0; // patches
public const ERevision VersionRevision = ERevision.RC;
public const ERevision VersionRevision = ERevision.Release;
public const int iBuild = 71; // Increase on every published version! Never Reset!
public const int iBuild = 72; // Increase on every published version! Never Reset!
public const int iDatabaseHighscoreVersion = 2;
public const int iDatabaseCoverVersion = 1;
@@ -96,6 +91,12 @@ namespace Vocaluxe.Base
public const string sFolderBackgroundMusic = "BackgroundMusic";
public static string sFolderPlaylists = "Playlists";
public static string sFolderPartyModes = "PartyModes";
public const string sFolderPartyModeCode = "Code";
public const string sFolderPartyModeScreens = "Screens";
public const string sFolderPartyModeLanguages = "Languages";
//public const String[] ToneStrings = new String[]{ "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" };
public const int ToneMin = -36;
public const int ToneMax = 89;
+95 -46
View File
@@ -8,8 +8,9 @@ using System.Text.RegularExpressions;
using System.Threading;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Base
{
@@ -20,6 +21,7 @@ namespace Vocaluxe.Base
public int CatIndex;
public bool Visible;
public bool PartyHidden;
public SongPointer(int ID, string sortString)
{
@@ -27,20 +29,7 @@ namespace Vocaluxe.Base
SortString = sortString;
CatIndex = -1;
Visible = false;
}
}
public class CCategory
{
public string Name = String.Empty;
public STexture CoverTextureSmall = new STexture();
public STexture CoverTextureBig = new STexture();
public CCategory(string name, STexture CoverSmall, STexture CoverBig)
{
Name = name;
CoverTextureSmall = CoverSmall;
CoverTextureBig = CoverBig;
PartyHidden = false;
}
}
@@ -62,6 +51,9 @@ namespace Vocaluxe.Base
private static string _SearchFilter = String.Empty;
private static EOffOn _Tabs = CConfig.Tabs;
private static EOffOn _IgnoreArticles = CConfig.IgnoreArticles;
private static ESongSorting _SongSorting = CConfig.SongSorting;
private static bool _ShowDuetSongs = true;
private static Thread _CoverLoaderThread = new Thread(new ThreadStart(_LoadCover));
@@ -70,14 +62,13 @@ namespace Vocaluxe.Base
get { return _SearchFilter; }
set
{
_SearchFilter = value;
if (_SearchFilter.Length > 0)
if (value.Length > 0)
{
_Sort(CConfig.SongSorting, EOffOn.TR_CONFIG_OFF, _SearchFilter);
_Sort(_SongSorting, EOffOn.TR_CONFIG_OFF, _IgnoreArticles, value, false, _ShowDuetSongs);
}
else
{
Sort();
_Sort(_SongSorting, _Tabs, _IgnoreArticles, value, false, _ShowDuetSongs);
}
}
}
@@ -87,6 +78,11 @@ namespace Vocaluxe.Base
get { return _Tabs; }
}
public static EOffOn IgnoreArticles
{
get { return _IgnoreArticles; }
}
public static bool SongsLoaded
{
get { return _SongsLoaded; }
@@ -131,13 +127,13 @@ namespace Vocaluxe.Base
get { return _CatIndex; }
set
{
if ((_Categories.Count > value) && (value >= -1))
if ((_Categories.Count > value) && (value >= -1) && _CatIndex != value)
{
_CatIndex = value;
for (int i = 0; i < _SongsSortList.Length; i++)
{
_SongsSortList[i].Visible = (_SongsSortList[i].CatIndex == _CatIndex);
_SongsSortList[i].Visible = (_SongsSortList[i].CatIndex == _CatIndex && !_SongsSortList[i].PartyHidden);
}
}
}
@@ -156,7 +152,7 @@ namespace Vocaluxe.Base
int num = 0;
for (int i = 0; i < _SongsSortList.Length; i++)
{
if (_SongsSortList[i].CatIndex == CatIndex)
if (_SongsSortList[i].CatIndex == CatIndex && !_SongsSortList[i].PartyHidden)
num++;
}
return num;
@@ -225,7 +221,7 @@ namespace Vocaluxe.Base
_CoverLoaded = true;
}
public static string GetActualCategoryName()
public static string GetCurrentCategoryName()
{
if ((_Categories.Count > 0) && (_CatIndex >= 0) && (_Categories.Count > _CatIndex))
return _Categories[_CatIndex].Name;
@@ -243,6 +239,48 @@ namespace Vocaluxe.Base
return null;
}
public static void AddPartySongSung(int SongID)
{
int cat = -1;
for (int i = 0; i < _SongsSortList.Length; i++)
{
if (SongID == _SongsSortList[i].SongID)
{
_SongsSortList[i].PartyHidden = true;
_SongsSortList[i].Visible = false;
cat = _SongsSortList[i].CatIndex;
break;
}
}
if (cat != -1)
{
if (NumSongsInCategory(cat) == 0)
ResetPartySongSung(cat);
}
}
public static void ResetPartySongSung()
{
for (int i = 0; i < _SongsSortList.Length; i++)
{
_SongsSortList[i].PartyHidden = false;
_SongsSortList[i].Visible = (_SongsSortList[i].CatIndex == _CatIndex && !_SongsSortList[i].PartyHidden);
}
}
public static void ResetPartySongSung(int CatIndex)
{
for (int i = 0; i < _SongsSortList.Length; i++)
{
if (_SongsSortList[i].CatIndex == CatIndex)
{
_SongsSortList[i].PartyHidden = false;
_SongsSortList[i].Visible = (_SongsSortList[i].CatIndex == _CatIndex && !_SongsSortList[i].PartyHidden);
}
}
}
public static int GetVisibleSongNumber(int SongID)
{
int i = -1;
@@ -329,41 +367,52 @@ namespace Vocaluxe.Base
get { return _Categories.ToArray(); }
}
public static void Sort()
public static void Sort(ESongSorting Sorting, EOffOn Tabs, EOffOn IgnoreArticles, String SearchString)
{
_Sort(CConfig.SongSorting, CConfig.Tabs, String.Empty);
_Sort(Sorting, Tabs, IgnoreArticles, SearchString, false, _ShowDuetSongs);
}
public static void Sort(ESongSorting sorting)
public static void Sort(ESongSorting Sorting, EOffOn Tabs, EOffOn IgnoreArticles, String SearchString, bool ShowDuetSongs)
{
_Sort(sorting, CConfig.Tabs, String.Empty);
_Sort(Sorting, Tabs, IgnoreArticles, SearchString, false, ShowDuetSongs);
}
private static void _Sort(ESongSorting sorting, EOffOn Tabs, string SearchString)
private static void _Sort(ESongSorting Sorting, EOffOn Tabs, EOffOn IgnoreArticles, string SearchString, bool force, bool ShowDuetSongs)
{
if (_Songs.Count == 0)
return;
if (!force && Sorting == _SongSorting && Tabs == _Tabs && IgnoreArticles == _IgnoreArticles && SearchString == _SearchFilter && ShowDuetSongs == _ShowDuetSongs)
return; //nothing to do
_Categories.Clear();
string category = String.Empty;
_IgnoreArticles = IgnoreArticles;
_SongSorting = Sorting;
_Tabs = Tabs;
_ShowDuetSongs = ShowDuetSongs;
_SearchFilter = SearchString;
List<SongPointer> _SortList = new List<SongPointer>();
List<CSong> _SongList = new List<CSong>();
foreach (CSong song in _Songs)
{
if (SearchString == String.Empty)
_SongList.Add(song);
else
if (!song.IsDuet || _ShowDuetSongs)
{
if (song.Title.ToUpper().Contains(SearchString.ToUpper()) || song.Artist.ToUpper().Contains(SearchString.ToUpper()))
if (_SearchFilter == String.Empty)
_SongList.Add(song);
else
{
if (song.Title.ToUpper().Contains(_SearchFilter.ToUpper()) || song.Artist.ToUpper().Contains(_SearchFilter.ToUpper()))
_SongList.Add(song);
}
}
}
switch (sorting)
switch (_SongSorting)
{
case ESongSorting.TR_CONFIG_EDITION:
foreach (CSong song in _SongList)
@@ -384,7 +433,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.ToUpper().CompareTo(s2.SortString.ToUpper());
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -450,7 +499,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.ToUpper().CompareTo(s2.SortString.ToUpper());
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -535,7 +584,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.ToUpper().CompareTo(s2.SortString.ToUpper());
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -578,7 +627,7 @@ namespace Vocaluxe.Base
_SortList.Sort(delegate(SongPointer s1, SongPointer s2)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
int res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -614,7 +663,7 @@ namespace Vocaluxe.Base
case ESongSorting.TR_CONFIG_ARTIST_LETTER:
foreach (CSong song in _SongList)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
_SortList.Add(new SongPointer(song.ID, song.ArtistSorting));
else
_SortList.Add(new SongPointer(song.ID, song.Artist));
@@ -625,7 +674,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.ToUpper().CompareTo(s2.SortString.ToUpper());
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
return _Songs[s1.SongID].TitleSorting.ToUpper().CompareTo(_Songs[s2.SongID].TitleSorting.ToUpper());
}
@@ -672,7 +721,7 @@ namespace Vocaluxe.Base
case ESongSorting.TR_CONFIG_TITLE_LETTER:
foreach (CSong song in _SongList)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
_SortList.Add(new SongPointer(song.ID, song.TitleSorting));
else
_SortList.Add(new SongPointer(song.ID, song.Title));
@@ -683,7 +732,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.ToUpper().CompareTo(s2.SortString.ToUpper());
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
return _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
}
@@ -738,7 +787,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.CompareTo(s2.SortString);
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -797,7 +846,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.CompareTo(s2.SortString);
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -863,7 +912,7 @@ namespace Vocaluxe.Base
int res = s1.SortString.CompareTo(s2.SortString);
if (res == 0)
{
if (CConfig.IgnoreArticles == EOffOn.TR_CONFIG_ON)
if (_IgnoreArticles == EOffOn.TR_CONFIG_ON)
{
res = _Songs[s1.SongID].ArtistSorting.ToUpper().CompareTo(_Songs[s2.SongID].ArtistSorting.ToUpper());
if (res == 0)
@@ -950,7 +999,7 @@ namespace Vocaluxe.Base
CLog.StartBenchmark(2, "Read TXTs");
foreach (string file in files)
{
CSong Song = new CSong();
CSong Song = new CSong(CMain.Base);
if (Song.ReadTXTSong(file))
{
Song.ID = _Songs.Count;
@@ -960,7 +1009,7 @@ namespace Vocaluxe.Base
CLog.StopBenchmark(2, "Read TXTs");
CLog.StartBenchmark(2, "Sort Songs");
Sort(CConfig.SongSorting);
_Sort(CConfig.SongSorting, CConfig.Tabs, CConfig.IgnoreArticles, String.Empty, true, true);
CLog.StopBenchmark(2, "Sort Songs");
Category = -1;
_SongsLoaded = true;
+1
View File
@@ -5,6 +5,7 @@ using System.IO;
using System.Text;
using Vocaluxe.Lib.Sound;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
-2
View File
@@ -126,8 +126,6 @@ namespace Vocaluxe.Base
_settings.Encoding = Encoding.UTF8;
_settings.ConformanceLevel = ConformanceLevel.Document;
//ThemeColors.Player = new SColorF[6];
ListThemes();
ListSkins();
+1 -440
View File
@@ -10,130 +10,10 @@ using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
[Flags]
public enum EModifier
{
None,
Shift,
Alt,
Ctrl
}
public enum ESender
{
Mouse,
Keyboard,
WiiMote,
Gamepad
}
public struct KeyEvent
{
public ESender Sender;
public bool ModALT;
public bool ModSHIFT;
public bool ModCTRL;
public bool KeyPressed;
public bool Handled;
public Keys Key;
public Char Unicode;
public EModifier Mod;
public KeyEvent(ESender sender, bool alt, bool shift, bool ctrl, bool pressed, char unicode, Keys key)
{
Sender = sender;
ModALT = alt;
ModSHIFT = shift;
ModCTRL = ctrl;
KeyPressed = pressed;
Unicode = unicode;
Key = key;
Handled = false;
EModifier mALT = EModifier.None;
EModifier mSHIFT = EModifier.None;
EModifier mCTRL = EModifier.None;
if (alt)
mALT = EModifier.Alt;
if (shift)
mSHIFT = EModifier.Shift;
if (ctrl)
mCTRL = EModifier.Ctrl;
if (!alt && !shift && !ctrl)
Mod = EModifier.None;
else
Mod = mALT | mSHIFT | mCTRL;
}
}
public struct MouseEvent
{
public ESender Sender;
public int X;
public int Y;
public bool LB; //left button click
public bool LD; //left button double click
public bool RB; //right button click
public bool MB; //middle button click
public bool LBH; //left button hold (when moving)
public bool RBH; //right button hold (when moving)
public bool MBH; //middle button hold (when moving)
public bool ModALT;
public bool ModSHIFT;
public bool ModCTRL;
public EModifier Mod;
public int Wheel;
public MouseEvent(ESender sender, bool alt, bool shift, bool ctrl, int x, int y, bool lb, bool ld, bool rb, int wheel, bool lbh, bool rbh, bool mb, bool mbh)
{
Sender = sender;
X = x;
Y = y;
LB = lb;
LD = ld;
RB = rb;
MB = mb;
LBH = lbh;
RBH = rbh;
MBH = mbh;
ModALT = alt;
ModSHIFT = shift;
ModCTRL = ctrl;
EModifier mALT = EModifier.None;
EModifier mSHIFT = EModifier.None;
EModifier mCTRL = EModifier.None;
if (alt)
mALT = EModifier.Alt;
if (shift)
mSHIFT = EModifier.Shift;
if (ctrl)
mCTRL = EModifier.Ctrl;
if (!alt && !shift && !ctrl)
Mod = EModifier.None;
else
Mod = mALT | mSHIFT | mCTRL;
Wheel = wheel;
}
}
static class CTime
{
private static Stopwatch _Stopwatch = new Stopwatch();
@@ -468,323 +348,4 @@ namespace Vocaluxe.Base
}
}
class CHelper
{
public static int TryReadInt(StreamReader sr)
{
char chr = '0';
string value = String.Empty;
try
{
chr = (char)sr.Peek();
while ((chr.CompareTo(' ') != 0) && ((int)chr != 19) && ((int)chr != 16) && ((int)chr != 13))
{
chr = (char)sr.Read();
value += chr.ToString();
chr = (char)sr.Peek();
}
}
catch (Exception)
{
return 0;
}
int result = 0;
int.TryParse(value, out result);
return result;
}
public static void SetRect(RectangleF Bounds, ref RectangleF Rect, float RectAspect, EAspect Aspect)
{
float rW = Bounds.Right - Bounds.Left;
float rH = Bounds.Bottom - Bounds.Top;
float rA = rW / rH;
float ScaledWidth = rW;
float ScaledHeight = rH;
switch (Aspect)
{
case EAspect.Crop:
if (rA >= RectAspect)
{
ScaledWidth = rW;
ScaledHeight = rH * rA / RectAspect;
}
else
{
ScaledHeight = rH;
ScaledWidth = rW * RectAspect / rA;
}
break;
case EAspect.LetterBox:
if (RectAspect >= 1)
{
ScaledWidth = rW;
ScaledHeight = rH * rA / RectAspect;
}
else
{
ScaledHeight = rH;
ScaledWidth = rW * RectAspect / rA;
}
break;
default:
ScaledWidth = rW;
ScaledHeight = rH;
break;
}
float Left = (rW - ScaledWidth) / 2 + Bounds.Left;
float Rigth = Left + ScaledWidth;
float Upper = (rH - ScaledHeight) / 2 + Bounds.Top;
float Lower = Upper + ScaledHeight;
Rect = new RectangleF(Left, Upper, Rigth - Left, Lower - Upper);
}
public static bool TryGetEnumValueFromXML<T>(string Cast, XPathNavigator Navigator, ref T value)
where T : struct
{
string val = String.Empty;
if (GetValueFromXML(Cast, Navigator, ref val, Enum.GetName(typeof(T), value)))
{
TryParse<T>(val, out value, true);
return true;
}
return false;
}
public static bool TryGetIntValueFromXML(string Cast, XPathNavigator Navigator, ref int value)
{
string val = String.Empty;
if (GetValueFromXML(Cast, Navigator, ref val, value.ToString()))
{
int res = 0;
if (int.TryParse(val, out res))
{
value = res;
return true;
}
}
return false;
}
public static bool TryGetFloatValueFromXML(string Cast, XPathNavigator Navigator, ref float value)
{
string val = String.Empty;
if (GetValueFromXML(Cast, Navigator, ref val, value.ToString()))
{
float res = 0;
if (TryParse(val, out res))
{
value = res;
return true;
}
}
return false;
}
public static bool GetValueFromXML(string Cast, XPathNavigator Navigator, ref string Value, string DefaultValue)
{
XPathNodeIterator iterator;
int results = 0;
string val = string.Empty;
try
{
Navigator.MoveToFirstChild();
iterator = Navigator.Select(Cast);
while (iterator.MoveNext())
{
val = iterator.Current.Value;
results++;
}
}
catch (Exception)
{
results = 0;
}
if ((results == 0) || (results > 1))
{
Value = DefaultValue;
return false;
}
else
{
Value = val;
return true;
}
}
public static List<string> GetValuesFromXML(string Cast, XPathNavigator Navigator)
{
List<string> values = new List<string>();
try
{
Navigator.MoveToRoot();
Navigator.MoveToFirstChild();
Navigator.MoveToFirstChild();
while (Navigator.Name != Cast)
Navigator.MoveToNext();
Navigator.MoveToFirstChild();
values.Add(Navigator.LocalName);
while(Navigator.MoveToNext())
values.Add(Navigator.LocalName);
}
catch (Exception)
{
}
return values;
}
public static bool ItemExistsInXML(string Cast, XPathNavigator Navigator)
{
XPathNodeIterator iterator;
int results = 0;
try
{
Navigator.MoveToFirstChild();
iterator = Navigator.Select(Cast);
while (iterator.MoveNext())
results++;
}
catch (Exception)
{
results = 0;
}
if (results == 0)
return false;
return true;
}
public List<string> ListFiles(string path, string cast)
{
return ListFiles(path, cast, false, false);
}
public List<string> ListFiles(string path, string cast, bool recursive)
{
return ListFiles(path, cast, recursive, false);
}
public List<string> ListFiles(string path, string cast, bool recursive, bool fullpath)
{
List<string> files = new List<string>();
DirectoryInfo dir = new DirectoryInfo(path);
try
{
foreach (FileInfo file in dir.GetFiles(cast))
{
if (!fullpath)
files.Add(file.Name);
else
//files.Add(Path.Combine(file.DirectoryName, file.Name));
files.Add(file.FullName);
}
if (recursive)
{
foreach (DirectoryInfo di in dir.GetDirectories())
{
files.AddRange(ListFiles(di.FullName, cast, recursive, fullpath));
}
}
} catch (Exception)
{
}
return files;
}
public static bool TryParse<T>(string value, out T result)
where T : struct
{
return TryParse<T>(value, out result, false);
}
public static bool TryParse<T>(string value, out T result, bool ignoreCase)
where T : struct
{
result = default(T);
try
{
result = (T)Enum.Parse(typeof(T), value, ignoreCase);
return true;
}
catch { }
return false;
}
public static bool TryParse(string value, out float result)
{
value = value.Replace(',', '.');
return float.TryParse(value, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, NumberFormatInfo.InvariantInfo, out result);
}
public static bool IsInBounds(SRectF bounds, MouseEvent MouseEvent)
{
return IsInBounds(bounds, MouseEvent.X, MouseEvent.Y);
}
public static bool IsInBounds(SRectF bounds, int x, int y)
{
return ((bounds.X <= x) && (bounds.X + bounds.W >= x) && (bounds.Y <= y) && (bounds.Y + bounds.H >= y));
}
}
static class CEncoding
{
public static Encoding GetEncoding(string EncodingName)
{
switch (EncodingName)
{
case "AUTO":
return Encoding.Default;
case "CP1250":
return Encoding.GetEncoding(1250);
case "CP1252":
return Encoding.GetEncoding(1252);
case "LOCALE":
return Encoding.Default;
case "UTF8":
return Encoding.UTF8;
default:
return Encoding.UTF8;
}
}
public static string GetEncodingName(Encoding Enc)
{
string Result = "UTF8";
if (Enc.CodePage == 1250)
Result = "CP1250";
if (Enc.CodePage == 1252)
Result = "CP1252";
return Result;
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Diagnostics;
using System.Drawing;
using System.Text;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Lib.Video;
namespace Vocaluxe.Base
+3 -1
View File
@@ -1,10 +1,12 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using Vocaluxe.Lib.Webcam;
using Vocaluxe.Lib.Draw;
using System.Drawing;
using Vocaluxe.Menu;
namespace Vocaluxe.Base
{
+2 -1
View File
@@ -3,7 +3,8 @@ using System.Collections.Generic;
using System.Text;
using Vocaluxe.Base;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.GameModes
{
+2 -9
View File
@@ -3,18 +3,11 @@ using System.Collections.Generic;
using System.Text;
using Vocaluxe.Base;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.GameModes
{
public enum EGameMode
{
TR_GAMEMODE_NORMAL,
TR_GAMEMODE_MEDLEY,
TR_GAMEMODE_DUET,
TR_GAMEMODE_SHORTSONG
}
interface IGameMode
{
void Init();
-116
View File
@@ -8,122 +8,6 @@ using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Draw
{
#region Structs
public struct SColorF
{
public float R;
public float G;
public float B;
public float A;
public SColorF(float r, float g, float b, float a)
{
R = r;
G = g;
B = b;
A = a;
}
public SColorF(SColorF Color)
{
R = Color.R;
G = Color.G;
B = Color.B;
A = Color.A;
}
}
public struct SRectF
{
public float X;
public float Y;
public float W;
public float H;
public float Z;
public float Rotation; //0..360°
public SRectF(float x, float y, float w, float h, float z)
{
X = x;
Y = y;
W = w;
H = h;
Z = z;
Rotation = 0f;
}
public SRectF(SRectF rect)
{
X = rect.X;
Y = rect.Y;
W = rect.W;
H = rect.H;
Z = rect.Z;
Rotation = 0f;
}
}
public struct SPoint3f
{
public float X;
public float Y;
public float Z;
}
public struct SPoint3
{
public int X;
public int Y;
public int Z;
}
public struct STexture
{
public int index;
public int PBO;
public int ID;
public string TexturePath;
public float width;
public float height;
public SRectF rect;
public float w2; //power of 2 width
public float h2; //power of 2 height
public float width_ratio;
public float height_ratio;
public SColorF color;
public STexture(int Index)
{
index = Index;
PBO = 0;
ID = -1;
TexturePath = String.Empty;
width = 1f;
height = 1f;
rect = new SRectF(0f, 0f, 1f, 1f, 0f);
w2 = 2f;
h2 = 2f;
width_ratio = 0.5f;
height_ratio = 0.5f;
color = new SColorF(1f, 1f, 1f, 1f);
}
}
#endregion Structs
enum EAspect
{
Crop,
LetterBox,
Stretch
}
interface IDraw
{
bool Init();
+1
View File
@@ -5,6 +5,7 @@ using System.Drawing;
using System.Text;
using Vocaluxe.Base;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Input
{
+1
View File
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using Vocaluxe.Base;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Input.WiiMote
{
+2 -1
View File
@@ -10,6 +10,7 @@ using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Input;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Input.WiiMote
{
@@ -194,7 +195,7 @@ namespace Vocaluxe.Lib.Input.WiiMote
if (!CHIDAPI.Init())
{
CLog.LogError("WiiMoteLib: Can't initialize HID API");
string msg = "Please install the Visual C++ Redistributable Packages 2012! You can find them at: http://www.microsoft.com/en-us/download/details.aspx?id=30679";
string msg = "Please install the Visual C++ Redistributable Packages 2008!";
CLog.LogError(msg);
_Active = false;
+2 -25
View File
@@ -7,34 +7,11 @@ using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Lib.Playlist
{
public class CPlaylistSong
{
public int SongID;
public EGameMode GameMode;
public CPlaylistSong(int SongID, EGameMode gm)
{
this.SongID = SongID;
this.GameMode = gm;
}
public CPlaylistSong()
{
GameMode = EGameMode.TR_GAMEMODE_NORMAL;
}
public CPlaylistSong(CPlaylistSong ps)
{
SongID = ps.SongID;
GameMode = ps.GameMode;
}
}
public class CPlaylistFile
{
private static XmlWriterSettings _settings = new XmlWriterSettings();
+1 -1
View File
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Video
{
@@ -9,6 +9,7 @@ using System.Threading;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Video.Acinerella;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Video
{
+1
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Text;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Video
{
+2
View File
@@ -10,6 +10,8 @@ using System.Runtime.InteropServices;
using Vocaluxe.Lib.Draw;
using System.Threading;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Webcam
{
class CAForgeNet : IWebcam
+2
View File
@@ -4,6 +4,8 @@ using System.Text;
using Vocaluxe.Lib.Draw;
using System.Drawing;
using Vocaluxe.Menu;
namespace Vocaluxe.Lib.Webcam
{
struct SWebcamDevice
@@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Vocaluxe.Menu.SingNotes
{
class CSingNotesClassic : CSingNotes
{
}
}
-10
View File
@@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Vocaluxe.Menu.SongMenu
{
class CSongMenuBook : CSongMenuFramework
{
}
}
-10
View File
@@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Vocaluxe.Menu.SongMenu
{
class CSongMenuList : CSongMenuFramework
{
}
}
+5
View File
@@ -154,6 +154,11 @@ namespace Vocaluxe
CLog.StartBenchmark(0, "Init Game");
CGame.Init();
CLog.StopBenchmark(0, "Init Game");
// Init Party Modes;
CLog.StartBenchmark(0, "Init Party Modes");
CParty.Init();
CLog.StopBenchmark(0, "Init Party Modes");
}
catch (Exception e)
{
@@ -8,7 +8,7 @@ using Vocaluxe.Base;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Screens
{
@@ -76,7 +76,6 @@ namespace Vocaluxe.Screens
public CPopupScreenPlayerControl()
{
Init();
}
protected override void Init()
@@ -101,9 +100,9 @@ namespace Vocaluxe.Screens
_ThemeButtons = buttons.ToArray();
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
_ScreenArea = Statics[htStatics(StaticBG)].Rect;
}
@@ -8,7 +8,7 @@ using Vocaluxe.Base;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Screens
{
@@ -24,7 +24,6 @@ namespace Vocaluxe.Screens
public CPopupScreenVolumeControl()
{
Init();
}
protected override void Init()
@@ -39,9 +38,9 @@ namespace Vocaluxe.Screens
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
_ScreenArea = Statics[htStatics(StaticBG)].Rect;
SelectSlides[htSelectSlides(SelectSlideVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
+23 -24
View File
@@ -59,7 +59,6 @@ namespace Vocaluxe.Screens
public CScreenCredits()
{
Init();
}
protected override void Init()
@@ -107,7 +106,7 @@ namespace Vocaluxe.Screens
paragraphs.Add(words);
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
//Vocaluxe-Logo
CDataBase.GetCreditsRessource("Logo_voc.png", ref _TexLogo);
@@ -149,7 +148,7 @@ namespace Vocaluxe.Screens
if (paragraphs[i][e] != null)
{
string newline = line + " " + paragraphs[i][e];
CText text = new CText(75, lastY, -2, 30, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line);
CText text = GetNewText(75, lastY, -2, 30, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line);
if (CDraw.GetTextBounds(text).Width < (CSettings.iRenderW - 220))
{
line = line + " " + paragraphs[i][e];
@@ -175,9 +174,9 @@ namespace Vocaluxe.Screens
}
public override void ReloadTheme() {}
public override void ReloadTheme() { }
public override void SaveTheme() {}
public override void SaveTheme() { }
public override void UnloadTextures() {}
@@ -240,12 +239,12 @@ namespace Vocaluxe.Screens
base.OnShow();
//Vocaluxe-Logo
logo = new CStatic(_TexLogo, new SColorF(1, 1, 1, 1), new SRectF((CSettings.iRenderW - _TexLogo.width) / 2, -270, _TexLogo.width, _TexLogo.height, -2));
logo = GetNewStatic(_TexLogo, new SColorF(1, 1, 1, 1), new SRectF((CSettings.iRenderW - _TexLogo.width) / 2, -270, _TexLogo.width, _TexLogo.height, -2));
//Little stars for logo
int numstars = (int)(logo.Rect.W * 0.25f / 2f);
starsRed = new CParticleEffect(numstars, new SColorF(1, 0, 0, 1), new SRectF(logo.Rect.X, logo.Rect.Y, logo.Rect.W, logo.Rect.H, -1), _TexPerfectNoteStar, 35, EParticeType.Star);
starsBlue = new CParticleEffect(numstars, new SColorF(0.149f, 0.415f, 0.819f, 1), new SRectF(logo.Rect.X, logo.Rect.Y, logo.Rect.W, logo.Rect.H, -1), _TexPerfectNoteStar, 35, EParticeType.Star);
starsRed = GetNewParticleEffect(numstars, new SColorF(1, 0, 0, 1), new SRectF(logo.Rect.X, logo.Rect.Y, logo.Rect.W, logo.Rect.H, -1), _TexPerfectNoteStar, 35, EParticeType.Star);
starsBlue = GetNewParticleEffect(numstars, new SColorF(0.149f, 0.415f, 0.819f, 1), new SRectF(logo.Rect.X, logo.Rect.Y, logo.Rect.W, logo.Rect.H, -1), _TexPerfectNoteStar, 35, EParticeType.Star);
//Credit names
_CreditNames = new List<CCreditName>();
@@ -253,72 +252,72 @@ namespace Vocaluxe.Screens
//brunzel
CCreditName CreditEntryBrunzel = new CCreditName();
CreditEntryBrunzel.image = new CStatic(_TexNameBrunzel, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 400, 120, -4));
CreditEntryBrunzel.image = GetNewStatic(_TexNameBrunzel, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 400, 120, -4));
CreditEntryBrunzel.particleRect = new SRectF(CreditEntryBrunzel.image.Rect.X + 342, CreditEntryBrunzel.image.Rect.Y + 4, 30, 30, -5);
CreditEntryBrunzel.particle = new CParticleEffect(8, new SColorF(1, 0, 0, 1), CreditEntryBrunzel.particleRect, _TexPerfectNoteStar, 35, EParticeType.Star);
CreditEntryBrunzel.particle = GetNewParticleEffect(8, new SColorF(1, 0, 0, 1), CreditEntryBrunzel.particleRect, _TexPerfectNoteStar, 35, EParticeType.Star);
CreditEntryBrunzel.active = true;
CreditEntryBrunzel.direction = EDirection.Left;
_CreditNames.Add(CreditEntryBrunzel);
//Darkice
CCreditName CreditEntryDarkice = new CCreditName();
CreditEntryDarkice.image = new CStatic(_TexNameDarkice, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 400, 120, -4));
CreditEntryDarkice.image = GetNewStatic(_TexNameDarkice, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 400, 120, -4));
CreditEntryDarkice.particleRect = new SRectF(CreditEntryDarkice.image.Rect.X + 242, CreditEntryDarkice.image.Rect.Y + 23, 30, 30, -5);
CreditEntryDarkice.particle = new CParticleEffect(8, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryDarkice.particleRect, _TexPerfectNoteStar, 35, EParticeType.Star);
CreditEntryDarkice.particle = GetNewParticleEffect(8, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryDarkice.particleRect, _TexPerfectNoteStar, 35, EParticeType.Star);
CreditEntryDarkice.active = true;
CreditEntryDarkice.direction = EDirection.Right;
_CreditNames.Add(CreditEntryDarkice);
//flokuep
CCreditName CreditEntryFlokuep = new CCreditName();
CreditEntryFlokuep.image = new CStatic(_TexNameFlokuep, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 400, 120, -4));
CreditEntryFlokuep.image = GetNewStatic(_TexNameFlokuep, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 400, 120, -4));
CreditEntryFlokuep.particleRect = new SRectF(CreditEntryFlokuep.image.Rect.X + 141, CreditEntryFlokuep.image.Rect.Y - 2, 30, 30, -5);
CreditEntryFlokuep.particle = new CParticleEffect(8, new SColorF(1, 0, 0, 1), CreditEntryFlokuep.particleRect, _TexPerfectNoteStar, 35, EParticeType.Star);
CreditEntryFlokuep.particle = GetNewParticleEffect(8, new SColorF(1, 0, 0, 1), CreditEntryFlokuep.particleRect, _TexPerfectNoteStar, 35, EParticeType.Star);
CreditEntryFlokuep.active = true;
CreditEntryFlokuep.direction = EDirection.Left;
_CreditNames.Add(CreditEntryFlokuep);
//bohning
CCreditName CreditEntryBohning = new CCreditName();
CreditEntryBohning.image = new CStatic(_TexNameBohning, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 350, 110, -4));
CreditEntryBohning.image = GetNewStatic(_TexNameBohning, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 350, 110, -4));
CreditEntryBohning.particleRect = new SRectF(CreditEntryBohning.image.Rect.X + 172, CreditEntryBohning.image.Rect.Y + 16, 10, 10, -5);
CreditEntryBohning.particle = new CParticleEffect(4, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryBohning.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryBohning.particle = GetNewParticleEffect(4, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryBohning.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryBohning.active = true;
CreditEntryBohning.direction = EDirection.Right;
_CreditNames.Add(CreditEntryBohning);
//mesand
CCreditName CreditEntryMesand = new CCreditName();
CreditEntryMesand.image = new CStatic(_TexNameMesand, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 350, 110, -4));
CreditEntryMesand.image = GetNewStatic(_TexNameMesand, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 350, 110, -4));
CreditEntryMesand.particleRect = new SRectF(CreditEntryMesand.image.Rect.X + 240, CreditEntryMesand.image.Rect.Y - 2, 10, 10, -5);
CreditEntryMesand.particle = new CParticleEffect(4, new SColorF(1, 0, 0, 1), CreditEntryMesand.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryMesand.particle = GetNewParticleEffect(4, new SColorF(1, 0, 0, 1), CreditEntryMesand.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryMesand.active = true;
CreditEntryMesand.direction = EDirection.Left;
_CreditNames.Add(CreditEntryMesand);
//babene03
CCreditName CreditEntryBabene03 = new CCreditName();
CreditEntryBabene03.image = new CStatic(_TexNameBabene03, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 350, 110, -4));
CreditEntryBabene03.image = GetNewStatic(_TexNameBabene03, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 350, 110, -4));
CreditEntryBabene03.particleRect = new SRectF(CreditEntryBabene03.image.Rect.X + 7, CreditEntryBabene03.image.Rect.Y + 4, 10, 10, -5);
CreditEntryBabene03.particle = new CParticleEffect(4, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryBabene03.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryBabene03.particle = GetNewParticleEffect(4, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryBabene03.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryBabene03.active = true;
CreditEntryBabene03.direction = EDirection.Right;
_CreditNames.Add(CreditEntryBabene03);
//pantero
CCreditName CreditEntrypantero = new CCreditName();
CreditEntrypantero.image = new CStatic(_TexNamePantero, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 350, 110, -4));
CreditEntrypantero.image = GetNewStatic(_TexNamePantero, new SColorF(1, 1, 1, 1), new SRectF(-450, 580, 350, 110, -4));
CreditEntrypantero.particleRect = new SRectF(CreditEntrypantero.image.Rect.X + 140, CreditEntrypantero.image.Rect.Y + 15, 10, 10, -5);
CreditEntrypantero.particle = new CParticleEffect(4, new SColorF(1, 0, 0, 1), CreditEntrypantero.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntrypantero.particle = GetNewParticleEffect(4, new SColorF(1, 0, 0, 1), CreditEntrypantero.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntrypantero.active = true;
CreditEntrypantero.direction = EDirection.Left;
_CreditNames.Add(CreditEntrypantero);
//Pinky007
CCreditName CreditEntryPinky007 = new CCreditName();
CreditEntryPinky007.image = new CStatic(_TexNamePinky007, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 350, 110, -4));
CreditEntryPinky007.image = GetNewStatic(_TexNamePinky007, new SColorF(1, 1, 1, 1), new SRectF(CSettings.iRenderW, 580, 350, 110, -4));
CreditEntryPinky007.particleRect = new SRectF(CreditEntryPinky007.image.Rect.X + 42, CreditEntryPinky007.image.Rect.Y + 15, 10, 10, -5);
CreditEntryPinky007.particle = new CParticleEffect(4, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryPinky007.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryPinky007.particle = GetNewParticleEffect(4, new SColorF(0.149f, 0.415f, 0.819f, 1), CreditEntryPinky007.particleRect, _TexPerfectNoteStar, 25, EParticeType.Star);
CreditEntryPinky007.active = true;
CreditEntryPinky007.direction = EDirection.Right;
_CreditNames.Add(CreditEntryPinky007);
+9 -8
View File
@@ -5,8 +5,8 @@ using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Screens
{
@@ -31,7 +31,6 @@ namespace Vocaluxe.Screens
public CScreenHighscore()
{
Init();
}
protected override void Init()
@@ -90,11 +89,8 @@ namespace Vocaluxe.Screens
{
case Keys.Escape:
case Keys.Back:
CGraphics.FadeTo(EScreens.ScreenSong);
break;
case Keys.Enter:
CGraphics.FadeTo(EScreens.ScreenSong);
LeaveScreen();
break;
case Keys.Down:
@@ -127,12 +123,12 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB)
{
CGraphics.FadeTo(EScreens.ScreenSong);
LeaveScreen();
}
if (MouseEvent.RB)
{
CGraphics.FadeTo(EScreens.ScreenSong);
LeaveScreen();
}
if (MouseEvent.MB)
@@ -333,5 +329,10 @@ namespace Vocaluxe.Screens
_Round = 0;
UpdateRound();
}
private void LeaveScreen()
{
CParty.LeavingHighscore();
}
}
}
+1 -2
View File
@@ -9,8 +9,8 @@ using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Screens
{
@@ -36,7 +36,6 @@ namespace Vocaluxe.Screens
public CScreenLoad()
{
Init();
}
protected override void Init()
+16 -4
View File
@@ -19,6 +19,7 @@ namespace Vocaluxe.Screens
const int ScreenVersion = 1;
const string ButtonSing = "ButtonSing";
const string ButtonParty = "ButtonParty";
const string ButtonOptions = "ButtonOptions";
const string ButtonProfiles = "ButtonProfiles";
const string ButtonExit = "ButtonExit";
@@ -27,7 +28,6 @@ namespace Vocaluxe.Screens
public CScreenMain()
{
Init();
}
protected override void Init()
@@ -37,12 +37,12 @@ namespace Vocaluxe.Screens
_ThemeName = "ScreenMain";
_ScreenVersion = ScreenVersion;
_ThemeStatics = new string[] { "StaticMenuBar" };
_ThemeButtons = new string[] { ButtonSing, ButtonOptions, ButtonProfiles, ButtonExit };
_ThemeButtons = new string[] { ButtonSing, ButtonParty, ButtonOptions, ButtonProfiles, ButtonExit };
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -75,7 +75,13 @@ namespace Vocaluxe.Screens
case Keys.Enter:
if (Buttons[htButtons(ButtonSing)].Selected)
{
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
}
if (Buttons[htButtons(ButtonParty)].Selected)
CGraphics.FadeTo(EScreens.ScreenParty);
if (Buttons[htButtons(ButtonOptions)].Selected)
CGraphics.FadeTo(EScreens.ScreenOptions);
@@ -99,7 +105,13 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonSing)].Selected)
{
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
}
if (Buttons[htButtons(ButtonParty)].Selected)
CGraphics.FadeTo(EScreens.ScreenParty);
if (Buttons[htButtons(ButtonOptions)].Selected)
CGraphics.FadeTo(EScreens.ScreenOptions);
+3 -4
View File
@@ -43,7 +43,6 @@ namespace Vocaluxe.Screens
public CScreenNames()
{
Init();
}
protected override void Init()
@@ -92,13 +91,13 @@ namespace Vocaluxe.Screens
texts.AddRange(EqualizerPlayer);
_ThemeEqualizers = texts.ToArray();
chooseAvatarStatic = new CStatic();
chooseAvatarStatic = GetNewStatic();
chooseAvatarStatic.Visible = false;
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
_PlayerNr = new int[CSettings.MaxNumPlayer];
for (int i = 0; i < _PlayerNr.Length; i++)
+1 -1
View File
@@ -23,7 +23,6 @@ namespace Vocaluxe.Screens
public CScreenOptions()
{
Init();
}
protected override void Init()
@@ -53,6 +52,7 @@ namespace Vocaluxe.Screens
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
+8 -4
View File
@@ -32,7 +32,6 @@ namespace Vocaluxe.Screens
public CScreenOptionsGame()
{
Init();
}
protected override void Init()
@@ -55,9 +54,9 @@ namespace Vocaluxe.Screens
}
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideLanguage)].AddValues(_Languages);
SelectSlides[htSelectSlides(SelectSlideLanguage)].Selection = _CurrentLang;
@@ -89,6 +88,7 @@ namespace Vocaluxe.Screens
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
@@ -166,11 +166,15 @@ namespace Vocaluxe.Screens
if (_SongSortingOld != CConfig.SongSorting || _TabsOld != CConfig.Tabs || _LanguageOld != CConfig.Language)
{
CSongs.Sort(CConfig.SongSorting);
CSongs.Sort(CConfig.SongSorting, CConfig.Tabs, CConfig.IgnoreArticles, String.Empty);
CSongs.Category = -1;
}
CLanguage.SetLanguage(CConfig.Language);
_SongSortingOld = CConfig.SongSorting;
_TabsOld = CConfig.Tabs;
_LanguageOld = CConfig.Language;
}
}
}
+3 -3
View File
@@ -20,7 +20,6 @@ namespace Vocaluxe.Screens
public CScreenOptionsLyrics()
{
Init();
}
protected override void Init()
@@ -34,9 +33,9 @@ namespace Vocaluxe.Screens
_ThemeSelectSlides = new string[] { SelectSlideLyricStyle, SelectSlideLyricsOnTop };
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideLyricStyle)].SetValues<ELyricStyle>((int)CConfig.LyricStyle);
SelectSlides[htSelectSlides(SelectSlideLyricsOnTop)].SetValues<EOffOn>((int)CConfig.LyricsOnTop);
}
@@ -60,6 +59,7 @@ namespace Vocaluxe.Screens
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
+3 -3
View File
@@ -56,7 +56,6 @@ namespace Vocaluxe.Screens
public CScreenOptionsRecord()
{
Init();
}
protected override void Init()
@@ -77,9 +76,9 @@ namespace Vocaluxe.Screens
_ThemeEqualizers = new string[] { EqualizerChannel1, EqualizerChannel2 };
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
int max = CSettings.MaxNumPlayer + 1;
if (max > 7)
@@ -133,6 +132,7 @@ namespace Vocaluxe.Screens
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
+3 -3
View File
@@ -27,7 +27,6 @@ namespace Vocaluxe.Screens
public CScreenOptionsSound()
{
Init();
}
protected override void Init()
@@ -41,9 +40,9 @@ namespace Vocaluxe.Screens
_ThemeSelectSlides = new string[] { SelectSlideBackgroundMusic, SelectSlideBackgroundMusicVolume, SelectSlideBackgroundMusicSource, SelectSlidePreviewMusicVolume, SelectSlideGameMusicVolume };
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideBackgroundMusic)].SetValues<EOffOn>((int)CConfig.BackgroundMusic);
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"});
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5;
@@ -75,6 +74,7 @@ namespace Vocaluxe.Screens
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
+8 -4
View File
@@ -33,7 +33,6 @@ namespace Vocaluxe.Screens
public CScreenOptionsTheme()
{
Init();
}
protected override void Init()
@@ -55,9 +54,9 @@ namespace Vocaluxe.Screens
};
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideTheme)].AddValues(CTheme.ThemeNames);
SelectSlides[htSelectSlides(SelectSlideTheme)].Selection = CTheme.GetThemeIndex();
@@ -91,6 +90,11 @@ namespace Vocaluxe.Screens
Close();
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonExit)].Selected)
{
@@ -174,7 +178,7 @@ namespace Vocaluxe.Screens
if (_OldCoverTheme != SelectSlides[htSelectSlides(SelectSlideCover)].Selection)
{
CCover.ReloadCover();
CSongs.Sort(CConfig.SongSorting);
CSongs.Sort(CConfig.SongSorting, CConfig.Tabs, CConfig.IgnoreArticles, String.Empty);
}
if (_OldTheme != SelectSlides[htSelectSlides(SelectSlideTheme)].Selection)
+4 -4
View File
@@ -27,13 +27,12 @@ namespace Vocaluxe.Screens
private const string ButtonExit = "ButtonExit";
private SWebcamConfig _Config;
Lib.Draw.STexture _WebcamTexture = new Lib.Draw.STexture(-1);
STexture _WebcamTexture = new STexture(-1);
private int _DeviceNr;
private int _CapabilityNr;
public CScreenOptionsVideo()
{
Init();
}
protected override void Init()
@@ -48,9 +47,9 @@ namespace Vocaluxe.Screens
_ThemeSelectSlides = new string[] { SelectSlideVideoBackgrounds, SelectSlideVideoPreview, SelectSlideVideosInSongs, SelectSlideVideosToBackground, SelectSlideWebcamDevices, SelectSlideWebcamCapabilities };
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideVideoBackgrounds)].SetValues<EOffOn>((int)CConfig.VideoBackgrounds);
SelectSlides[htSelectSlides(SelectSlideVideoPreview)].SetValues<EOffOn>((int)CConfig.VideoPreview);
@@ -77,6 +76,7 @@ namespace Vocaluxe.Screens
break;
case Keys.S:
CParty.SetNormalGameMode();
CGraphics.FadeTo(EScreens.ScreenSong);
break;
+206
View File
@@ -0,0 +1,206 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Menu;
namespace Vocaluxe.Screens
{
class CScreenParty : CMenu
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
const string TextDescription = "TextDescription";
const string TextTargetAudience = "TextTargetAudience";
const string TextNumTeams = "TextNumTeams";
const string TextNumPlayers = "TextNumPlayers";
const string TextAuthor = "TextAuthor";
const string TextVersion = "TextVersion";
const string TextError = "TextError";
const string ButtonStart = "ButtonStart";
const string ButtonExit = "ButtonExit";
const string SelectSlideModes = "SelectSlideModes";
private List<SPartyModeInfos> _PartyModeInfos;
public CScreenParty()
{
}
protected override void Init()
{
base.Init();
_ThemeName = "ScreenParty";
_ScreenVersion = ScreenVersion;
_ThemeTexts = new string[] { TextDescription, TextTargetAudience, TextNumTeams, TextNumPlayers, TextAuthor, TextVersion, TextError };
_ThemeButtons = new string[] { ButtonStart, ButtonExit };
_ThemeSelectSlides = new string[] { SelectSlideModes };
}
public override void LoadTheme(string XmlPath)
{
base.LoadTheme(XmlPath);
}
public override bool HandleInput(KeyEvent KeyEvent)
{
base.HandleInput(KeyEvent);
if (KeyEvent.KeyPressed)
{
}
else
{
switch (KeyEvent.Key)
{
case Keys.Back:
case Keys.Escape:
CGraphics.FadeTo(EScreens.ScreenMain);
break;
case Keys.Enter:
if (Buttons[htButtons(ButtonStart)].Selected)
StartPartyMode();
if (Buttons[htButtons(ButtonExit)].Selected)
CGraphics.FadeTo(EScreens.ScreenMain);
break;
case Keys.Left:
case Keys.Right:
if (SelectSlides[htSelectSlides(SelectSlideModes)].Selected)
UpdateSelection();
break;
}
}
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
{
base.HandleMouse(MouseEvent);
if (MouseEvent.LB && IsMouseOver(MouseEvent))
{
if (Buttons[htButtons(ButtonStart)].Selected)
StartPartyMode();
if (Buttons[htButtons(ButtonExit)].Selected)
CGraphics.FadeTo(EScreens.ScreenMain);
if (SelectSlides[htSelectSlides(SelectSlideModes)].Selected)
UpdateSelection();
}
if (MouseEvent.RB)
{
CGraphics.FadeTo(EScreens.ScreenMain);
}
return true;
}
public override void OnShow()
{
base.OnShow();
_PartyModeInfos = CParty.GetPartyModeInfos();
SelectSlides[htSelectSlides(SelectSlideModes)].Clear();
foreach (SPartyModeInfos info in _PartyModeInfos)
{
SelectSlides[htSelectSlides(SelectSlideModes)].AddValue(info.Name, info.PartyModeID);
}
SelectSlides[htSelectSlides(SelectSlideModes)].Selection = 0;
UpdateSelection();
}
public override bool UpdateGame()
{
return true;
}
public override bool Draw()
{
base.Draw();
return true;
}
public override void OnClose()
{
base.OnClose();
}
private void UpdateSelection()
{
if (_PartyModeInfos.Count == 0)
return;
int index = SelectSlides[htSelectSlides(SelectSlideModes)].Selection;
if (index >= _PartyModeInfos.Count)
return;
//Description
Texts[htTexts(TextDescription)].PartyModeID = _PartyModeInfos[index].PartyModeID;
Texts[htTexts(TextDescription)].Text = _PartyModeInfos[index].Description;
//TargetAudience
Texts[htTexts(TextTargetAudience)].PartyModeID = _PartyModeInfos[index].PartyModeID;
Texts[htTexts(TextTargetAudience)].Text = _PartyModeInfos[index].TargetAudience;
//NumTeams
if (_PartyModeInfos[index].MaxTeams == 0)
Texts[htTexts(TextNumTeams)].Text = "TR_SCREENPARTY_NOTEAMS";
else if (_PartyModeInfos[index].MaxTeams == _PartyModeInfos[index].MinTeams)
Texts[htTexts(TextNumTeams)].Text = _PartyModeInfos[index].MaxTeams.ToString();
else if (_PartyModeInfos[index].MaxTeams > _PartyModeInfos[index].MinTeams)
Texts[htTexts(TextNumTeams)].Text = _PartyModeInfos[index].MinTeams + " - " + _PartyModeInfos[index].MaxTeams;
//NumPlayers
if (_PartyModeInfos[index].MaxPlayers == _PartyModeInfos[index].MinPlayers)
Texts[htTexts(TextNumPlayers)].Text = _PartyModeInfos[index].MaxTeams.ToString();
else if (_PartyModeInfos[index].MaxPlayers > _PartyModeInfos[index].MinPlayers)
Texts[htTexts(TextNumPlayers)].Text = _PartyModeInfos[index].MinPlayers + " - " + _PartyModeInfos[index].MaxPlayers;
//Author
Texts[htTexts(TextAuthor)].Text = _PartyModeInfos[index].Author;
Texts[htTexts(TextAuthor)].PartyModeID = _PartyModeInfos[index].PartyModeID;
//Version
Texts[htTexts(TextVersion)].Text = _PartyModeInfos[index].VersionMajor + "." + _PartyModeInfos[index].VersionMinor;
Texts[htTexts(TextVersion)].PartyModeID = _PartyModeInfos[index].PartyModeID;
if (!_PartyModeInfos[index].Playable)
{
Buttons[htButtons(ButtonStart)].Visible = false;
Texts[htTexts(TextError)].Visible = true;
}
else
{
Buttons[htButtons(ButtonStart)].Visible = true;
Texts[htTexts(TextError)].Visible = false;
}
}
private void StartPartyMode()
{
if (_PartyModeInfos.Count == 0)
return;
int index = SelectSlides[htSelectSlides(SelectSlideModes)].Selection;
if (index >= _PartyModeInfos.Count)
return;
if (_Base.Config.GetMaxNumMics() == 0)
return; //TODO: Add message!
if (_PartyModeInfos[index].Playable)
{
CParty.SetPartyMode(_PartyModeInfos[index].PartyModeID);
CGraphics.FadeTo(EScreens.ScreenPartyDummy);
}
//TODO: else Message!
}
}
}
+3 -4
View File
@@ -41,12 +41,11 @@ namespace Vocaluxe.Screens
private EEditMode _EditMode;
private Lib.Draw.STexture _WebcamTexture = new Lib.Draw.STexture(-1);
private STexture _WebcamTexture = new STexture(-1);
private Bitmap _Snapshot = null;
public CScreenProfiles()
{
Init();
}
protected override void Init()
@@ -62,9 +61,9 @@ namespace Vocaluxe.Screens
_EditMode = EEditMode.None;
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
Buttons[htButtons(ButtonSaveSnapshot)].Visible = false;
Buttons[htButtons(ButtonDiscardSnapshot)].Visible = false;
+10 -9
View File
@@ -8,7 +8,7 @@ using Vocaluxe.Base;
using Vocaluxe.Menu;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Screens
{
@@ -33,7 +33,6 @@ namespace Vocaluxe.Screens
public CScreenScore()
{
Init();
}
protected override void Init()
@@ -69,11 +68,8 @@ namespace Vocaluxe.Screens
{
case Keys.Escape:
case Keys.Back:
CGraphics.FadeTo(EScreens.ScreenHighscore);
break;
case Keys.Enter:
CGraphics.FadeTo(EScreens.ScreenHighscore);
LeaveScreen();
break;
case Keys.Left:
@@ -99,12 +95,12 @@ namespace Vocaluxe.Screens
if (MouseEvent.LB)
{
CGraphics.FadeTo(EScreens.ScreenHighscore);
LeaveScreen();
}
if (MouseEvent.RB)
{
CGraphics.FadeTo(EScreens.ScreenHighscore);
LeaveScreen();
}
return true;
@@ -366,7 +362,7 @@ namespace Vocaluxe.Screens
Statics[htStatics(StaticPointsBarBG[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticAvatar[player, numplayer])].Visible = (numplayer + 1 == CGame.NumPlayer);
Statics[htStatics(StaticAvatar[player, numplayer])].Texture = new Lib.Draw.STexture(-1);
Statics[htStatics(StaticAvatar[player, numplayer])].Texture = new STexture(-1);
}
}
}
@@ -390,5 +386,10 @@ namespace Vocaluxe.Screens
UpdateRatings();
}
}
private void LeaveScreen()
{
CParty.LeavingScore();
}
}
}
+13 -9
View File
@@ -9,8 +9,8 @@ using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu.SingNotes;
using Vocaluxe.Menu.SongMenu;
namespace Vocaluxe.Screens
{
@@ -97,7 +97,6 @@ namespace Vocaluxe.Screens
public CScreenSing()
{
Init();
}
protected override void Init()
@@ -148,9 +147,9 @@ namespace Vocaluxe.Screens
_TimerDuetText2 = new Stopwatch();
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
Statics[htStatics(StaticTimeLine)].Visible = false;
Statics[htStatics(StaticTimeLineExpandedNormal)].Visible = false;
@@ -578,8 +577,7 @@ namespace Vocaluxe.Screens
if (CGame.IsFinished())
{
CGraphics.FadeTo(EScreens.ScreenScore);
_FadeOut = true;
FinishedSinging();
return;
}
@@ -727,8 +725,14 @@ namespace Vocaluxe.Screens
while(!CGame.IsFinished())
CGame.NextRound();
CGraphics.FadeTo(EScreens.ScreenScore);
FinishedSinging();
}
private void FinishedSinging()
{
_FadeOut = true;
CParty.FinishedSinging();
if (_Webcam)
CWebcam.Close();
}
@@ -1358,7 +1362,7 @@ namespace Vocaluxe.Screens
TimeRect trect = new TimeRect();
trect.startBeat = Line[j].FirstNoteBeat;
trect.endBeat = Line[j].EndBeat;
trect.rect = new CStatic(new STexture(-1),
trect.rect = GetNewStatic(new STexture(-1),
new SColorF(1f, 1f, 1f, 1f),
new SRectF(stat.Rect.X + stat.Rect.W * ((CGame.GetTimeFromBeats(trect.startBeat, song.BPM) + song.Gap - song.Start) / TotalTime),
stat.Rect.Y,
+292 -75
View File
@@ -9,9 +9,9 @@ using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SongMenu;
using Vocaluxe.PartyModes;
namespace Vocaluxe.Screens
{
@@ -42,6 +42,7 @@ namespace Vocaluxe.Screens
private const string ButtonOptionsSingAll = "ButtonOptionsSingAll";
private const string ButtonOptionsSingAllVisible = "ButtonOptionsSingAllVisible";
private const string ButtonOptionsOpenPlaylist = "ButtonOptionsOpenPlaylist";
private const string ButtonStart = "ButtonStart";
private const string SelectSlideOptionsMode = "SelectSlideOptionsMode";
private const string SelectSlideOptionsPlaylistAdd = "SelectSlideOptionsPlaylistAdd";
@@ -55,9 +56,12 @@ namespace Vocaluxe.Screens
private string _SearchText = String.Empty;
private bool _SearchActive = false;
private List<string> ButtonsJoker = new List<string>();
private List<string> TextsPlayer = new List<string>();
private bool _SongOptionsActive = false;
private bool _PlaylistActive = false;
private List<GameModes.EGameMode> _AvailableGameModes;
private List<EGameMode> _AvailableGameModes;
private ScreenSongOptions _sso;
private CStatic DragAndDropCover;
private bool DragAndDropActive;
@@ -66,28 +70,55 @@ namespace Vocaluxe.Screens
public CScreenSong()
{
Init();
_AvailableGameModes = new List<GameModes.EGameMode>();
_AvailableGameModes = new List<EGameMode>();
}
protected override void Init()
{
base.Init();
for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++)
{
ButtonsJoker.Add("ButtonJoker" + (i + 1));
}
List<string> blist = new List<string>();
blist.AddRange(ButtonsJoker);
blist.Add(ButtonOptionsClose);
blist.Add(ButtonOptionsPlaylist);
blist.Add(ButtonOptionsSing);
blist.Add(ButtonOptionsRandom);
blist.Add(ButtonOptionsRandomCategory);
blist.Add(ButtonOptionsSingAll);
blist.Add(ButtonOptionsSingAllVisible);
blist.Add(ButtonOptionsOpenPlaylist);
blist.Add(ButtonOpenOptions);
blist.Add(ButtonStart);
for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++)
{
TextsPlayer.Add("TextPlayer" + (i + 1));
}
List<string> tlist = new List<string>();
tlist.AddRange(TextsPlayer);
tlist.Add(TextCategory);
tlist.Add(TextSelection);
tlist.Add(TextSearchBarTitle);
tlist.Add(TextSearchBar);
tlist.Add(TextOptionsTitle);
_ThemeName = "ScreenSong";
_ScreenVersion = ScreenVersion;
_ThemeStatics = new string[] { StaticSearchBar, StaticOptionsBG };
_ThemeTexts = new string[] { TextCategory, TextSelection, TextSearchBarTitle, TextSearchBar, TextOptionsTitle };
_ThemeButtons = new string[] { ButtonOptionsClose, ButtonOptionsPlaylist, ButtonOptionsSing, ButtonOptionsRandom, ButtonOptionsRandomCategory, ButtonOptionsSingAll, ButtonOptionsSingAllVisible, ButtonOptionsOpenPlaylist, ButtonOpenOptions };
_ThemeTexts = tlist.ToArray();
_ThemeButtons = blist.ToArray();
_ThemeSelectSlides = new string[] { SelectSlideOptionsMode, SelectSlideOptionsPlaylistAdd, SelectSlideOptionsPlaylistOpen };
_ThemeSongMenus = new string[] { SongMenu };
_ThemePlaylists = new string[] { Playlist };
}
public override void LoadTheme()
public override void LoadTheme(string XmlPath)
{
base.LoadTheme();
base.LoadTheme(XmlPath);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Visible = false;
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistOpen)].Visible = false;
@@ -103,7 +134,7 @@ namespace Vocaluxe.Screens
Statics[htStatics(StaticOptionsBG)].Visible = false;
Playlists[htPlaylists(Playlist)].Visible = false;
DragAndDropCover = new CStatic();
DragAndDropCover = GetNewStatic();
Playlists[htPlaylists(Playlist)].Init();
@@ -138,7 +169,7 @@ namespace Vocaluxe.Screens
if (!_SongOptionsActive)
{
if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode) && KeyEvent.Mod != EModifier.Ctrl)
{
if (_SearchActive)
ApplyNewSearchFilter(_SearchText + KeyEvent.Unicode);
@@ -151,22 +182,43 @@ namespace Vocaluxe.Screens
}
else
{
SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent);
SongMenus[htSongMenus(SongMenu)].HandleInput(ref KeyEvent, _sso);
if (KeyEvent.Handled)
return true;
switch (KeyEvent.Key)
{
case Keys.Escape:
if (CSongs.Category < 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
if ((CSongs.Category < 0 || !(_sso.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)) && !_sso.Selection.PartyMode)
CGraphics.FadeTo(EScreens.ScreenMain);
break;
case Keys.Enter:
if (CSongs.NumVisibleSongs > 0)
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{
for (int i = 0; i < ButtonsJoker.Count; i++)
{
if (i < _sso.Selection.NumJokers.Length)
{
if (Buttons[htButtons(ButtonsJoker[i])].Selected)
{
SelectNextRandom(i);
return true;
}
}
}
if (Buttons[htButtons(ButtonStart)].Selected)
{
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
}
}
if (CSongs.NumVisibleSongs > 0 && !_sso.Selection.PartyMode)
{
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
ToggleSongOptions(ESongOptionsView.Song);
{
if (!_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.Song);
}
}
break;
@@ -185,13 +237,15 @@ namespace Vocaluxe.Screens
ApplyNewSearchFilter(_SearchText.Remove(_SearchText.Length - 1));
}
if (!_SearchActive && CSongs.Category < 0)
if (!_SearchActive && (CSongs.Category < 0) && !_sso.Selection.PartyMode)
{
CGraphics.FadeTo(EScreens.ScreenMain);
}
break;
case Keys.Space:
if (!_SearchActive)
if (!_SearchActive && !_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.General);
break;
@@ -202,7 +256,7 @@ namespace Vocaluxe.Screens
_SearchText = String.Empty;
ApplyNewSearchFilter(_SearchText);
}
else
else if (!_sso.Selection.PartyMode)
{
_SearchActive = true;
}
@@ -210,11 +264,11 @@ namespace Vocaluxe.Screens
//TODO: Delete it! ??? Shouldn't we keep this as shortcut?
case Keys.A:
if (!_SearchActive && KeyEvent.Mod == EModifier.None)
if (!_SearchActive && KeyEvent.Mod == EModifier.None && !_sso.Selection.PartyMode)
{
StartRandomAllSongs();
}
if (KeyEvent.Mod == EModifier.Ctrl)
if (KeyEvent.Mod == EModifier.Ctrl && !_sso.Selection.PartyMode)
{
StartRandomVisibleSongs();
}
@@ -230,7 +284,7 @@ namespace Vocaluxe.Screens
_SearchText = String.Empty;
ApplyNewSearchFilter(_SearchText);
}
else
else if (!_sso.Selection.PartyMode)
{
_SearchActive = true;
}
@@ -239,24 +293,42 @@ namespace Vocaluxe.Screens
//TODO: We need another key for random!
case Keys.R:
if (!_SearchActive && CSongs.Category != -1 && KeyEvent.Mod == EModifier.Ctrl)
{
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
}
else if (CSongs.Category == -1 && KeyEvent.Mod == EModifier.Ctrl)
{
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
}
if (KeyEvent.Mod == EModifier.Ctrl && !_sso.Selection.RandomOnly)
SelectNextRandom(-1);
break;
//TODO: Delete that!
case Keys.S:
if (!_SearchActive && CSongs.NumVisibleSongs > 0)
if (!_SearchActive && CSongs.NumVisibleSongs > 0 && !_sso.Selection.PartyMode)
{
StartMedleySong(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
}
break;
case Keys.D1:
SelectNextRandom(0);
break;
case Keys.D2:
SelectNextRandom(1);
break;
case Keys.D3:
SelectNextRandom(2);
break;
case Keys.D4:
SelectNextRandom(3);
break;
case Keys.D5:
SelectNextRandom(4);
break;
case Keys.D6:
SelectNextRandom(5);
break;
}
}
}
@@ -383,31 +455,19 @@ namespace Vocaluxe.Screens
return true;
}
if (CSongs.Category < 0)
if (CSongs.Category < 0 && !_sso.Selection.PartyMode)
{
CGraphics.FadeTo(EScreens.ScreenMain);
return true;
}
}
if (MouseEvent.MB)
if (MouseEvent.MB && !_sso.Selection.PartyMode)
{
if (CSongs.Category != -1)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
return true;
}
if (CSongs.Category == -1)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
return true;
}
return SelectNextRandom(-1);
}
if (MouseEvent.LD)
if (MouseEvent.LD && !_sso.Selection.PartyMode)
{
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
{
@@ -417,7 +477,7 @@ namespace Vocaluxe.Screens
}
}
SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent);
SongMenus[htSongMenus(SongMenu)].HandleMouse(ref MouseEvent, _sso);
if (MouseEvent.LB)
{
@@ -487,13 +547,36 @@ namespace Vocaluxe.Screens
OpenPlaylistAction();
return true;
}
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{
if (Buttons[htButtons(ButtonStart)].Selected)
{
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
return true;
}
for (int i = 0; i < ButtonsJoker.Count; i++)
{
if (i < _sso.Selection.NumJokers.Length)
{
if (Buttons[htButtons(ButtonsJoker[i])].Selected)
{
SelectNextRandom(i);
return true;
}
}
}
}
}
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1 && !_sso.Selection.PartyMode)
{
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
{
ToggleSongOptions(ESongOptionsView.Song);
if (!_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.Song);
return true;
}
else
@@ -503,7 +586,7 @@ namespace Vocaluxe.Screens
}
}
}
if (MouseEvent.LBH)
{
if (!DragAndDropActive && Playlists[htPlaylists(Playlist)].Visible && CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
@@ -530,8 +613,21 @@ namespace Vocaluxe.Screens
public override void OnShow()
{
base.OnShow();
_sso = CParty.GetSongSelectionOptions();
CSongs.Sort(_sso.Sorting.SongSorting, _sso.Sorting.Tabs, _sso.Sorting.IgnoreArticles, _sso.Sorting.SearchString, _sso.Sorting.ShowDuetSongs);
_SearchActive = _sso.Sorting.SearchStringVisible;
_SearchText = _sso.Sorting.SearchString;
CGame.EnterNormalGame();
SongMenus[htSongMenus(SongMenu)].OnShow();
if (_sso.Selection.PartyMode)
_PlaylistActive = false;
if (_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetActive(!_PlaylistActive);
SongMenus[htSongMenus(SongMenu)].SetSmallView(Playlists[htPlaylists(Playlist)].Visible);
@@ -541,16 +637,29 @@ namespace Vocaluxe.Screens
DragAndDropActive = false;
Playlists[htPlaylists(Playlist)].DragAndDropSongID = -1;
UpdateGame();
}
public override bool UpdateGame()
{
SongMenus[htSongMenus(SongMenu)].Update();
_sso = CParty.GetSongSelectionOptions();
CSongs.Sort(_sso.Sorting.SongSorting, _sso.Sorting.Tabs, _sso.Sorting.IgnoreArticles, _sso.Sorting.SearchString, _sso.Sorting.ShowDuetSongs);
_SearchActive = _sso.Sorting.SearchStringVisible;
_SearchText = _sso.Sorting.SearchString;
if (_sso.Selection.PartyMode)
_PlaylistActive = false;
if (_sso.Selection.PartyMode)
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].Update(_sso);
if (SongMenus[htSongMenus(SongMenu)].IsSmallView())
CheckPlaylist();
Texts[htTexts(TextCategory)].Text = CSongs.GetActualCategoryName();
Texts[htTexts(TextCategory)].Text = CSongs.GetCurrentCategoryName();
if (CSongs.Category > -1 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
CBackgroundMusic.Disabled = true;
@@ -585,6 +694,53 @@ namespace Vocaluxe.Screens
Statics[htStatics(StaticSearchBar)].Visible = false;
}
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{
Buttons[htButtons(ButtonStart)].Visible = true;
if(!SongMenus[htSongMenus(SongMenu)].IsSmallView())
SongMenus[htSongMenus(SongMenu)].SetSmallView(true);
for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++)
{
if (i < _sso.Selection.NumJokers.Length)
{
Buttons[htButtons(ButtonsJoker[i])].Visible = true;
Buttons[htButtons(ButtonsJoker[i])].Text.Text = _sso.Selection.NumJokers[i].ToString();
Texts[htTexts(TextsPlayer[i])].Visible = true;
bool NameExists = false;
if (_sso.Selection.TeamNames != null)
{
if (_sso.Selection.TeamNames.Length > i)
{
Texts[htTexts(TextsPlayer[i])].Text = _sso.Selection.TeamNames[i];
NameExists = true;
}
}
if (!NameExists)
Texts[htTexts(TextsPlayer[i])].Text = i.ToString();
}
else
{
Buttons[htButtons(ButtonsJoker[i])].Visible = false;
Texts[htTexts(TextsPlayer[i])].Visible = false;
}
}
}
else
{
Buttons[htButtons(ButtonStart)].Visible = false;
if(SongMenus[htSongMenus(SongMenu)].IsSmallView())
SongMenus[htSongMenus(SongMenu)].SetSmallView(false);
for (int i = 0; i < _Base.Settings.GetMaxNumPlayer(); i++)
{
Buttons[htButtons(ButtonsJoker[i])].Visible = false;
Texts[htTexts(TextsPlayer[i])].Visible = false;
}
}
return true;
}
@@ -603,6 +759,8 @@ namespace Vocaluxe.Screens
base.OnClose();
CBackgroundMusic.Disabled = false;
SongMenus[htSongMenus(SongMenu)].OnHide();
CParty.SetSearchString(_SearchText, _SearchActive);
}
public override void ApplyVolume()
@@ -610,6 +768,18 @@ namespace Vocaluxe.Screens
SongMenus[htSongMenus(SongMenu)].ApplyVolume(CConfig.PreviewMusicVolume);
}
private void HandlePartySongSelection(int SongNr)
{
if ((CSongs.Category >= 0) && (SongNr >= 0))
{
CSong song = CSongs.VisibleSongs[SongNr];
if (song != null)
{
CParty.SongSelected(song.ID);
}
}
}
private void StartSong(int SongNr)
{
if ((CSongs.Category >= 0) && (SongNr >= 0))
@@ -622,9 +792,9 @@ namespace Vocaluxe.Screens
else
{
if (CSongs.VisibleSongs[SongNr].IsDuet)
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
gm = EGameMode.TR_GAMEMODE_NORMAL;
}
CGame.Reset();
@@ -642,9 +812,9 @@ namespace Vocaluxe.Screens
{
EGameMode gm;
if (CSongs.VisibleSongs[SongNr].IsDuet)
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
gm = EGameMode.TR_GAMEMODE_NORMAL;
CGame.Reset();
CGame.ClearSongs();
@@ -661,7 +831,7 @@ namespace Vocaluxe.Screens
{
EGameMode gm;
if (CSongs.VisibleSongs[SongNr].Medley.Source != EMedleySource.None)
gm = GameModes.EGameMode.TR_GAMEMODE_MEDLEY;
gm = EGameMode.TR_GAMEMODE_MEDLEY;
else
return;
@@ -729,6 +899,51 @@ namespace Vocaluxe.Screens
CGraphics.FadeTo(EScreens.ScreenNames);
}
private bool SelectNextRandom(int TeamNr)
{
if (TeamNr != -1 && _sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
{
bool result = false;
if (_sso.Selection.NumJokers.Length > TeamNr)
{
if (_sso.Selection.NumJokers[TeamNr] > 0)
{
result = SelectNextRandomSong(TeamNr) || SelectNextRandomCategory();
CParty.JokerUsed(TeamNr);
_sso = CParty.GetSongSelectionOptions();
}
}
return result;
}
if (TeamNr == -1)
return SelectNextRandomSong(TeamNr) || SelectNextRandomCategory();
return false;
}
private bool SelectNextRandomSong(int TeamNr)
{
if (CSongs.Category != -1)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(CSongs.GetRandomSong());
return true;
}
return false;
}
private bool SelectNextRandomCategory()
{
if (CSongs.Category == -1)
{
ToggleSongOptions(ESongOptionsView.None);
SongMenus[htSongMenus(SongMenu)].SetSelectedCategory(CSongs.GetRandomCategory());
return true;
}
return false;
}
private void JumpTo(char Letter)
{
int song = SongMenus[htSongMenus(SongMenu)].GetSelectedSong();
@@ -738,7 +953,7 @@ namespace Vocaluxe.Screens
id = CSongs.VisibleSongs[song].ID;
}
int visibleID = Array.FindIndex<Vocaluxe.Lib.Song.CSong>(CSongs.VisibleSongs, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
int visibleID = Array.FindIndex<CSong>(CSongs.VisibleSongs, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
if (visibleID > -1)
{
id = visibleID;
@@ -793,20 +1008,20 @@ namespace Vocaluxe.Screens
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Clear();
if (!CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_NORMAL));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_NORMAL);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_SHORTSONG));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_SHORTSONG);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_NORMAL));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_NORMAL);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_SHORTSONG));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_SHORTSONG);
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_DUET));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_DUET);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_DUET));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_DUET);
}
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].Medley.Source != EMedleySource.None)
{
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(GameModes.EGameMode), GameModes.EGameMode.TR_GAMEMODE_MEDLEY));
_AvailableGameModes.Add(GameModes.EGameMode.TR_GAMEMODE_MEDLEY);
SelectSlides[htSelectSlides(SelectSlideOptionsMode)].AddValue(Enum.GetName(typeof(EGameMode), EGameMode.TR_GAMEMODE_MEDLEY));
_AvailableGameModes.Add(EGameMode.TR_GAMEMODE_MEDLEY);
}
//Set SelectSlide-Selection to last selected game-mode if possible
for (int i = 0; i < _AvailableGameModes.Count; i++)
@@ -861,15 +1076,16 @@ namespace Vocaluxe.Screens
Buttons[htButtons(ButtonOptionsSingAll)].Visible = false;
Buttons[htButtons(ButtonOptionsSingAllVisible)].Visible = false;
Buttons[htButtons(ButtonOptionsOpenPlaylist)].Visible = false;
Buttons[htButtons(ButtonOpenOptions)].Visible = true;
Buttons[htButtons(ButtonOpenOptions)].Visible = false;
Texts[htTexts(TextOptionsTitle)].Visible = false;
Statics[htStatics(StaticOptionsBG)].Visible = false;
}
}
#region Playlist Actions
public void CheckPlaylist()
{
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID == -1)
if (Playlists[htPlaylists(Playlist)].ActivePlaylistID == -1 && _PlaylistActive)
ClosePlaylist();
}
@@ -924,9 +1140,9 @@ namespace Vocaluxe.Screens
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
else
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
gm = EGameMode.TR_GAMEMODE_NORMAL;
//Check if Playlist really exists
if (SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection - 1 >= 0)
@@ -952,9 +1168,9 @@ namespace Vocaluxe.Screens
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
else
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
gm = EGameMode.TR_GAMEMODE_NORMAL;
//Create new playlist
Playlists[htPlaylists(Playlist)].ActivePlaylistID = CPlaylists.NewPlaylist();
@@ -981,9 +1197,9 @@ namespace Vocaluxe.Screens
gm = _AvailableGameModes[SelectSlides[htSelectSlides(SelectSlideOptionsMode)].Selection];
else
if (CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].IsDuet)
gm = GameModes.EGameMode.TR_GAMEMODE_DUET;
gm = EGameMode.TR_GAMEMODE_DUET;
else
gm = GameModes.EGameMode.TR_GAMEMODE_NORMAL;
gm = EGameMode.TR_GAMEMODE_NORMAL;
CPlaylists.Playlists[Playlists[htPlaylists(Playlist)].ActivePlaylistID].AddSong(CSongs.VisibleSongs[SongMenus[htSongMenus(SongMenu)].GetSelectedSong()].ID, gm);
Playlists[htPlaylists(Playlist)].UpdatePlaylist();
Playlists[htPlaylists(Playlist)].ScrollToBottom();
@@ -997,5 +1213,6 @@ namespace Vocaluxe.Screens
else
SelectSlides[htSelectSlides(SelectSlideOptionsPlaylistAdd)].Selection = 0;
}
#endregion Playlist Actions
}
}
-1
View File
@@ -19,7 +19,6 @@ namespace Vocaluxe.Screens
public CScreenTest()
{
Init();
}
protected override void Init()
+10 -27
View File
@@ -180,6 +180,8 @@
<Compile Include="Base\CInput.cs" />
<Compile Include="Base\CLanguage.cs" />
<Compile Include="Base\CLog.cs" />
<Compile Include="Base\CMain.cs" />
<Compile Include="Base\CParty.cs" />
<Compile Include="Base\CPlaylists.cs" />
<Compile Include="Base\CProfiles.cs" />
<Compile Include="Base\CUtility.cs" />
@@ -206,8 +208,6 @@
<Compile Include="Lib\Input\WiiMote\CWiiMote.cs" />
<Compile Include="Lib\Input\WiiMote\WiiMoteLib.cs" />
<Compile Include="Lib\Playlist\CPlaylistFile.cs" />
<Compile Include="Lib\Song\CNotes.cs" />
<Compile Include="Lib\Song\CSong.cs" />
<Compile Include="Lib\Sound\CDirectSoundRecord.cs" />
<Compile Include="Lib\Sound\COpenALPlay.cs" />
<Compile Include="Lib\Sound\COpenALRecord.cs" />
@@ -225,30 +225,7 @@
<Compile Include="Lib\Video\IVideoDecoder.cs" />
<Compile Include="Lib\Webcam\CAForgeNet.cs" />
<Compile Include="Lib\Webcam\IWebcam.cs" />
<Compile Include="Menu\CBackground.cs" />
<Compile Include="Menu\CButton.cs" />
<Compile Include="Menu\CEqualizer.cs" />
<Compile Include="Menu\CGraphics.cs" />
<Compile Include="Menu\CNameSelection.cs" />
<Compile Include="Menu\CLyric.cs" />
<Compile Include="Menu\CMenu.cs" />
<Compile Include="Menu\CInteraction.cs" />
<Compile Include="Menu\CObjectInteractions.cs" />
<Compile Include="Menu\CPlaylist.cs" />
<Compile Include="Menu\CSelectSlide.cs" />
<Compile Include="Menu\CStatic.cs" />
<Compile Include="Menu\CText.cs" />
<Compile Include="Menu\IMenuElement.cs" />
<Compile Include="Menu\SingNotes\CSingNotes.cs" />
<Compile Include="Menu\SingNotes\CSingNotesClassic.cs" />
<Compile Include="Menu\SingNotes\ISingNotes.cs" />
<Compile Include="Menu\SongMenu\CSongMenu.cs" />
<Compile Include="Menu\SongMenu\CSongMenuBook.cs" />
<Compile Include="Menu\SongMenu\CSongMenuDreidel.cs" />
<Compile Include="Menu\SongMenu\CSongMenuFramework.cs" />
<Compile Include="Menu\SongMenu\CSongMenuList.cs" />
<Compile Include="Menu\SongMenu\CSongMenuTileBoard.cs" />
<Compile Include="Menu\SongMenu\ISongMenu.cs" />
<Compile Include="Base\CGraphics.cs" />
<Compile Include="Program.cs">
<SubType>Form</SubType>
</Compile>
@@ -262,6 +239,7 @@
<Compile Include="Screens\CScreenOptions.cs" />
<Compile Include="Screens\CScreenOptionsGame.cs" />
<Compile Include="Screens\CScreenOptionsLyrics.cs" />
<Compile Include="Screens\CScreenParty.cs" />
<Compile Include="Screens\CScreenProfiles.cs" />
<Compile Include="Screens\CScreenScore.cs" />
<Compile Include="Screens\CScreenSing.cs" />
@@ -299,7 +277,12 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -6,9 +6,6 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
namespace Vocaluxe.Menu
{
public enum EBackgroundTypes
@@ -33,6 +30,8 @@ namespace Vocaluxe.Menu
public class CBackground : IMenuElement
{
private int _PartyModeID;
private Basic _Base;
private SThemeBackground _Theme;
private bool _ThemeLoaded;
@@ -44,8 +43,10 @@ namespace Vocaluxe.Menu
}
#region Constructors
public CBackground()
public CBackground(Basic Base, int PartyModeID)
{
_PartyModeID = PartyModeID;
_Base = Base;
_ThemeLoaded = false;
_Theme = new SThemeBackground();
@@ -67,7 +68,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
}
else
{
@@ -95,7 +96,7 @@ namespace Vocaluxe.Menu
{
writer.WriteStartElement(_Theme.Name);
writer.WriteComment("<Type>: Background type: " + CConfig.ListStrings(Enum.GetNames(typeof(EBackgroundTypes))));
writer.WriteComment("<Type>: Background type: " + CHelper.ListStrings(Enum.GetNames(typeof(EBackgroundTypes))));
writer.WriteElementString("Type", Enum.GetName(typeof(EBackgroundTypes), _Theme.Type));
writer.WriteComment("<Video>: Background video name");
@@ -129,25 +130,27 @@ namespace Vocaluxe.Menu
public void Resume()
{
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON)
CTheme.SkinVideoResume(_Theme.VideoName);
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
_Base.Theme.SkinVideoResume(_Theme.VideoName);
}
public void Pause()
{
if (_Theme.VideoName != String.Empty)
CTheme.SkinVideoPause(_Theme.VideoName);
_Base.Theme.SkinVideoPause(_Theme.VideoName);
}
public bool Draw()
{
bool ok = false;
if (_Theme.Type == EBackgroundTypes.Video && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CConfig.VideosToBackground == EOffOn.TR_CONFIG_ON && CBackgroundMusic.Playing && CBackgroundMusic.SongHasVideo && CBackgroundMusic.VideoEnabled && !CBackgroundMusic.Disabled)
if (_Theme.Type == EBackgroundTypes.Video && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON &&
_Base.Config.GetVideosToBackground() == EOffOn.TR_CONFIG_ON && _Base.BackgroundMusic.IsPlaying() && _Base.BackgroundMusic.SongHasVideo() &&
_Base.BackgroundMusic.VideoEnabled() && !_Base.BackgroundMusic.IsDisabled())
{
Pause();
ok = DrawBackgroundMusicVideo();
}
else if (_Theme.Type == EBackgroundTypes.Video && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON)
else if (_Theme.Type == EBackgroundTypes.Video && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
{
Resume();
ok = DrawVideo();
@@ -155,11 +158,11 @@ namespace Vocaluxe.Menu
if (_Theme.TextureName != String.Empty &&
(_Theme.Type == EBackgroundTypes.Texture ||
(_Theme.Type == EBackgroundTypes.Video && (CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_OFF || !ok))))
(_Theme.Type == EBackgroundTypes.Video && (_Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF || !ok))))
ok = DrawTexture();
if (_Theme.Type == EBackgroundTypes.Color || _Theme.Type == EBackgroundTypes.Texture && !ok ||
(_Theme.Type == EBackgroundTypes.Video && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_OFF && !ok))
(_Theme.Type == EBackgroundTypes.Video && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF && !ok))
DrawColor();
return true;
@@ -172,7 +175,7 @@ namespace Vocaluxe.Menu
public void LoadTextures()
{
if (_Theme.ColorName != String.Empty)
Color = CTheme.GetColor(_Theme.ColorName);
Color = _Base.Theme.GetColor(_Theme.ColorName);
}
public void ReloadTextures()
@@ -185,21 +188,21 @@ namespace Vocaluxe.Menu
#region internal
private void DrawColor()
{
SRectF bounds = new SRectF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH, CSettings.zFar/4);
SRectF bounds = new SRectF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), _Base.Settings.GetZFar()/4);
CDraw.DrawColor(Color, bounds);
_Base.Drawing.DrawColor(Color, bounds);
}
private bool DrawTexture()
{
STexture Texture = CTheme.GetSkinTexture(_Theme.TextureName);
STexture Texture = _Base.Theme.GetSkinTexture(_Theme.TextureName);
if (Texture.height > 0)
{
RectangleF bounds = new RectangleF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH);
RectangleF bounds = new RectangleF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH());
RectangleF rect = new RectangleF(0f, 0f, Texture.width, Texture.height);
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
CDraw.DrawTexture(Texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CSettings.zFar / 4));
_Base.Drawing.DrawTexture(Texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _Base.Settings.GetZFar() / 4));
return true;
}
return false;
@@ -207,14 +210,14 @@ namespace Vocaluxe.Menu
private bool DrawVideo()
{
STexture VideoTexture = CTheme.GetSkinVideoTexture(_Theme.VideoName);
STexture VideoTexture = _Base.Theme.GetSkinVideoTexture(_Theme.VideoName);
if (VideoTexture.height > 0)
{
RectangleF bounds = new RectangleF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH);
RectangleF bounds = new RectangleF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH());
RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height);
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
CDraw.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CSettings.zFar / 4));
_Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _Base.Settings.GetZFar() / 4));
return true;
}
return false;
@@ -222,14 +225,14 @@ namespace Vocaluxe.Menu
private bool DrawBackgroundMusicVideo()
{
STexture VideoTexture = CBackgroundMusic.GetVideoTexture();
STexture VideoTexture = _Base.BackgroundMusic.GetVideoTexture();
if (VideoTexture.height > 0)
{
RectangleF bounds = new RectangleF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH);
RectangleF bounds = new RectangleF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH());
RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height);
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
CDraw.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CSettings.zFar / 4));
_Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _Base.Settings.GetZFar() / 4));
return true;
}
return false;
@@ -5,9 +5,6 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
namespace Vocaluxe.Menu
{
struct SThemeButton
@@ -21,11 +18,15 @@ namespace Vocaluxe.Menu
public string STextureName;
}
class CButton : IMenuElement
public class CButton : IMenuElement
{
private Basic _Base;
private SThemeButton _Theme;
private bool _ThemeLoaded;
private int _PartyModeID;
public STexture Texture;
public STexture STexture;
public SRectF Rect;
public SColorF Color;
public SColorF SColor;
@@ -65,25 +66,31 @@ namespace Vocaluxe.Menu
}
}
public bool Visible;
public bool Enabled;
public string GetThemeName()
{
return _Theme.Name;
}
public CButton()
public CButton(Basic Base, int PartyModeID)
{
_PartyModeID = PartyModeID;
_Base = Base;
_Theme = new SThemeButton();
Rect = new SRectF();
Color = new SColorF();
SColor = new SColorF();
Texture = new STexture(-1);
STexture = new STexture(-1);
SelText = false;
Text = new CText();
SText = new CText();
Text = new CText(_Base, _PartyModeID);
SText = new CText(_Base, _PartyModeID);
Selected = false;
Visible = true;
EditMode = false;
Enabled = true;
Reflection = false;
ReflectionSpace = 0f;
@@ -94,6 +101,40 @@ namespace Vocaluxe.Menu
SReflectionHeight = 0f;
}
public CButton(CButton button)
{
_PartyModeID = button._PartyModeID;
_Base = button._Base;
_Theme = new SThemeButton();
_Theme.ColorName = button._Theme.ColorName;
_Theme.SColorName = button._Theme.SColorName;
_Theme.TextureName = button._Theme.TextureName;
_Theme.STextureName = button._Theme.STextureName;
Rect = new SRectF(button.Rect);
Color = new SColorF(button.Color);
SColor = new SColorF(button.Color);
Texture = button.Texture;
STexture = button.STexture;
SelText = false;
Text = new CText(button.Text);
SText = new CText(button.SText);
Selected = false;
Visible = true;
EditMode = false;
_ThemeLoaded = false;
Enabled = button.Enabled;
Reflection = button.Reflection;
ReflectionHeight = button.ReflectionHeight;
ReflectionSpace = button.ReflectionSpace;
SReflection = button.SReflection;
SReflectionHeight = button.SReflectionHeight;
SReflectionSpace = button.SReflectionSpace;
}
public bool LoadTheme(string XmlPath, string ElementName, XPathNavigator navigator, int SkinIndex)
{
string item = XmlPath + "/" + ElementName;
@@ -110,7 +151,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
}
else
{
@@ -122,7 +163,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/SColor", navigator, ref _Theme.SColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
}
else
{
@@ -261,43 +302,61 @@ namespace Vocaluxe.Menu
public void Draw(bool ForceDraw)
{
if (!Visible && CSettings.GameState != EGameState.EditTheme && !ForceDraw)
if (!Visible && _Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
return;
STexture texture = new STexture(-1);
if (!Selected && !Pressed)
if (!Selected && !Pressed || !Enabled)
{
texture = CTheme.GetSkinTexture(_Theme.TextureName);
CDraw.DrawTexture(texture, Rect, Color);
Text.DrawRelative(Rect.X, Rect.Y);
if (Texture.index != -1)
texture = Texture;
else
texture = _Base.Theme.GetSkinTexture(_Theme.TextureName);
_Base.Drawing.DrawTexture(texture, Rect, Color);
if (Reflection)
{
CDraw.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
_Base.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
}
else
Text.DrawRelative(Rect.X, Rect.Y);
}
else if(!SelText)
{
texture = CTheme.GetSkinTexture(_Theme.STextureName);
CDraw.DrawTexture(texture, Rect, SColor);
Text.DrawRelative(Rect.X, Rect.Y);
if (Texture.index != -1)
texture = Texture;
else
texture = _Base.Theme.GetSkinTexture(_Theme.STextureName);
_Base.Drawing.DrawTexture(texture, Rect, SColor);
if (Reflection)
{
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
_Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
}
else
Text.DrawRelative(Rect.X, Rect.Y);
}
else if(SelText)
{
texture = CTheme.GetSkinTexture(_Theme.STextureName);
CDraw.DrawTexture(texture, Rect, SColor);
SText.DrawRelative(Rect.X, Rect.Y);
if (STexture.index != -1)
texture = STexture;
else
texture = _Base.Theme.GetSkinTexture(_Theme.STextureName);
_Base.Drawing.DrawTexture(texture, Rect, SColor);
if (Reflection)
{
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
_Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
}
else
SText.DrawRelative(Rect.X, Rect.Y);
}
}
@@ -316,10 +375,10 @@ namespace Vocaluxe.Menu
Text.LoadTextures();
if (_Theme.ColorName != String.Empty)
Color = CTheme.GetColor(_Theme.ColorName);
Color = _Base.Theme.GetColor(_Theme.ColorName);
if (_Theme.SColorName != String.Empty)
SColor = CTheme.GetColor(_Theme.SColorName);
SColor = _Base.Theme.GetColor(_Theme.SColorName);
}
public void ReloadTextures()
@@ -5,9 +5,6 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
namespace Vocaluxe.Menu
{
enum EEqualizerStyle
@@ -29,8 +26,10 @@ namespace Vocaluxe.Menu
public EOffOn DrawNegative;
}
class CEqualizer : IMenuElement
public class CEqualizer : IMenuElement
{
private int _PartyModeID;
private Basic _Base;
private SThemeEqualizer _Theme;
private bool _ThemeLoaded;
@@ -54,8 +53,10 @@ namespace Vocaluxe.Menu
private float[] _Bars;
public CEqualizer()
public CEqualizer(Basic Base, int PartyModeID)
{
_PartyModeID = PartyModeID;
_Base = Base;
_Theme = new SThemeEqualizer();
_ThemeLoaded = false;
@@ -95,7 +96,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
}
else
{
@@ -107,7 +108,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/MaxColor", navigator, ref _Theme.MaxColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
}
else
{
@@ -160,9 +161,9 @@ namespace Vocaluxe.Menu
writer.WriteElementString("NumBars", _Theme.NumBars.ToString("#0"));
writer.WriteComment("<Space>: Space between equalizer-elements.");
writer.WriteElementString("Space", Space.ToString("#0.00"));
writer.WriteComment("<Style>: Style of equalizer-elements: " + CConfig.ListStrings(Enum.GetNames(typeof(EEqualizerStyle))));
writer.WriteComment("<Style>: Style of equalizer-elements: " + CHelper.ListStrings(Enum.GetNames(typeof(EEqualizerStyle))));
writer.WriteElementString("Style", Enum.GetName(typeof(EEqualizerStyle), _Theme.Style));
writer.WriteComment("<DrawNegative>: Draw negative values: " + CConfig.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteComment("<DrawNegative>: Draw negative values: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
writer.WriteElementString("DrawNegative", Enum.GetName(typeof(EOffOn), _Theme.DrawNegative));
writer.WriteComment("<Color>: Equalizer color from ColorScheme (high priority)");
@@ -262,10 +263,10 @@ namespace Vocaluxe.Menu
color = MaxColor;
}
CDraw.DrawColor(color, bar);
_Base.Drawing.DrawColor(color, bar);
if (Reflection)
CDraw.DrawColorReflection(color, bar, ReflectionSpace, ReflectionHeight);
_Base.Drawing.DrawColorReflection(color, bar, ReflectionSpace, ReflectionHeight);
}
}
@@ -276,10 +277,10 @@ namespace Vocaluxe.Menu
public void LoadTextures()
{
if (_Theme.ColorName != String.Empty)
Color = CTheme.GetColor(_Theme.ColorName);
Color = _Base.Theme.GetColor(_Theme.ColorName);
if (_Theme.MaxColorName != String.Empty)
MaxColor = CTheme.GetColor(_Theme.MaxColorName);
MaxColor = _Base.Theme.GetColor(_Theme.MaxColorName);
}
public void ReloadTextures()
+399
View File
@@ -0,0 +1,399 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.XPath;
namespace Vocaluxe.Menu
{
public class CHelper
{
public static int nCk(int n, int k)
{
if (k > n)
return 0;
if (k == 0 || k == n)
return 1;
if (k < 0 || n <= 0)
return 0; //is not defined
if (k * 2 > n)
k = n - k;
long result = n;
long nl = n;
long nk = k;
for (long i = 1; i <= k - 1; i++)
{
result = result * (n - i) / (i + 1);
}
return (int)result;
}
/// <summary>
/// Concat strings into one string with ", " as separator.
/// </summary>
public static string ListStrings(string[] str)
{
string _Result = string.Empty;
for (int i = 0; i < str.Length; i++)
{
_Result += str[i];
if (i < str.Length - 1)
_Result += ", ";
}
return _Result;
}
public static int TryReadInt(StreamReader sr)
{
char chr = '0';
string value = String.Empty;
try
{
chr = (char)sr.Peek();
while ((chr.CompareTo(' ') != 0) && ((int)chr != 19) && ((int)chr != 16) && ((int)chr != 13))
{
chr = (char)sr.Read();
value += chr.ToString();
chr = (char)sr.Peek();
}
}
catch (Exception)
{
return 0;
}
int result = 0;
int.TryParse(value, out result);
return result;
}
public static void SetRect(RectangleF Bounds, ref RectangleF Rect, float RectAspect, EAspect Aspect)
{
float rW = Bounds.Right - Bounds.Left;
float rH = Bounds.Bottom - Bounds.Top;
float rA = rW / rH;
float ScaledWidth = rW;
float ScaledHeight = rH;
switch (Aspect)
{
case EAspect.Crop:
if (rA >= RectAspect)
{
ScaledWidth = rW;
ScaledHeight = rH * rA / RectAspect;
}
else
{
ScaledHeight = rH;
ScaledWidth = rW * RectAspect / rA;
}
break;
case EAspect.LetterBox:
if (RectAspect >= 1)
{
ScaledWidth = rW;
ScaledHeight = rH * rA / RectAspect;
}
else
{
ScaledHeight = rH;
ScaledWidth = rW * RectAspect / rA;
}
break;
default:
ScaledWidth = rW;
ScaledHeight = rH;
break;
}
float Left = (rW - ScaledWidth) / 2 + Bounds.Left;
float Rigth = Left + ScaledWidth;
float Upper = (rH - ScaledHeight) / 2 + Bounds.Top;
float Lower = Upper + ScaledHeight;
Rect = new RectangleF(Left, Upper, Rigth - Left, Lower - Upper);
}
public static bool TryGetEnumValueFromXML<T>(string Cast, XPathNavigator Navigator, ref T value)
where T : struct
{
string val = String.Empty;
if (GetValueFromXML(Cast, Navigator, ref val, Enum.GetName(typeof(T), value)))
{
TryParse<T>(val, out value, true);
return true;
}
return false;
}
public static bool TryGetIntValueFromXML(string Cast, XPathNavigator Navigator, ref int value)
{
string val = String.Empty;
if (GetValueFromXML(Cast, Navigator, ref val, value.ToString()))
{
int res = 0;
if (int.TryParse(val, out res))
{
value = res;
return true;
}
}
return false;
}
public static bool TryGetFloatValueFromXML(string Cast, XPathNavigator Navigator, ref float value)
{
string val = String.Empty;
if (GetValueFromXML(Cast, Navigator, ref val, value.ToString()))
{
float res = 0;
if (TryParse(val, out res))
{
value = res;
return true;
}
}
return false;
}
public static bool GetValueFromXML(string Cast, XPathNavigator Navigator, ref string Value, string DefaultValue)
{
XPathNodeIterator iterator;
int results = 0;
string val = string.Empty;
try
{
Navigator.MoveToFirstChild();
iterator = Navigator.Select(Cast);
while (iterator.MoveNext())
{
val = iterator.Current.Value;
results++;
}
}
catch (Exception)
{
results = 0;
}
if ((results == 0) || (results > 1))
{
Value = DefaultValue;
return false;
}
else
{
Value = val;
return true;
}
}
public static List<string> GetValuesFromXML(string Cast, XPathNavigator Navigator)
{
List<string> values = new List<string>();
try
{
Navigator.MoveToRoot();
Navigator.MoveToFirstChild();
Navigator.MoveToFirstChild();
while (Navigator.Name != Cast)
Navigator.MoveToNext();
Navigator.MoveToFirstChild();
values.Add(Navigator.LocalName);
while (Navigator.MoveToNext())
values.Add(Navigator.LocalName);
}
catch (Exception)
{
}
return values;
}
public static bool GetInnerValuesFromXML(string Cast, XPathNavigator Navigator, ref List<string> Values)
{
try
{
Navigator.MoveToRoot();
Navigator.MoveToFirstChild();
Navigator.MoveToFirstChild();
while (Navigator.Name != Cast)
Navigator.MoveToNext();
Navigator.MoveToFirstChild();
Values.Add(Navigator.Value);
while (Navigator.MoveToNext())
Values.Add(Navigator.Value);
}
catch
{
return false;
}
return true;
}
public static bool ItemExistsInXML(string Cast, XPathNavigator Navigator)
{
XPathNodeIterator iterator;
int results = 0;
try
{
Navigator.MoveToFirstChild();
iterator = Navigator.Select(Cast);
while (iterator.MoveNext())
results++;
}
catch (Exception)
{
results = 0;
}
if (results == 0)
return false;
return true;
}
public List<string> ListFiles(string path, string cast)
{
return ListFiles(path, cast, false, false);
}
public List<string> ListFiles(string path, string cast, bool recursive)
{
return ListFiles(path, cast, recursive, false);
}
public List<string> ListFiles(string path, string cast, bool recursive, bool fullpath)
{
List<string> files = new List<string>();
DirectoryInfo dir = new DirectoryInfo(path);
try
{
foreach (FileInfo file in dir.GetFiles(cast))
{
if (!fullpath)
files.Add(file.Name);
else
//files.Add(Path.Combine(file.DirectoryName, file.Name));
files.Add(file.FullName);
}
if (recursive)
{
foreach (DirectoryInfo di in dir.GetDirectories())
{
files.AddRange(ListFiles(di.FullName, cast, recursive, fullpath));
}
}
}
catch (Exception)
{
}
return files;
}
public static bool TryParse<T>(string value, out T result)
where T : struct
{
return TryParse<T>(value, out result, false);
}
public static bool TryParse<T>(string value, out T result, bool ignoreCase)
where T : struct
{
result = default(T);
try
{
result = (T)Enum.Parse(typeof(T), value, ignoreCase);
return true;
}
catch { }
return false;
}
public static bool TryParse(string value, out float result)
{
value = value.Replace(',', '.');
return float.TryParse(value, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, NumberFormatInfo.InvariantInfo, out result);
}
public static bool IsInBounds(SRectF bounds, MouseEvent MouseEvent)
{
return IsInBounds(bounds, MouseEvent.X, MouseEvent.Y);
}
public static bool IsInBounds(SRectF bounds, int x, int y)
{
return ((bounds.X <= x) && (bounds.X + bounds.W >= x) && (bounds.Y <= y) && (bounds.Y + bounds.H >= y));
}
}
static class CEncoding
{
public static Encoding GetEncoding(string EncodingName)
{
switch (EncodingName)
{
case "AUTO":
return Encoding.Default;
case "CP1250":
return Encoding.GetEncoding(1250);
case "CP1252":
return Encoding.GetEncoding(1252);
case "LOCALE":
return Encoding.Default;
case "UTF8":
return Encoding.UTF8;
default:
return Encoding.UTF8;
}
}
public static string GetEncodingName(Encoding Enc)
{
string Result = "UTF8";
if (Enc.CodePage == 1250)
Result = "CP1250";
if (Enc.CodePage == 1252)
Result = "CP1252";
return Result;
}
}
}
File renamed without changes.
@@ -5,9 +5,7 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Lib.Song;
using Vocaluxe.Menu.SingNotes;
namespace Vocaluxe.Menu
{
@@ -28,8 +26,10 @@ namespace Vocaluxe.Menu
public string SColorName;
}
class CLyric : IMenuElement
public class CLyric : IMenuElement
{
private int _PartyModeID;
private Basic _Base;
private SThemeLyrics _Theme;
private bool _ThemeLoaded;
@@ -87,8 +87,10 @@ namespace Vocaluxe.Menu
set { _Style = value; }
}
public CLyric()
public CLyric(Basic Base, int PartyModeID)
{
_PartyModeID = PartyModeID;
_Base = Base;
_Theme = new SThemeLyrics();
_ThemeLoaded = false;
Color = new SColorF();
@@ -101,7 +103,7 @@ namespace Vocaluxe.Menu
_H = 1f;
_width = 1f;
_Notes = new List<SNote>();
_Text = new CText();
_Text = new CText(_Base, _PartyModeID);
_Style = ELyricStyle.Fill;
}
@@ -119,7 +121,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
}
else
{
@@ -131,7 +133,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/SColor", navigator, ref _Theme.SColorName, String.Empty))
{
_ThemeLoaded &= CTheme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
}
else
{
@@ -145,7 +147,7 @@ namespace Vocaluxe.Menu
{
_Theme.Name = ElementName;
LoadTextures();
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
_Text = new CText(_Base, _X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
}
return _ThemeLoaded;
}
@@ -219,7 +221,7 @@ namespace Vocaluxe.Menu
if (n.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
RectangleF rect = CDraw.GetTextBounds(_Text);
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
_width += rect.Width;
_Notes.Add(n);
}
@@ -238,7 +240,7 @@ namespace Vocaluxe.Menu
#region draw
public void Draw(float ActualBeat)
{
if (Visible || CSettings.GameState == EGameState.EditTheme)
if (Visible || _Base.Settings.GetGameState() == EGameState.EditTheme)
{
switch (_Style)
{
@@ -270,7 +272,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = note.Text;
RectangleF rect = CDraw.GetTextBounds(_Text);
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
if (note.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -330,7 +332,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = _Notes[note].Text;
RectangleF rect = CDraw.GetTextBounds(_Text);
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
if (_Notes[note].Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -383,7 +385,7 @@ namespace Vocaluxe.Menu
if (_Notes[zoom_note].Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
RectangleF rect = CDraw.GetTextBounds(_Text);
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
float diff = end_beat - _Notes[zoom_note].StartBeat;
if (diff <= 0f)
@@ -401,7 +403,7 @@ namespace Vocaluxe.Menu
float tz = _Text.Z;
_Text.Height += _Text.Height * p * 0.4f;
RectangleF rectz = CDraw.GetTextBounds(_Text);
RectangleF rectz = _Base.Drawing.GetTextBounds(_Text);
_Text.X -= (rectz.Width - rect.Width) / 2f;
_Text.Y -= (rectz.Height - rect.Height) / 2f;
_Text.Z -= 0.1f;
@@ -424,7 +426,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = note.Text;
RectangleF rect = CDraw.GetTextBounds(_Text);
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
if (note.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -466,7 +468,7 @@ namespace Vocaluxe.Menu
_Text.X = x;
_Text.Style = EStyle.Bold;
_Text.Text = _Notes[note].Text;
RectangleF rect = CDraw.GetTextBounds(_Text);
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
if (_Notes[note].Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
@@ -549,10 +551,10 @@ namespace Vocaluxe.Menu
public void LoadTextures()
{
if (_Theme.ColorName != String.Empty)
Color = CTheme.GetColor(_Theme.ColorName);
Color = _Base.Theme.GetColor(_Theme.ColorName);
if (_Theme.SColorName != String.Empty)
ColorProcessed = CTheme.GetColor(_Theme.SColorName);
ColorProcessed = _Base.Theme.GetColor(_Theme.SColorName);
}
public void ReloadTextures()
@@ -8,8 +8,6 @@ using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Menu.SingNotes;
using Vocaluxe.Menu.SongMenu;
@@ -22,10 +20,12 @@ namespace Vocaluxe.Menu
public float z;
}
abstract class CMenu
public abstract class CMenu : IMenu
{
private List<CInteraction> _Interactions;
private int _Selection = 0;
private string _ThemePath = String.Empty;
protected int _PartyModeID = -1;
private List<CBackground> _Backgrounds;
private List<CButton> _Buttons;
@@ -75,12 +75,18 @@ namespace Vocaluxe.Menu
protected string[] _ThemePlaylists;
protected SRectF _ScreenArea;
protected Basic _Base;
public SRectF ScreenArea
{
get { return _ScreenArea; }
}
public SRectF GetScreenArea()
{
return _ScreenArea;
}
public int ThemeScreenVersion
{
get { return _ScreenVersion; }
@@ -88,6 +94,11 @@ namespace Vocaluxe.Menu
public CMenu()
{
}
public void Initialize(Basic Base)
{
_Base = Base;
Init();
}
@@ -127,8 +138,8 @@ namespace Vocaluxe.Menu
_MouseDY = 0;
_Active = false;
_ScreenArea = new SRectF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH, 0f);
_ScreenArea = new SRectF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), 0f);
_ThemeName = String.Empty;
_ThemeBackgrounds = null;
_ThemeStatics = null;
@@ -141,12 +152,17 @@ namespace Vocaluxe.Menu
_ThemeNameSelections = null;
_ThemeEqualizers = null;
_ThemePlaylists = null;
}
#region ThemeHandler
public virtual void LoadTheme()
protected void FadeTo(EScreens NextScreen)
{
string file = Path.Combine(CTheme.GetThemeScreensPath(), _ThemeName + ".xml");
_Base.Graphics.FadeTo(NextScreen);
}
#region ThemeHandler
public virtual void LoadTheme(string XmlPath)
{
string file = Path.Combine(XmlPath, _ThemeName + ".xml");
XPathDocument xPathDoc = null;
XPathNavigator navigator = null;
@@ -167,31 +183,32 @@ namespace Vocaluxe.Menu
if (xPathDoc != null)
xPathDoc = null;
CLog.LogError("Error loading theme file " + file + ": " + e.Message);
_Base.Log.LogError("Error loading theme file " + file + ": " + e.Message);
}
bool VersionCheck = false;
if (loaded)
VersionCheck = CheckVersion(_ScreenVersion, navigator);
int SkinIndex = CTheme.GetSkinIndex();
int SkinIndex = _Base.Theme.GetSkinIndex();
if (loaded && VersionCheck && SkinIndex != -1)
{
_ThemePath = XmlPath;
LoadThemeBasics(navigator, SkinIndex);
if (_ThemeBackgrounds != null)
{
for (int i = 0; i < _ThemeBackgrounds.Length; i++)
{
CBackground background = new CBackground();
CBackground background = new CBackground(_Base, _PartyModeID);
if (background.LoadTheme("//root/" + _ThemeName, _ThemeBackgrounds[i], navigator, SkinIndex))
{
_htBackgrounds.Add(_ThemeBackgrounds[i], AddBackground(background));
}
else
{
CLog.LogError("Can't load Background \"" + _ThemeBackgrounds[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load Background \"" + _ThemeBackgrounds[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -200,14 +217,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeStatics.Length; i++)
{
CStatic stat = new CStatic();
CStatic stat = new CStatic(_Base, _PartyModeID);
if (stat.LoadTheme("//root/" + _ThemeName, _ThemeStatics[i], navigator, SkinIndex))
{
_htStatics.Add(_ThemeStatics[i], AddStatic(stat));
}
else
{
CLog.LogError("Can't load Static \"" + _ThemeStatics[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load Static \"" + _ThemeStatics[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -216,14 +233,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeTexts.Length; i++)
{
CText text = new CText();
CText text = new CText(_Base, _PartyModeID);
if (text.LoadTheme("//root/" + _ThemeName, _ThemeTexts[i], navigator, SkinIndex))
{
_htTexts.Add(_ThemeTexts[i], AddText(text));
}
else
{
CLog.LogError("Can't load Text \"" + _ThemeTexts[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load Text \"" + _ThemeTexts[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -232,14 +249,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeButtons.Length; i++)
{
CButton button = new CButton();
CButton button = new CButton(_Base, _PartyModeID);
if (button.LoadTheme("//root/" + _ThemeName, _ThemeButtons[i], navigator, SkinIndex))
{
_htButtons.Add(_ThemeButtons[i], AddButton(button));
}
else
{
CLog.LogError("Can't load Button \"" + _ThemeButtons[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load Button \"" + _ThemeButtons[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -248,14 +265,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeSelectSlides.Length; i++)
{
CSelectSlide slide = new CSelectSlide();
CSelectSlide slide = new CSelectSlide(_Base, _PartyModeID);
if (slide.LoadTheme("//root/" + _ThemeName, _ThemeSelectSlides[i], navigator, SkinIndex))
{
_htSelectSlides.Add(_ThemeSelectSlides[i], AddSelectSlide(slide));
}
else
{
CLog.LogError("Can't load SelectSlide \"" + _ThemeSelectSlides[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load SelectSlide \"" + _ThemeSelectSlides[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -264,14 +281,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeSongMenus.Length; i++)
{
CSongMenu sm = new CSongMenu();
CSongMenu sm = new CSongMenu(_Base, _PartyModeID);
if (sm.LoadTheme("//root/" + _ThemeName, _ThemeSongMenus[i], navigator, SkinIndex))
{
_htSongMenus.Add(_ThemeSongMenus[i], AddSongMenu(sm));
}
else
{
CLog.LogError("Can't load SongMenu \"" + _ThemeSongMenus[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load SongMenu \"" + _ThemeSongMenus[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -280,14 +297,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeLyrics.Length; i++)
{
CLyric lyric = new CLyric();
CLyric lyric = new CLyric(_Base, _PartyModeID);
if (lyric.LoadTheme("//root/" + _ThemeName, _ThemeLyrics[i], navigator, SkinIndex))
{
_htLyrics.Add(_ThemeLyrics[i], AddLyric(lyric));
}
else
{
CLog.LogError("Can't load Lyric \"" + _ThemeLyrics[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load Lyric \"" + _ThemeLyrics[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -296,14 +313,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeSingNotes.Length; i++)
{
CSingNotes notes = new CSingNotesClassic();
CSingNotes notes = new CSingNotesClassic(_Base, _PartyModeID);
if (notes.LoadTheme("//root/" + _ThemeName, _ThemeSingNotes[i], navigator, SkinIndex))
{
_htSingNotes.Add(_ThemeSingNotes[i], AddSingNote(notes));
}
else
{
CLog.LogError("Can't load SingBar \"" + _ThemeSingNotes[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load SingBar \"" + _ThemeSingNotes[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -312,14 +329,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeNameSelections.Length; i++)
{
CNameSelection nsel = new CNameSelection();
CNameSelection nsel = new CNameSelection(_Base, _PartyModeID);
if (nsel.LoadTheme("//root/" + _ThemeName, _ThemeNameSelections[i], navigator, SkinIndex))
{
_htNameSelections.Add(_ThemeNameSelections[i], AddNameSelection(nsel));
}
else
{
CLog.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -328,14 +345,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemeEqualizers.Length; i++)
{
CEqualizer eq = new CEqualizer();
CEqualizer eq = new CEqualizer(_Base, _PartyModeID);
if (eq.LoadTheme("//root/" + _ThemeName, _ThemeEqualizers[i], navigator, SkinIndex))
{
_htEqualizers.Add(_ThemeEqualizers[i], AddEqualizer(eq));
}
else
{
CLog.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -344,14 +361,14 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _ThemePlaylists.Length; i++)
{
CPlaylist pls = new CPlaylist();
CPlaylist pls = new CPlaylist(_Base, _PartyModeID);
if (pls.LoadTheme("//root/" + _ThemeName, _ThemePlaylists[i], navigator, SkinIndex))
{
_htPlaylists.Add(_ThemePlaylists[i], AddPlaylist(pls));
}
else
{
CLog.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName);
_Base.Log.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName);
}
}
}
@@ -364,12 +381,15 @@ namespace Vocaluxe.Menu
public virtual void SaveTheme()
{
if (_ThemePath == String.Empty)
return;
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.Encoding = Encoding.UTF8;
settings.ConformanceLevel = ConformanceLevel.Document;
string file = Path.Combine(CTheme.GetThemeScreensPath(), _ThemeName + ".xml");
string file = Path.Combine(_ThemePath, _ThemeName + ".xml");
XmlWriter writer = XmlWriter.Create(file, settings);
writer.WriteStartDocument();
@@ -570,9 +590,12 @@ namespace Vocaluxe.Menu
public virtual void ReloadTheme()
{
if (_ThemePath == String.Empty)
return;
UnloadTextures();
Init();
LoadTheme();
Init();
LoadTheme(_ThemePath);
}
#endregion ThemeHandler
@@ -634,6 +657,99 @@ namespace Vocaluxe.Menu
#endregion GetLists
#region ElementHandler
#region Create Elements
public CButton GetNewButton()
{
return new CButton(_Base, _PartyModeID);
}
public CButton GetNewButton(CButton button)
{
return new CButton(button);
}
public CText GetNewText()
{
return new CText(_Base, _PartyModeID);
}
public CText GetNewText(CText text)
{
return new CText(text);
}
public CText GetNewText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
{
return new CText(_Base, x, y, z, h, mw, align, style, font, col, text);
}
public CBackground GetNewBackground()
{
return new CBackground(_Base, _PartyModeID);
}
public CStatic GetNewStatic()
{
return new CStatic(_Base, _PartyModeID);
}
public CStatic GetNewStatic(CStatic Static)
{
return new CStatic(Static);
}
public CStatic GetNewStatic(STexture Texture, SColorF Color, SRectF Rect)
{
return new CStatic(_Base, _PartyModeID, Texture, Color, Rect);
}
public CSelectSlide GetNewSelectSlide()
{
return new CSelectSlide(_Base, _PartyModeID);
}
public CSelectSlide GetNewSelectSlide(CSelectSlide slide)
{
return new CSelectSlide(slide);
}
public CSongMenu GetNewSongMenu()
{
return new CSongMenu(_Base, _PartyModeID);
}
public CLyric GetNewLyric()
{
return new CLyric(_Base, _PartyModeID);
}
public CSingNotes GetNewSingNotes()
{
return new CSingNotesClassic(_Base, _PartyModeID);
}
public CNameSelection GetNewNameSelection()
{
return new CNameSelection(_Base, _PartyModeID);
}
public CEqualizer GetNewEqualizer()
{
return new CEqualizer(_Base, _PartyModeID);
}
public CPlaylist GetNewPlaylist()
{
return new CPlaylist(_Base, _PartyModeID);
}
public CParticleEffect GetNewParticleEffect(int MaxNumber, SColorF Color, SRectF Area, STexture Texture, float Size, EParticeType Type)
{
return new CParticleEffect(_Base, _PartyModeID, MaxNumber, Color, Area, Texture, Size, Type);
}
#endregion Create Elements
#region Get Arrays
public CButton[] Buttons
{
@@ -733,7 +849,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Background Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Background Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -746,7 +862,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Statics Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Statics Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -759,7 +875,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Text Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Text Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -772,7 +888,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Button Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Button Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -785,7 +901,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find SongMenu Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find SongMenu Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -798,7 +914,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Lyric Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Lyric Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -811,7 +927,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find SelectSlide Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find SelectSlide Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -824,7 +940,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find SingBar Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find SingBar Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -837,7 +953,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -850,7 +966,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -863,7 +979,7 @@ namespace Vocaluxe.Menu
}
catch (Exception)
{
CLog.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName);
_Base.Log.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName);
throw;
}
}
@@ -873,7 +989,7 @@ namespace Vocaluxe.Menu
#region MenuHandler
public virtual bool HandleInput(KeyEvent KeyEvent)
{
if (!CSettings.TabNavigation)
if (!_Base.Settings.IsTabNavigation())
{
if (KeyEvent.Key == Keys.Left)
{
@@ -912,35 +1028,25 @@ namespace Vocaluxe.Menu
if (KeyEvent.Key == Keys.Right)
NextElement();
}
if (!CBackgroundMusic.Disabled)
if (_Base.BackgroundMusic.IsDisabled())
{
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp))
{
CConfig.BackgroundMusicVolume = CConfig.BackgroundMusicVolume + 5;
if (CConfig.BackgroundMusicVolume > 100)
CConfig.BackgroundMusicVolume = 100;
CConfig.SaveConfig();
}
_Base.Config.SetBackgroundMusicVolume(_Base.Config.GetBackgroundMusicVolume() + 5);
else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown))
{
CConfig.BackgroundMusicVolume = CConfig.BackgroundMusicVolume - 5;
if (CConfig.BackgroundMusicVolume < 0)
CConfig.BackgroundMusicVolume = 0;
CConfig.SaveConfig();
}
_Base.Config.SetBackgroundMusicVolume(_Base.Config.GetBackgroundMusicVolume() - 5);
else if (KeyEvent.Key == Keys.MediaNextTrack)
CBackgroundMusic.Next();
_Base.BackgroundMusic.Next();
else if (KeyEvent.Key == Keys.MediaPreviousTrack)
CBackgroundMusic.Previous();
_Base.BackgroundMusic.Previous();
else if (KeyEvent.Key == Keys.MediaPlayPause)
{
if (CBackgroundMusic.Playing)
CBackgroundMusic.Pause();
if (_Base.BackgroundMusic.IsPlaying())
_Base.BackgroundMusic.Pause();
else
CBackgroundMusic.Play();
_Base.BackgroundMusic.Play();
}
CBackgroundMusic.ApplyVolume();
_Base.BackgroundMusic.ApplyVolume();
}
return true;
@@ -977,7 +1083,7 @@ namespace Vocaluxe.Menu
switch (KeyEvent.Key)
{
case Keys.S:
CGraphics.SaveTheme();
_Base.Graphics.SaveTheme();
break;
case Keys.R:
@@ -1264,6 +1370,12 @@ namespace Vocaluxe.Menu
#endregion Elements
#region InteractionHandling
public void CheckInteraction()
{
if (!_IsEnabled(_Selection) || !_IsVisible(_Selection))
PrevInteraction();
}
public void NextInteraction()
{
if (_Interactions.Count > 0)
@@ -1351,10 +1463,10 @@ namespace Vocaluxe.Menu
public void SelectByMouse(int x, int y)
{
float z = CSettings.zFar;
float z = _Base.Settings.GetZFar();
for (int i = 0; i < _Interactions.Count; i++)
{
if ((CSettings.GameState == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i)))
if ((_Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
{
if (_IsMouseOver(x, y, _Interactions[i]))
{
@@ -1405,7 +1517,7 @@ namespace Vocaluxe.Menu
return true;
break;
case EType.TText:
RectangleF bounds = CDraw.GetTextBounds(_Texts[interact.Num]);
RectangleF bounds = _Base.Drawing.GetTextBounds(_Texts[interact.Num]);
if (CHelper.IsInBounds(new SRectF(_Texts[interact.Num].X, _Texts[interact.Num].Y, bounds.Width, bounds.Height, _Texts[interact.Num].Z), x, y))
return true;
break;
@@ -1456,7 +1568,7 @@ namespace Vocaluxe.Menu
case EType.TPlaylist:
return _Playlists[interact.Num].Rect.Z;
}
return CSettings.zFar;
return _Base.Settings.GetZFar();
}
private float _GetZValue(int interaction)
@@ -1491,13 +1603,13 @@ namespace Vocaluxe.Menu
return _Playlists[_Interactions[interaction].Num].Rect.Z;
}
return CSettings.zFar;
return _Base.Settings.GetZFar();
}
private void _NextInteraction()
{
_UnsetSelected();
if (CSettings.GameState != EGameState.EditTheme)
if (_Base.Settings.GetGameState() != EGameState.EditTheme)
{
bool found = false;
int start = _Selection;
@@ -1507,7 +1619,7 @@ namespace Vocaluxe.Menu
if (start > _Interactions.Count - 1)
start = 0;
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start)))
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start) && _IsEnabled(start)))
found = true;
} while (!found);
_Selection = start;
@@ -1524,7 +1636,7 @@ namespace Vocaluxe.Menu
private void _PrevInteraction()
{
_UnsetSelected();
if (CSettings.GameState != EGameState.EditTheme)
if (_Base.Settings.GetGameState() != EGameState.EditTheme)
{
bool found = false;
int start = _Selection;
@@ -1534,7 +1646,7 @@ namespace Vocaluxe.Menu
if (start < 0)
start = _Interactions.Count - 1;
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start)))
if ((start == _Selection) || (!_Interactions[start].ThemeEditorOnly && _IsVisible(start) && _IsEnabled(start)))
found = true;
} while (!found);
_Selection = start;
@@ -1635,7 +1747,7 @@ namespace Vocaluxe.Menu
for (int i = 0; i < _Interactions.Count; i++)
{
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i))
{
SRectF targetRect = _GetRect(i);
float dist = _GetDistanceDirect(Key, actualRect, targetRect);
@@ -1652,7 +1764,7 @@ namespace Vocaluxe.Menu
{
for (int i = 0; i < _Interactions.Count; i++)
{
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i))
{
SRectF targetRect = _GetRect(i);
float dist = _GetDistance180(Key, actualRect, targetRect);
@@ -1671,13 +1783,13 @@ namespace Vocaluxe.Menu
switch (Key.Key)
{
case Keys.Up:
actualRect = new SRectF(actualRect.X, CSettings.iRenderH, 1, 1, actualRect.Z);
actualRect = new SRectF(actualRect.X, _Base.Settings.GetRenderH(), 1, 1, actualRect.Z);
break;
case Keys.Down:
actualRect = new SRectF(actualRect.X, 0, 1, 1, actualRect.Z);
break;
case Keys.Left:
actualRect = new SRectF(CSettings.iRenderW, actualRect.Y, 1, 1, actualRect.Z);
actualRect = new SRectF(_Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
break;
case Keys.Right:
actualRect = new SRectF(0, actualRect.Y, 1, 1, actualRect.Z);
@@ -1688,7 +1800,7 @@ namespace Vocaluxe.Menu
for (int i = 0; i < _Interactions.Count; i++)
{
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i))
{
SRectF targetRect = _GetRect(i);
float dist = _GetDistance180(Key, actualRect, targetRect);
@@ -1968,6 +2080,9 @@ namespace Vocaluxe.Menu
private bool _IsVisible(int interaction)
{
if (_Selection >= _Interactions.Count || _Selection < 0)
return false;
switch (_Interactions[interaction].Type)
{
case EType.TButton:
@@ -2001,6 +2116,44 @@ namespace Vocaluxe.Menu
return false;
}
private bool _IsEnabled(int interaction)
{
if (_Selection >= _Interactions.Count || _Selection < 0)
return false;
switch (_Interactions[interaction].Type)
{
case EType.TButton:
return _Buttons[_Interactions[interaction].Num].Enabled;
case EType.TSelectSlide:
return _SelectSlides[_Interactions[interaction].Num].Visible;
case EType.TStatic:
return false; //_Statics[_Interactions[interaction].Num].Visible;
case EType.TText:
return false; //_Texts[_Interactions[interaction].Num].Visible;
case EType.TSongMenu:
return _SongMenus[_Interactions[interaction].Num].Visible;
case EType.TLyric:
return false; //_Lyrics[_Interactions[interaction].Num].Visible;
case EType.TNameSelection:
return _NameSelections[_Interactions[interaction].Num].Visible;
case EType.TEqualizer:
return false; //_Equalizers[_Interactions[interaction].Num].Visible;
case EType.TPlaylist:
return _Playlists[_Interactions[interaction].Num].Visible;
}
return false;
}
private SRectF _GetRect(int interaction)
{
SRectF Result = new SRectF();
@@ -2195,7 +2348,7 @@ namespace Vocaluxe.Menu
msg += "the file is for newer program versions! ";
msg += "Current screen version is " + Version.ToString();
CLog.LogError(msg);
_Base.Log.LogError(msg);
}
return false;
}
@@ -2205,47 +2358,97 @@ namespace Vocaluxe.Menu
string value = String.Empty;
// Backgrounds
CBackground background = new CBackground();
CBackground background = new CBackground(_Base, _PartyModeID);
int i = 1;
while (background.LoadTheme("//root/" + _ThemeName, "Background" + i.ToString(), navigator, SkinIndex))
{
AddBackground(background);
background = new CBackground();
background = new CBackground(_Base, _PartyModeID);
i++;
}
// Statics
CStatic stat = new CStatic();
CStatic stat = new CStatic(_Base, _PartyModeID);
i = 1;
while (stat.LoadTheme("//root/" + _ThemeName, "Static" + i.ToString(), navigator, SkinIndex))
{
AddStatic(stat);
stat = new CStatic();
stat = new CStatic(_Base, _PartyModeID);
i++;
}
// Texts
CText text = new CText();
CText text = new CText(_Base, _PartyModeID);
i = 1;
while (text.LoadTheme("//root/" + _ThemeName, "Text" + i.ToString(), navigator, SkinIndex))
{
AddText(text);
text = new CText();
text = new CText(_Base, _PartyModeID);
i++;
}
}
private void ReloadThemeEditMode()
{
CTheme.UnloadSkins();
CTheme.ListSkins();
CTheme.LoadSkins();
CTheme.LoadTheme();
CGraphics.ReloadTheme();
_Base.Theme.UnloadSkins();
_Base.Theme.ListSkins();
_Base.Theme.LoadSkins();
_Base.Theme.LoadTheme();
_Base.Graphics.ReloadTheme();
OnShow();
OnShowFinish();
}
#endregion Theme Handling
}
public class Basic
{
public IConfig Config;
public ISettings Settings;
public ITheme Theme;
public IHelper Helper;
public ILog Log;
public IBackgroundMusic BackgroundMusic;
public IDrawing Drawing;
public IGraphics Graphics;
public IFonts Fonts;
public ILanguage Language;
public IGame Game;
public IProfiles Profiles;
public IRecording Record;
public ISongs Songs;
public IVideo Video;
public ISound Sound;
public ICover Cover;
public IDataBase DataBase;
public IInputs Input;
public IPlaylist Playlist;
public Basic(IConfig Config, ISettings Settings, ITheme Theme, IHelper Helper, ILog Log, IBackgroundMusic BackgroundMusic,
IDrawing Draw, IGraphics Graphics, IFonts Fonts, ILanguage Language, IGame Game, IProfiles Profiles, IRecording Record,
ISongs Songs, IVideo Video, ISound Sound, ICover Cover, IDataBase DataBase, IInputs Input, IPlaylist Playlist)
{
this.Config = Config;
this.Settings = Settings;
this.Theme = Theme;
this.Helper = Helper;
this.Log = Log;
this.BackgroundMusic = BackgroundMusic;
this.Drawing = Draw;
this.Graphics = Graphics;
this.Fonts = Fonts;
this.Language = Language;
this.Game = Game;
this.Profiles = Profiles;
this.Record = Record;
this.Songs = Songs;
this.Video = Video;
this.Sound = Sound;
this.Cover = Cover;
this.DataBase = DataBase;
this.Input = Input;
this.Playlist = Playlist;
}
}
}
+56
View File
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Text;
using Vocaluxe.PartyModes;
namespace Vocaluxe.Menu
{
public abstract class CMenuParty : CMenu
{
protected IPartyMode _PartyMode;
public CMenuParty()
{
_PartyMode = new CPartyModeNone();
}
public void SetPartyModeID(int PartyModeID)
{
_PartyModeID = PartyModeID;
}
public int GetPartyModeID()
{
return _PartyModeID;
}
public void AssingPartyMode(IPartyMode PartyMode)
{
_PartyMode = PartyMode;
}
public virtual void DataToScreen(Object Data)
{
}
/*
public sealed override void LoadTheme()
{
}
public sealed override void ReloadTextures()
{
}
public sealed override void ReloadTheme()
{
}
public override void UnloadTextures()
{
}
*/
}
}
Loaded 100 of 127 files, more files were not shown because too many files have changed in this diff. Show more