Merge pull request #166 from flokuep/develop
SongList-View and some fixes...
This commit is contained in:
commit
3e341c2475
35 files changed
+1395
-58
No files matched your search
@@ -46,7 +46,7 @@
|
|||||||
<string name="TR_CONFIG_LEVEL2">Level 2</string>
|
<string name="TR_CONFIG_LEVEL2">Level 2</string>
|
||||||
<string name="TR_CONFIG_LEVEL3">Level 3</string>
|
<string name="TR_CONFIG_LEVEL3">Level 3</string>
|
||||||
<string name="TR_CONFIG_LEVEL_MAX">Max</string>
|
<string name="TR_CONFIG_LEVEL_MAX">Max</string>
|
||||||
<string name="TR_CONFIG_LIST">List</string>
|
<string name="TR_CONFIG_LIST">Song List</string>
|
||||||
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
|
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
|
||||||
<string name="TR_CONFIG_TILE_BOARD">TileBoard</string>
|
<string name="TR_CONFIG_TILE_BOARD">TileBoard</string>
|
||||||
<string name="TR_CONFIG_BOOK">Book</string>
|
<string name="TR_CONFIG_BOOK">Book</string>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<string name="TR_CONFIG_LEVEL2">Level 2</string>
|
<string name="TR_CONFIG_LEVEL2">Level 2</string>
|
||||||
<string name="TR_CONFIG_LEVEL3">Level 3</string>
|
<string name="TR_CONFIG_LEVEL3">Level 3</string>
|
||||||
<string name="TR_CONFIG_LEVEL_MAX">Maximal</string>
|
<string name="TR_CONFIG_LEVEL_MAX">Maximal</string>
|
||||||
<string name="TR_CONFIG_LIST">Liste</string>
|
<string name="TR_CONFIG_LIST">Songliste</string>
|
||||||
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
|
<string name="TR_CONFIG_DREIDEL">Dreidel</string>
|
||||||
<string name="TR_CONFIG_TILE_BOARD">TileBoard</string>
|
<string name="TR_CONFIG_TILE_BOARD">TileBoard</string>
|
||||||
<string name="TR_CONFIG_BOOK">Book</string>
|
<string name="TR_CONFIG_BOOK">Book</string>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<Informations>
|
<Informations>
|
||||||
<ScreenName>ScreenSong</ScreenName>
|
<ScreenName>ScreenSong</ScreenName>
|
||||||
<ScreenVersion>5</ScreenVersion>
|
<ScreenVersion>6</ScreenVersion>
|
||||||
</Informations>
|
</Informations>
|
||||||
<Backgrounds>
|
<Backgrounds>
|
||||||
<Background Name="Background1">
|
<Background Name="Background1">
|
||||||
@@ -860,6 +860,133 @@
|
|||||||
</Rect>
|
</Rect>
|
||||||
</StaticMedleyTagIcon>
|
</StaticMedleyTagIcon>
|
||||||
</SongMenuTileBoard>
|
</SongMenuTileBoard>
|
||||||
|
<SongMenuList>
|
||||||
|
<ListLength>15</ListLength>
|
||||||
|
<SpaceW>10</SpaceW>
|
||||||
|
<SpaceH>10</SpaceH>
|
||||||
|
<TileRect>
|
||||||
|
<X>410</X>
|
||||||
|
<Y>40</Y>
|
||||||
|
<W>830</W>
|
||||||
|
<H>550</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</TileRect>
|
||||||
|
<TileRectSmall>
|
||||||
|
<X>410</X>
|
||||||
|
<Y>40</Y>
|
||||||
|
<W>555</W>
|
||||||
|
<H>550</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</TileRectSmall>
|
||||||
|
<TextArtist Name="TextArtist">
|
||||||
|
<X>222</X>
|
||||||
|
<Y>416</Y>
|
||||||
|
<Z>-1.01</Z>
|
||||||
|
<H>39</H>
|
||||||
|
<MaxW>340</MaxW>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<SelColor Name="TextSelColor" />
|
||||||
|
<Align>Center</Align>
|
||||||
|
<ResizeAlign>Top</ResizeAlign>
|
||||||
|
<Style>Bold</Style>
|
||||||
|
<Font>Outline</Font>
|
||||||
|
<Text />
|
||||||
|
</TextArtist>
|
||||||
|
<TextTitle Name="TextTitle">
|
||||||
|
<X>222</X>
|
||||||
|
<Y>456</Y>
|
||||||
|
<Z>-1.01</Z>
|
||||||
|
<H>32</H>
|
||||||
|
<MaxW>340</MaxW>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<SelColor Name="TextSelColor" />
|
||||||
|
<Align>Center</Align>
|
||||||
|
<ResizeAlign>Top</ResizeAlign>
|
||||||
|
<Style>Bold</Style>
|
||||||
|
<Font>Outline</Font>
|
||||||
|
<Text />
|
||||||
|
</TextTitle>
|
||||||
|
<TextSongLength Name="TextSongLength">
|
||||||
|
<X>222</X>
|
||||||
|
<Y>490</Y>
|
||||||
|
<Z>-1.01</Z>
|
||||||
|
<H>28</H>
|
||||||
|
<MaxW>340</MaxW>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<SelColor Name="TextSelColor" />
|
||||||
|
<Align>Center</Align>
|
||||||
|
<ResizeAlign>Top</ResizeAlign>
|
||||||
|
<Style>Bold</Style>
|
||||||
|
<Font>Outline</Font>
|
||||||
|
<Text />
|
||||||
|
</TextSongLength>
|
||||||
|
<StaticCoverBig Name="StaticCoverBig">
|
||||||
|
<Skin>CoverBackground</Skin>
|
||||||
|
<Color Name="Visible" />
|
||||||
|
<Rect>
|
||||||
|
<X>40</X>
|
||||||
|
<Y>40</Y>
|
||||||
|
<W>360</W>
|
||||||
|
<H>360</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</Rect>
|
||||||
|
</StaticCoverBig>
|
||||||
|
<StaticTextBG Name="StaticTextBG">
|
||||||
|
<Skin>CoverBackground</Skin>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<Rect>
|
||||||
|
<X>40</X>
|
||||||
|
<Y>40</Y>
|
||||||
|
<W>360</W>
|
||||||
|
<H>550</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</Rect>
|
||||||
|
</StaticTextBG>
|
||||||
|
<StaticDuetIcon Name="StaticDuetIcon">
|
||||||
|
<Skin>DuetIcon</Skin>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<Rect>
|
||||||
|
<X>200</X>
|
||||||
|
<Y>530</Y>
|
||||||
|
<W>40</W>
|
||||||
|
<H>40</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</Rect>
|
||||||
|
</StaticDuetIcon>
|
||||||
|
<StaticVideoIcon Name="StaticVideoIcon">
|
||||||
|
<Skin>VideoIcon</Skin>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<Rect>
|
||||||
|
<X>120</X>
|
||||||
|
<Y>530</Y>
|
||||||
|
<W>40</W>
|
||||||
|
<H>40</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</Rect>
|
||||||
|
</StaticVideoIcon>
|
||||||
|
<StaticMedleyCalcIcon Name="StaticMedleyCalcIcon">
|
||||||
|
<Skin>MedleyCalcIcon</Skin>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<Rect>
|
||||||
|
<X>280</X>
|
||||||
|
<Y>530</Y>
|
||||||
|
<W>40</W>
|
||||||
|
<H>40</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</Rect>
|
||||||
|
</StaticMedleyCalcIcon>
|
||||||
|
<StaticMedleyTagIcon Name="StaticMedleyTagIcon">
|
||||||
|
<Skin>MedleyTagIcon</Skin>
|
||||||
|
<Color Name="StaticColor" />
|
||||||
|
<Rect>
|
||||||
|
<X>280</X>
|
||||||
|
<Y>530</Y>
|
||||||
|
<W>40</W>
|
||||||
|
<H>40</H>
|
||||||
|
<Z>-1</Z>
|
||||||
|
</Rect>
|
||||||
|
</StaticMedleyTagIcon>
|
||||||
|
</SongMenuList>
|
||||||
</SongMenu>
|
</SongMenu>
|
||||||
</SongMenus>
|
</SongMenus>
|
||||||
<Lyrics />
|
<Lyrics />
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
ScreenHighscore
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add: ParticleEffectsNew[1..10] (one for each entry!)
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
ScreenLoading
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Rename:<Text1> -> <TextProgramName>
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
SceenMain
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<StaticWarningProfiles>
|
||||||
|
<TextWarningProfiles>
|
||||||
|
<TextRelease>
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
SceenNames
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
<EqualizerPlayer[1...6]> (One Equalizer for each player): Equalizer shows input from assigned mic for this player.
|
||||||
|
<SelectSlideDuetPlayer[1...6]> (One SelectSlide for each player)
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<NameSelection>
|
||||||
|
A new Theme-element for name-selecting.
|
||||||
|
|
||||||
|
<StaticPlayer[1...6]> (One Static for each player): Static wich is used as drop-area
|
||||||
|
<StaticPlayerAvatar[1...6]> (One Static for each player): Static wich shows the avatar of selected player
|
||||||
|
<TextPlayer[1...6]> (One Text for each player): Text wich shows name of selected player
|
||||||
|
<SelectSlidePlayerNumber>
|
||||||
|
<StaticWarningProfiles>
|
||||||
|
<TextWarningProfiles>
|
||||||
|
|
||||||
|
Rename:
|
||||||
|
<StaticWarning> to <StaticWarningMics>
|
||||||
|
<TextWarning> to <TextWarningMics>
|
||||||
|
|
||||||
|
Remove:
|
||||||
|
<Button1Player>, <Button2Player>, <Button3Player>, <SelectSlidePlayerMic1>, <SelectSlidePlayerMic2>, <SelectSlidePlayerMic3>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
ScreenOptionsGame
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<ButtonServer>
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
ScreenOptionsSound
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
Rename <SelectSlideLyricsOnTop> to <SelectSlideLyricsPosition>
|
||||||
|
++++++++++
|
||||||
|
Version 1:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
|
||||||
|
<ButtonExit>
|
||||||
|
|
||||||
|
<SelectSlideLyricStyle>
|
||||||
|
<SelectSlideLyricsOnTop>
|
||||||
|
|
||||||
|
and some texts for description (Text1, Text2, Text3)
|
||||||
|
TR_SCREENOLYRICS_OPTIONS
|
||||||
|
TR_SCREENOLYRICS_STYLE
|
||||||
|
TR_SCREENOLYRICS_ONTOP
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
ScreenOptionsRecord
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<EqualizerChannel1> and <EqualizerChannel2>.
|
||||||
|
This is a new theme-element. Check ScreenOptionsRecord.xml for style-possibilities.
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
Rename Text 3/4 to TextChannel1/2
|
||||||
|
Rename Text5 to Text3
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
ScreenOptionsSound
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
|
||||||
|
<SelectSlidePreviewMusicVolume>
|
||||||
|
<SelectSlideGameMusicVolume>
|
||||||
|
|
||||||
|
and some texts for description (Text5, Text6)
|
||||||
|
"TR_SCRsEENOSOUND_PREVIEWMUSICVOLUME"
|
||||||
|
"TR_SCREENOSOUND_GAMEMUSICVOLUEM"
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
|
||||||
|
<ButtonExit>
|
||||||
|
|
||||||
|
<SelectSlideBackgroundMusic>
|
||||||
|
<SelectSlideBackgroundMusicVolume>
|
||||||
|
<SelectSlideBackgroundMusicSource>
|
||||||
|
|
||||||
|
and some texts for description (Text2, Text3, Text4)
|
||||||
|
"TR_SCREENOSOUND_BACKGROUNDMUSIC"
|
||||||
|
"TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME"
|
||||||
|
"TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE"
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
ScreenOptionsTheme
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SelectSlideFadeInfo>
|
||||||
|
and some texts and statics for description (Text9 and Static9)
|
||||||
|
"TR_SCREENOTHEME_FADEINFO"
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SelectSlideCoverLoading>
|
||||||
|
and some texts and statics for description (Text8 and Static8)
|
||||||
|
"TR_SCREENOTHEME_COVERLOADING"
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
++++++++++
|
||||||
|
Version 5:
|
||||||
|
|
||||||
|
Rename:
|
||||||
|
Text5/6 to TextWebcam/TextWebcamResolution
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<ButtonScreenAdjustments>
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SelectSlideWebcamDevices>, <SelectSlideWebcamCapabilities>, <StaticWebcamOutput>
|
||||||
|
|
||||||
|
and some texts and static for description (Text6, Text7)
|
||||||
|
"TR_SCREENO_VIDEO_WEBCAMDEVICES", "TR_SCREENO_VIDEO_WEBCAMCAPABILITIES"
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SelectSlideVideosToBackground>
|
||||||
|
and some texts and statics for description (Text5)
|
||||||
|
"TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND"
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
ScreenProfiles
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
Rename: <SelectSlideGuestProfile> to <SelectSlideUserRole>
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add: <ButtonDiscardSnapshot>, <ButtonSaveSnapshot>, <ButtonWebcam>, <ButtonTakeSnapshot>
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
ScreenScore
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
Add <ScreenSettingShortScore>, <ScreenSettingShortRating>, <ScreenSettingShortDifficulty> to change text-string with player-num >= <Value>
|
||||||
|
Add <ScreenSettingAnimationDirection>, set <Value> to "vertical" to draw animation in vertical direction.
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add: Elements for up to 6 players! (Texts and statics!)
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
ScreenSing
|
||||||
|
|
||||||
|
+++++++++
|
||||||
|
Version 7
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<TextMedleyCountdown> !text-position and size will be overwritten by vocaluxe!
|
||||||
|
<StaticExtra$P$N$> Only shown if N$ matches Number of players
|
||||||
|
<TextExtra$P$N$> Only shown if N$ matches Number of players
|
||||||
|
|
||||||
|
+++++++++
|
||||||
|
Version 6
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<TextDuetName1> and <TextDuetName2> (only showed when sining duet)
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 5:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<ButtonSkip>
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
Added Elements for 6-player-singing!
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<StaticAvatarP$N$> (One for each player for each player-number>
|
||||||
|
<TextNameP$N$> (One for each player for each player-number>
|
||||||
|
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<StaticTimeLineExpandedNormal>
|
||||||
|
and
|
||||||
|
<StaticTimeLineExpandedHighlighted>
|
||||||
|
|
||||||
|
The Textures and Colors are used by the expanded time bar.
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SColor>
|
||||||
|
or
|
||||||
|
<SR>, <SG>, <SB>, <SA>
|
||||||
|
to Lyric-Elements.
|
||||||
|
This option set the color of highlighting lyrics.
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
ScreenSong
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 6:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<SongMenuList> to <SongMenu>
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 5:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<ButtonOptionsOpenSelectedItem>
|
||||||
|
Remove:
|
||||||
|
ButtonOptionsOpenPlaylist
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<ButtonJoker[1..6]> (one for each player)
|
||||||
|
<ButtonOptionsRandomMedley>, <ButtonOptionsStartMedley>
|
||||||
|
<SelectSlideOptionsNumMedleySongs>
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<StaticOptionsBG>
|
||||||
|
<TextOptionsTitle>
|
||||||
|
<ButtonOptionsSing>, <ButtonOptionsClose>, <ButtonOptionsPlaylist>, <ButtonOptionsSingAll>, <ButtonOptionsSingAllVisible>, <ButtonOptionsRandom>, <ButtonOptionsRandom>, <ButtonOptionsRandomCategory>, <ButtonOpenOptions>
|
||||||
|
<SelectSlideOptionsMode>, <SelectSlideOptionsPlaylistAdd>, <SelectSlideOptionsPlaylistOpen>
|
||||||
|
and
|
||||||
|
<Playlist> as a new Screen-Element. For details, look at ScreenSong.xml
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<MedleyCalcIcon> and <MedleyTagIcon>
|
||||||
|
to SongMenu
|
||||||
|
|
||||||
|
Add:
|
||||||
|
<StaticMedleyCalcIcon> and <StaticMedleyTagIcon>
|
||||||
|
to SongMenu.SongMenuTileBoard
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
Skin System
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
All Colors in <Colors> (Playercolors and ColorSchemes)
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Added videos:
|
||||||
|
<IntroIn>
|
||||||
|
<IntroMid>
|
||||||
|
<IntroOut>
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<ColorSheme>
|
||||||
|
to
|
||||||
|
<ColorScheme>
|
||||||
|
++++++++++
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
Theme System
|
||||||
|
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 5 (yes it's still 5!):
|
||||||
|
|
||||||
|
Added:
|
||||||
|
<HAlign> to Texts (horizontal align)
|
||||||
|
|
||||||
|
It's optional. Possible values: Top, Center, Bottom (default: Center)
|
||||||
|
It's for downsizing only (if the text-width reaches MaxW).
|
||||||
|
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 5:
|
||||||
|
|
||||||
|
Added:
|
||||||
|
<Outline> outline thickness 0..1
|
||||||
|
<OutlineColorR> outline color red
|
||||||
|
<OutlineColorG> outline color green
|
||||||
|
<OutlineColorB> outline color blue
|
||||||
|
<OutlineColorA> outline color alpha
|
||||||
|
|
||||||
|
to Fonts
|
||||||
|
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 4:
|
||||||
|
|
||||||
|
Added:
|
||||||
|
<TextFont>, <TextMaxW>, <TextStyle>
|
||||||
|
and
|
||||||
|
<SkinSelected>, <SkinArrowLeftSelected>, <SkinArrowRightSelected>, <SkinHighlighted>
|
||||||
|
and
|
||||||
|
<HColor> or <HR>, <HG>, <HB>, <HA>
|
||||||
|
on SelectSlide-Elements
|
||||||
|
|
||||||
|
Added support for Theme-Fonts (optional)
|
||||||
|
|
||||||
|
TextFont: Text font name
|
||||||
|
TextMaxW: Maximum text width for each element
|
||||||
|
HColor: Highlighted Color (selected but not focused)
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 3:
|
||||||
|
|
||||||
|
Added:
|
||||||
|
<SongMenuTileBoard>
|
||||||
|
on SongMenu-Elements
|
||||||
|
|
||||||
|
|
||||||
|
++++++++++
|
||||||
|
Version 2:
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<SelectedColor>
|
||||||
|
to
|
||||||
|
<SColor>
|
||||||
|
on Button-Elements.
|
||||||
|
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<SelectedColor>
|
||||||
|
to
|
||||||
|
<SColor>
|
||||||
|
on SelectSlide-Elements.
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<SelectedR>, <SelectedG>, <SelectedB> and <SelectedA>
|
||||||
|
to
|
||||||
|
<SR>, <SG>, <SB> and <SA>
|
||||||
|
on SelectSlide-Elements.
|
||||||
|
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<ArrowSelectedColor>
|
||||||
|
to
|
||||||
|
<ArrowSColor>
|
||||||
|
on SelectSlide-Elements.
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<ArrowSelectedR>, <ArrowSelectedG>, <ArrowSelectedB> and <ArrowSelectedA>
|
||||||
|
to
|
||||||
|
<ArrowSR>, <ArrowSG>, <ArrowSB> and <ArrowSA>
|
||||||
|
on SelectSlide-Elements.
|
||||||
|
|
||||||
|
|
||||||
|
Changed:
|
||||||
|
<TextSelectedR>, <TextSelectedG>, <TextSelectedB> and <TextSelectedA>
|
||||||
|
to
|
||||||
|
<TextSR>, <TextSG>, <TextSB> and <TextSA>
|
||||||
|
on SelectSlide-Elements.
|
||||||
|
++++++++++
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "dywapitchtrack.h"
|
#include "dywapitchtrack.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <cmath>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h> // for memset
|
#include <string.h> // for memset
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,4 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2013
|
|
||||||
VisualStudioVersion = 12.0.31101.0
|
VisualStudioVersion = 12.0.31101.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
|
||||||
@@ -182,7 +181,9 @@ Global
|
|||||||
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x86.ActiveCfg = Release|Win32
|
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x86.ActiveCfg = Release|Win32
|
||||||
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x86.Build.0 = Release|Win32
|
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x86.Build.0 = Release|Win32
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugLinux|x64.ActiveCfg = Debug|x64
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugLinux|x64.ActiveCfg = Debug|x64
|
||||||
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugLinux|x64.Build.0 = Debug|x64
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugLinux|x86.ActiveCfg = Debug|x86
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugLinux|x86.ActiveCfg = Debug|x86
|
||||||
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugLinux|x86.Build.0 = Debug|x86
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugWin|x64.ActiveCfg = Debug|x64
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugWin|x64.ActiveCfg = Debug|x64
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugWin|x64.Build.0 = Debug|x64
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugWin|x64.Build.0 = Debug|x64
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugWin|x86.ActiveCfg = Debug|x86
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.DebugWin|x86.ActiveCfg = Debug|x86
|
||||||
@@ -192,7 +193,9 @@ Global
|
|||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.InstallerWin|x86.ActiveCfg = Release|x86
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.InstallerWin|x86.ActiveCfg = Release|x86
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.InstallerWin|x86.Build.0 = Release|x86
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.InstallerWin|x86.Build.0 = Release|x86
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseLinux|x64.ActiveCfg = Release|x64
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseLinux|x64.ActiveCfg = Release|x64
|
||||||
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseLinux|x64.Build.0 = Release|x64
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseLinux|x86.ActiveCfg = Release|x86
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseLinux|x86.ActiveCfg = Release|x86
|
||||||
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseLinux|x86.Build.0 = Release|x86
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseWin|x64.ActiveCfg = Release|x64
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseWin|x64.ActiveCfg = Release|x64
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseWin|x64.Build.0 = Release|x64
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseWin|x64.Build.0 = Release|x64
|
||||||
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseWin|x86.ActiveCfg = Release|x86
|
{93356718-3A0B-4784-AAE1-215065BFFC66}.ReleaseWin|x86.ActiveCfg = Release|x86
|
||||||
|
|||||||
@@ -293,24 +293,33 @@ namespace Vocaluxe.Base
|
|||||||
if (!IsPlayingPreview)
|
if (!IsPlayingPreview)
|
||||||
{
|
{
|
||||||
Pause();
|
Pause();
|
||||||
_CurPlayer = _PreviewPlayer;
|
|
||||||
CSound.SetGlobalVolume(CConfig.PreviewMusicVolume);
|
CSound.SetGlobalVolume(CConfig.PreviewMusicVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
_PreviewPlayer.Load(song);
|
_PreviewPlayer.Load(song);
|
||||||
|
|
||||||
float length = _PreviewPlayer.Length;
|
//Change song position only if song is changed or near to end
|
||||||
if (length < 1)
|
if (_CurPlayer.SongID != _PreviewPlayer.SongID && _CurPlayer.Position + 30 < _CurPlayer.Length)
|
||||||
length = 30; // If length is unknow or invalid assume a length of 30s
|
{
|
||||||
|
float length = _PreviewPlayer.Length;
|
||||||
|
if (length < 1)
|
||||||
|
length = 30; // If length is unknow or invalid assume a length of 30s
|
||||||
|
|
||||||
if (start < 0)
|
if (start < 0)
|
||||||
start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime;
|
start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime;
|
||||||
if (start > length - 5f)
|
if (start > length - 5f)
|
||||||
start = Math.Max(0f, Math.Min(length / 4f, length - 5f));
|
start = Math.Max(0f, Math.Min(length / 4f, length - 5f));
|
||||||
if (start >= 0.5f)
|
if (start >= 0.5f)
|
||||||
start -= 0.5f;
|
start -= 0.5f;
|
||||||
|
|
||||||
_PreviewPlayer.Position = start;
|
_PreviewPlayer.Position = start;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_PreviewPlayer.Position = _CurPlayer.Position;
|
||||||
|
}
|
||||||
|
|
||||||
|
_CurPlayer = _PreviewPlayer;
|
||||||
|
|
||||||
Play();
|
Play();
|
||||||
}
|
}
|
||||||
@@ -321,6 +330,11 @@ namespace Vocaluxe.Base
|
|||||||
return;
|
return;
|
||||||
Stop();
|
Stop();
|
||||||
_CurPlayer = _BGPlayer;
|
_CurPlayer = _BGPlayer;
|
||||||
|
if (_MusicSource != EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)
|
||||||
|
{
|
||||||
|
_CurPlayer.Load(CSongs.GetSong(_PreviewPlayer.SongID));
|
||||||
|
_CurPlayer.Position = _PreviewPlayer.Position;
|
||||||
|
}
|
||||||
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
|
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+37
-11
@@ -76,7 +76,7 @@ namespace Vocaluxe.Base
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
[DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)] public ETextureQuality TextureQuality;
|
[DefaultValue(ETextureQuality.TR_CONFIG_TEXTURE_MEDIUM)] public ETextureQuality TextureQuality;
|
||||||
[XmlRanged(32, 1024), DefaultValue(300)] public int CoverSize;
|
[XmlRanged(32, 1024), DefaultValue(256)] public int CoverSize;
|
||||||
|
|
||||||
[DefaultValue(1024)] public int ScreenW;
|
[DefaultValue(1024)] public int ScreenW;
|
||||||
[DefaultValue(576)] public int ScreenH;
|
[DefaultValue(576)] public int ScreenH;
|
||||||
@@ -127,7 +127,9 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
[DefaultValue(CSettings.FallbackLanguage)] public string Language;
|
[DefaultValue(CSettings.FallbackLanguage)] public string Language;
|
||||||
public string[] SongFolder;
|
public string[] SongFolder;
|
||||||
|
// ReSharper disable MemberHidesStaticFromOuterClass
|
||||||
[DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)] public ESongMenu SongMenu;
|
[DefaultValue(ESongMenu.TR_CONFIG_TILE_BOARD)] public ESongMenu SongMenu;
|
||||||
|
// ReSharper restore MemberHidesStaticFromOuterClass
|
||||||
[DefaultValue(ESongSorting.TR_CONFIG_ARTIST)] public ESongSorting SongSorting;
|
[DefaultValue(ESongSorting.TR_CONFIG_ARTIST)] public ESongSorting SongSorting;
|
||||||
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn IgnoreArticles;
|
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn IgnoreArticles;
|
||||||
[DefaultValue(10)] public float ScoreAnimationTime;
|
[DefaultValue(10)] public float ScoreAnimationTime;
|
||||||
@@ -182,15 +184,18 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static SConfig Config;
|
public static SConfig Config;
|
||||||
public static bool LoadOldThemeFiles;
|
public static bool LoadOldThemeFiles;
|
||||||
|
public static event OnSongMenuChanged SongMenuChanged;
|
||||||
|
|
||||||
//Folders
|
//Folders
|
||||||
public static readonly List<string> SongFolders = new List<string>
|
public static readonly List<string> SongFolders = new List<string>
|
||||||
{
|
{
|
||||||
Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
|
#if WIN
|
||||||
|
CSettings.FolderNameSongs
|
||||||
#if INSTALLER
|
#elif INSTALLER
|
||||||
,
|
CSettings.FolderNameSongs,
|
||||||
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
|
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
|
||||||
|
#elif LINUX
|
||||||
|
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -199,11 +204,15 @@ namespace Vocaluxe.Base
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly List<string> ProfileFolders = new List<string>
|
public static readonly List<string> ProfileFolders = new List<string>
|
||||||
{
|
{
|
||||||
#if INSTALLER
|
#if WIN
|
||||||
Path.Combine(Environment.CurrentDirectory, CSettings.FolderNameProfiles),
|
CSettings.FolderNameProfiles
|
||||||
|
#elif INSTALLER
|
||||||
|
CSettings.FolderNameProfiles,
|
||||||
|
Path.Combine(CSettings.DataFolder, CSettings.FolderNameProfiles)
|
||||||
|
#elif LINUX
|
||||||
|
Path.Combine(CSettings.DataFolder, CSettings.FolderNameProfiles)
|
||||||
#endif
|
#endif
|
||||||
Path.Combine(CSettings.DataFolder, CSettings.FolderNameProfiles)
|
};
|
||||||
};
|
|
||||||
|
|
||||||
//Lists to save parameters and values
|
//Lists to save parameters and values
|
||||||
private static readonly List<string> _Params = new List<string>();
|
private static readonly List<string> _Params = new List<string>();
|
||||||
@@ -276,6 +285,19 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ESongMenu SongMenu
|
||||||
|
{
|
||||||
|
get { return Config.Game.SongMenu; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Config.Game.SongMenu == value)
|
||||||
|
return;
|
||||||
|
Config.Game.SongMenu = value;
|
||||||
|
if (SongMenuChanged != null)
|
||||||
|
SongMenuChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
if (_Initialized)
|
if (_Initialized)
|
||||||
@@ -309,11 +331,15 @@ namespace Vocaluxe.Base
|
|||||||
else
|
else
|
||||||
Config = xml.DeserializeString<SConfig>("<root />");
|
Config = xml.DeserializeString<SConfig>("<root />");
|
||||||
|
|
||||||
if (Config.Game.SongFolder.Length > 0)
|
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
|
||||||
{
|
{
|
||||||
SongFolders.Clear();
|
SongFolders.Clear();
|
||||||
SongFolders.AddRange(Config.Game.SongFolder);
|
SongFolders.AddRange(Config.Game.SongFolder);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Config.Game.SongFolder = SongFolders.ToArray();
|
||||||
|
}
|
||||||
if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0)
|
if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0)
|
||||||
Config.Game.ScoreAnimationTime = 1;
|
Config.Game.ScoreAnimationTime = 1;
|
||||||
|
|
||||||
|
|||||||
+11
-1
@@ -88,7 +88,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public ESongMenu GetSongMenuType()
|
public ESongMenu GetSongMenuType()
|
||||||
{
|
{
|
||||||
return CConfig.Config.Game.SongMenu;
|
return CConfig.SongMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EOffOn GetVideosToBackground()
|
public EOffOn GetVideosToBackground()
|
||||||
@@ -155,6 +155,16 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
return CConfig.LoadOldThemeFiles;
|
return CConfig.LoadOldThemeFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddSongMenuListener(OnSongMenuChanged onSongMenuChanged)
|
||||||
|
{
|
||||||
|
CConfig.SongMenuChanged += onSongMenuChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveSongMenuListener(OnSongMenuChanged onSongMenuChanged)
|
||||||
|
{
|
||||||
|
CConfig.SongMenuChanged -= onSongMenuChanged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CBsettings : ISettings
|
class CBsettings : ISettings
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
private static void _CreateFolder(string path)
|
private static void _CreateFolder(string path)
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(path))
|
if (path != "" && !Directory.Exists(path))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace Vocaluxe.Screens
|
|||||||
_SelectSlides[_SelectSlideLanguage].Selection = CLanguage.LanguageId;
|
_SelectSlides[_SelectSlideLanguage].Selection = CLanguage.LanguageId;
|
||||||
|
|
||||||
_SelectSlides[_SelectSlideDebugLevel].SetValues<EDebugLevel>((int)CConfig.Config.Debug.DebugLevel);
|
_SelectSlides[_SelectSlideDebugLevel].SetValues<EDebugLevel>((int)CConfig.Config.Debug.DebugLevel);
|
||||||
_SelectSlides[_SelectSlideSongMenu].SetValues<ESongMenu>((int)CConfig.Config.Game.SongMenu);
|
_SelectSlides[_SelectSlideSongMenu].SetValues<ESongMenu>((int)CConfig.SongMenu);
|
||||||
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
|
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
|
||||||
_SelectSlides[_SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Config.Game.Tabs);
|
_SelectSlides[_SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Config.Game.Tabs);
|
||||||
_SelectSlides[_SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.Config.Game.TimerMode);
|
_SelectSlides[_SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.Config.Game.TimerMode);
|
||||||
@@ -136,7 +136,7 @@ namespace Vocaluxe.Screens
|
|||||||
CLanguage.LanguageId = _SelectSlides[_SelectSlideLanguage].Selection;
|
CLanguage.LanguageId = _SelectSlides[_SelectSlideLanguage].Selection;
|
||||||
CConfig.Config.Game.Language = _SelectSlides[_SelectSlideLanguage].SelectedValue;
|
CConfig.Config.Game.Language = _SelectSlides[_SelectSlideLanguage].SelectedValue;
|
||||||
CConfig.Config.Debug.DebugLevel = (EDebugLevel)_SelectSlides[_SelectSlideDebugLevel].Selection;
|
CConfig.Config.Debug.DebugLevel = (EDebugLevel)_SelectSlides[_SelectSlideDebugLevel].Selection;
|
||||||
CConfig.Config.Game.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection;
|
CConfig.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection;
|
||||||
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
|
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
|
||||||
CConfig.Config.Game.Tabs = (EOffOn)_SelectSlides[_SelectSlideTabs].Selection;
|
CConfig.Config.Game.Tabs = (EOffOn)_SelectSlides[_SelectSlideTabs].Selection;
|
||||||
CConfig.Config.Game.TimerMode = (ETimerMode)_SelectSlides[_SelectSlideTimerMode].Selection;
|
CConfig.Config.Game.TimerMode = (ETimerMode)_SelectSlides[_SelectSlideTimerMode].Selection;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace Vocaluxe.Screens
|
|||||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||||
protected override int _ScreenVersion
|
protected override int _ScreenVersion
|
||||||
{
|
{
|
||||||
get { return 5; }
|
get { return 6; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string _TextCategory = "TextCategory";
|
private const string _TextCategory = "TextCategory";
|
||||||
@@ -146,6 +146,12 @@ namespace Vocaluxe.Screens
|
|||||||
_DragAndDropCover = GetNewStatic();
|
_DragAndDropCover = GetNewStatic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void _OnSongMenuChanged()
|
||||||
|
{
|
||||||
|
base._OnSongMenuChanged();
|
||||||
|
_SongMenu = _SongMenus[_SongMenuName];
|
||||||
|
}
|
||||||
|
|
||||||
public override void LoadTheme(string xmlPath)
|
public override void LoadTheme(string xmlPath)
|
||||||
{
|
{
|
||||||
base.LoadTheme(xmlPath);
|
base.LoadTheme(xmlPath);
|
||||||
@@ -678,7 +684,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
int song = _SongMenu.GetSelectedSongNr();
|
int song = _SongMenu.GetSelectedSongNr();
|
||||||
if (song >= 0 && song < CSongs.VisibleSongs.Count)
|
if (song >= 0 && song < CSongs.VisibleSongs.Count)
|
||||||
selectionText = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
|
selectionText = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title + " ( "+(song+1)+" / "+CSongs.NumAllSongs+" )";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -200,10 +200,10 @@ namespace VocaluxeLib
|
|||||||
public enum ESongMenu
|
public enum ESongMenu
|
||||||
{
|
{
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
//TR_CONFIG_LIST, //a simple list
|
TR_CONFIG_LIST, // list of covers and artist - title
|
||||||
//TR_CONFIG_DREIDEL, //as in ultrastar deluxe
|
//TR_CONFIG_DREIDEL, //as in ultrastar deluxe
|
||||||
TR_CONFIG_TILE_BOARD, //chessboard like
|
TR_CONFIG_TILE_BOARD, //chessboard like
|
||||||
//TR_CONFIG_BOOK //for playlists
|
//TR_CONFIG_BOOK //for playlists
|
||||||
// ReSharper restore InconsistentNaming
|
// ReSharper restore InconsistentNaming
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ using VocaluxeLib.Songs;
|
|||||||
|
|
||||||
namespace VocaluxeLib
|
namespace VocaluxeLib
|
||||||
{
|
{
|
||||||
|
public delegate void OnSongMenuChanged();
|
||||||
|
|
||||||
public interface IConfig
|
public interface IConfig
|
||||||
{
|
{
|
||||||
EOffOn GetSaveModifiedSongs();
|
EOffOn GetSaveModifiedSongs();
|
||||||
@@ -58,6 +60,8 @@ namespace VocaluxeLib
|
|||||||
int GetMaxNumMics();
|
int GetMaxNumMics();
|
||||||
|
|
||||||
bool GetLoadOldThemeFiles();
|
bool GetLoadOldThemeFiles();
|
||||||
|
void AddSongMenuListener(OnSongMenuChanged onSongMenuChanged);
|
||||||
|
void RemoveSongMenuListener(OnSongMenuChanged onSongMenuChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ISettings
|
public interface ISettings
|
||||||
|
|||||||
@@ -89,6 +89,12 @@ namespace VocaluxeLib.Menu
|
|||||||
protected CMenu()
|
protected CMenu()
|
||||||
{
|
{
|
||||||
PartyModeID = -1;
|
PartyModeID = -1;
|
||||||
|
CBase.Config.AddSongMenuListener(_OnSongMenuChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
~CMenu()
|
||||||
|
{
|
||||||
|
CBase.Config.RemoveSongMenuListener(_OnSongMenuChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Init()
|
public override void Init()
|
||||||
@@ -113,6 +119,16 @@ namespace VocaluxeLib.Menu
|
|||||||
_ThemeScreenSettings = null;
|
_ThemeScreenSettings = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void _OnSongMenuChanged()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _SongMenus.Count; i++)
|
||||||
|
{
|
||||||
|
SThemeSongMenu theme = (SThemeSongMenu)_SongMenus[i].GetTheme();
|
||||||
|
_SongMenus[i] = CSongMenuFactory.CreateSongMenu(theme, PartyModeID);
|
||||||
|
_SongMenus[i].LoadSkin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region ThemeHandler
|
#region ThemeHandler
|
||||||
protected override void _ClearElements()
|
protected override void _ClearElements()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ namespace VocaluxeLib.Menu
|
|||||||
_ParentName = _ParentName.Remove(0, 1);
|
_ParentName = _ParentName.Remove(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Count
|
||||||
|
{
|
||||||
|
get { return _Items.Count; }
|
||||||
|
}
|
||||||
|
|
||||||
public T this[int index]
|
public T this[int index]
|
||||||
{
|
{
|
||||||
get { return _Items[index]; }
|
get { return _Items[index]; }
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
{
|
{
|
||||||
switch (CBase.Config.GetSongMenuType())
|
switch (CBase.Config.GetSongMenuType())
|
||||||
{
|
{
|
||||||
//case ESongMenu.TR_CONFIG_LIST:
|
case ESongMenu.TR_CONFIG_LIST:
|
||||||
// _SongMenu = new CSongMenuList();
|
return new CSongMenuList(theme, partyModeID);
|
||||||
// break;
|
|
||||||
|
|
||||||
//case ESongMenu.TR_CONFIG_DREIDEL:
|
//case ESongMenu.TR_CONFIG_DREIDEL:
|
||||||
// _SongMenu = new CSongMenuDreidel();
|
// _SongMenu = new CSongMenuDreidel();
|
||||||
@@ -49,23 +48,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ISongMenu CreateSongMenu(int partyModeID)
|
public static ISongMenu CreateSongMenu(int partyModeID)
|
||||||
{
|
{
|
||||||
switch (CBase.Config.GetSongMenuType())
|
return new CSongMenuTileBoard(partyModeID);
|
||||||
{
|
|
||||||
//case ESongMenu.TR_CONFIG_LIST:
|
|
||||||
// _SongMenu = new CSongMenuList();
|
|
||||||
// break;
|
|
||||||
|
|
||||||
//case ESongMenu.TR_CONFIG_DREIDEL:
|
|
||||||
// _SongMenu = new CSongMenuDreidel();
|
|
||||||
// break;
|
|
||||||
case ESongMenu.TR_CONFIG_TILE_BOARD:
|
|
||||||
return new CSongMenuTileBoard(partyModeID);
|
|
||||||
|
|
||||||
//case ESongMenu.TR_CONFIG_BOOK:
|
|
||||||
// _SongMenu = new CSongMenuBook();
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
throw new ArgumentException("Invalid songmenu type: " + CBase.Config.GetSongMenuType());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,9 +39,41 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
|
|
||||||
//public SThemeSongMenuBook songMenuBook;
|
//public SThemeSongMenuBook songMenuBook;
|
||||||
//public SThemeSongMenuDreidel songMenuDreidel;
|
//public SThemeSongMenuDreidel songMenuDreidel;
|
||||||
//public SThemeSongMenuList songMenuList;
|
public SThemeSongMenuList SongMenuList;
|
||||||
public SThemeSongMenuTileBoard SongMenuTileBoard;
|
public SThemeSongMenuTileBoard SongMenuTileBoard;
|
||||||
}
|
}
|
||||||
|
public struct SThemeSongMenuList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Number of visible songs in list
|
||||||
|
/// </summary>
|
||||||
|
public int ListLength;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Space between tiles horizontal
|
||||||
|
/// </summary>
|
||||||
|
public float SpaceW;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Space between tiles vertical
|
||||||
|
/// </summary>
|
||||||
|
public float SpaceH;
|
||||||
|
|
||||||
|
public SRectF TileRect;
|
||||||
|
public SRectF TileRectSmall;
|
||||||
|
|
||||||
|
public SThemeText TextArtist;
|
||||||
|
public SThemeText TextTitle;
|
||||||
|
public SThemeText TextSongLength;
|
||||||
|
|
||||||
|
public SThemeStatic StaticCoverBig;
|
||||||
|
public SThemeStatic StaticTextBG;
|
||||||
|
public SThemeStatic StaticDuetIcon;
|
||||||
|
public SThemeStatic StaticVideoIcon;
|
||||||
|
public SThemeStatic StaticMedleyCalcIcon;
|
||||||
|
public SThemeStatic StaticMedleyTagIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public struct SThemeSongMenuTileBoard
|
public struct SThemeSongMenuTileBoard
|
||||||
{
|
{
|
||||||
@@ -215,6 +247,24 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuTileBoard/TileRectSmallH", ref _Theme.SongMenuTileBoard.TileRectSmall.H);
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuTileBoard/TileRectSmallH", ref _Theme.SongMenuTileBoard.TileRectSmall.H);
|
||||||
#endregion SongMenuTileBoard
|
#endregion SongMenuTileBoard
|
||||||
|
|
||||||
|
#region SongMenuList
|
||||||
|
ThemeLoaded &= xmlReader.TryGetIntValue(item + "/SongMenuList/ListLength", ref _Theme.SongMenuList.ListLength);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/SpaceW", ref _Theme.SongMenuList.SpaceW);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/SpaceH", ref _Theme.SongMenuList.SpaceH);
|
||||||
|
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRect/X", ref _Theme.SongMenuList.TileRect.X);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRect/Y", ref _Theme.SongMenuList.TileRect.Y);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRect/Z", ref _Theme.SongMenuList.TileRect.Z);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRect/W", ref _Theme.SongMenuList.TileRect.W);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRect/H", ref _Theme.SongMenuList.TileRect.H);
|
||||||
|
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectSmall/X", ref _Theme.SongMenuList.TileRectSmall.X);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectSmall/Y", ref _Theme.SongMenuList.TileRectSmall.Y);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectSmall/Z", ref _Theme.SongMenuList.TileRectSmall.Z);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectSmall/W", ref _Theme.SongMenuList.TileRectSmall.W);
|
||||||
|
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/SongMenuList/TileRectSmall/H", ref _Theme.SongMenuList.TileRectSmall.H);
|
||||||
|
#endregion SongMenuList
|
||||||
|
|
||||||
if (ThemeLoaded)
|
if (ThemeLoaded)
|
||||||
{
|
{
|
||||||
_Theme.Name = elementName;
|
_Theme.Name = elementName;
|
||||||
@@ -239,7 +289,10 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
|
|
||||||
public virtual void OnHide()
|
public virtual void OnHide()
|
||||||
{
|
{
|
||||||
if (CBase.Graphics.GetNextScreenType() != EScreen.Names || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
EScreen check = CBase.Graphics.GetNextScreenType();
|
||||||
|
if (CBase.Graphics.GetNextScreenType() == EScreen.Sing)
|
||||||
|
_ResetPreview(false);
|
||||||
|
else if (CBase.Graphics.GetNextScreenType() != EScreen.Names || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
||||||
_ResetPreview();
|
_ResetPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,7 +309,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
CBase.Drawing.DrawTexture(CBase.BackgroundMusic.GetVideoTexture(), new SRectF(0, 0, 1280, 720, 0));
|
CBase.Drawing.DrawTexture(CBase.BackgroundMusic.GetVideoTexture(), new SRectF(0, 0, 1280, 720, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsMouseOverSelectedSong(SMouseEvent mEvent)
|
public virtual bool IsMouseOverSelectedSong(SMouseEvent mEvent)
|
||||||
{
|
{
|
||||||
CStatic selCov = GetSelectedSongCover();
|
CStatic selCov = GetSelectedSongCover();
|
||||||
return selCov != null && CHelper.IsInBounds(selCov.Rect.Scale(SelectedTileZoomFactor), mEvent);
|
return selCov != null && CHelper.IsInBounds(selCov.Rect.Scale(SelectedTileZoomFactor), mEvent);
|
||||||
|
|||||||
@@ -0,0 +1,686 @@
|
|||||||
|
#region license
|
||||||
|
// This file is part of Vocaluxe.
|
||||||
|
//
|
||||||
|
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Vocaluxe is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using VocaluxeLib.Draw;
|
||||||
|
using VocaluxeLib.PartyModes;
|
||||||
|
using VocaluxeLib.Songs;
|
||||||
|
using VocaluxeLib.Xml;
|
||||||
|
|
||||||
|
namespace VocaluxeLib.Menu.SongMenu
|
||||||
|
{
|
||||||
|
class CSongMenuList : CSongMenuFramework
|
||||||
|
{
|
||||||
|
private SRectF _ScrollRect;
|
||||||
|
private List<CStatic> _Tiles;
|
||||||
|
private List<CText> _Texts;
|
||||||
|
private readonly CStatic _CoverBig;
|
||||||
|
private readonly CStatic _TextBG;
|
||||||
|
private readonly CStatic _DuetIcon;
|
||||||
|
private readonly CStatic _VideoIcon;
|
||||||
|
private readonly CStatic _MedleyCalcIcon;
|
||||||
|
private readonly CStatic _MedleyTagIcon;
|
||||||
|
|
||||||
|
private CTextureRef _CoverBigBGTexture;
|
||||||
|
private CTextureRef _CoverBGTexture;
|
||||||
|
|
||||||
|
private readonly CText _Artist;
|
||||||
|
private readonly CText _Title;
|
||||||
|
private readonly CText _SongLength;
|
||||||
|
|
||||||
|
private float _SpaceW;
|
||||||
|
private float _SpaceH;
|
||||||
|
|
||||||
|
private int _TileW;
|
||||||
|
private int _TileH;
|
||||||
|
|
||||||
|
private int _ListLength;
|
||||||
|
private float _ListTextWidth;
|
||||||
|
|
||||||
|
// Offset is the song or categoryNr of the tile in the left upper corner
|
||||||
|
private int _Offset;
|
||||||
|
|
||||||
|
private float _Length = -1f;
|
||||||
|
private int _LastKnownElements;
|
||||||
|
private int _LastKnownCategory;
|
||||||
|
|
||||||
|
private bool _MouseWasInRect;
|
||||||
|
|
||||||
|
private readonly List<IMenuElement> _SubElements = new List<IMenuElement>();
|
||||||
|
|
||||||
|
public override float SelectedTileZoomFactor
|
||||||
|
{
|
||||||
|
get { return 1.2f; }
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override int _SelectionNr
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
int max = CBase.Songs.IsInCategory() ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
|
||||||
|
base._SelectionNr = value.Clamp(-1, max - 1, true);
|
||||||
|
//Update list in case we scrolled
|
||||||
|
_UpdateList();
|
||||||
|
|
||||||
|
_UpdateTileSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool SmallView
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (SmallView == value)
|
||||||
|
return;
|
||||||
|
base.SmallView = value;
|
||||||
|
_InitTiles();
|
||||||
|
_UpdateList(true);
|
||||||
|
_UpdateTileSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override int _PreviewNr
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == base._PreviewNr)
|
||||||
|
{
|
||||||
|
if (!CBase.BackgroundMusic.IsPlaying() && value != -1)
|
||||||
|
CBase.BackgroundMusic.Play();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
base._PreviewNr = value;
|
||||||
|
_UpdatePreview();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public CSongMenuList(SThemeSongMenu theme, int partyModeID) : base(theme, partyModeID)
|
||||||
|
{
|
||||||
|
_ListLength = _Theme.SongMenuList.ListLength;
|
||||||
|
_SpaceW = _Theme.SongMenuList.SpaceW;
|
||||||
|
_SpaceH = _Theme.SongMenuList.SpaceH;
|
||||||
|
_Artist = new CText(_Theme.SongMenuList.TextArtist, _PartyModeID);
|
||||||
|
_Title = new CText(_Theme.SongMenuList.TextTitle, _PartyModeID);
|
||||||
|
_SongLength = new CText(_Theme.SongMenuList.TextSongLength, _PartyModeID);
|
||||||
|
_CoverBig = new CStatic(_Theme.SongMenuList.StaticCoverBig, _PartyModeID);
|
||||||
|
_TextBG = new CStatic(_Theme.SongMenuList.StaticTextBG, _PartyModeID);
|
||||||
|
_DuetIcon = new CStatic(_Theme.SongMenuList.StaticDuetIcon, _PartyModeID);
|
||||||
|
_VideoIcon = new CStatic(_Theme.SongMenuList.StaticVideoIcon, _PartyModeID);
|
||||||
|
_MedleyCalcIcon = new CStatic(_Theme.SongMenuList.StaticMedleyCalcIcon, _PartyModeID);
|
||||||
|
_MedleyTagIcon = new CStatic(_Theme.SongMenuList.StaticMedleyTagIcon, _PartyModeID);
|
||||||
|
_SubElements.AddRange(new IMenuElement[] {_Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
|
||||||
|
{
|
||||||
|
string item = xmlPath + "/" + elementName;
|
||||||
|
|
||||||
|
bool themeLoaded = true;
|
||||||
|
themeLoaded &= base.LoadTheme(xmlPath, elementName, xmlReader);
|
||||||
|
|
||||||
|
|
||||||
|
themeLoaded &= _Artist.LoadTheme(item + "/SongMenuList", "TextArtist", xmlReader);
|
||||||
|
themeLoaded &= _Title.LoadTheme(item + "/SongMenuList", "TextTitle", xmlReader);
|
||||||
|
themeLoaded &= _SongLength.LoadTheme(item + "/SongMenuList", "TextSongLength", xmlReader);
|
||||||
|
|
||||||
|
themeLoaded &= _CoverBig.LoadTheme(item + "/SongMenuList", "StaticCoverBig", xmlReader);
|
||||||
|
themeLoaded &= _TextBG.LoadTheme(item + "/SongMenuList", "StaticTextBG", xmlReader);
|
||||||
|
themeLoaded &= _DuetIcon.LoadTheme(item + "/SongMenuList", "StaticDuetIcon", xmlReader);
|
||||||
|
themeLoaded &= _VideoIcon.LoadTheme(item + "/SongMenuList", "StaticVideoIcon", xmlReader);
|
||||||
|
themeLoaded &= _MedleyCalcIcon.LoadTheme(item + "/SongMenuList", "StaticMedleyCalcIcon", xmlReader);
|
||||||
|
themeLoaded &= _MedleyTagIcon.LoadTheme(item + "/SongMenuList", "StaticMedleyTagIcon", xmlReader);
|
||||||
|
|
||||||
|
if (themeLoaded)
|
||||||
|
{
|
||||||
|
_Theme.Name = elementName;
|
||||||
|
|
||||||
|
_ReadSubTheme();
|
||||||
|
_SubElements.Clear();
|
||||||
|
_SubElements.AddRange(new IMenuElement[] { _Artist, _Title, _SongLength, _DuetIcon, _VideoIcon, _MedleyCalcIcon, _MedleyTagIcon });
|
||||||
|
LoadSkin();
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
return themeLoaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _ReadSubTheme()
|
||||||
|
{
|
||||||
|
_Theme.SongMenuList.TextArtist = (SThemeText)_Artist.GetTheme();
|
||||||
|
_Theme.SongMenuList.TextSongLength = (SThemeText)_SongLength.GetTheme();
|
||||||
|
_Theme.SongMenuList.TextTitle = (SThemeText)_Title.GetTheme();
|
||||||
|
_Theme.SongMenuList.StaticCoverBig = (SThemeStatic)_CoverBig.GetTheme();
|
||||||
|
_Theme.SongMenuList.StaticDuetIcon = (SThemeStatic)_DuetIcon.GetTheme();
|
||||||
|
_Theme.SongMenuList.StaticMedleyCalcIcon = (SThemeStatic)_MedleyCalcIcon.GetTheme();
|
||||||
|
_Theme.SongMenuList.StaticMedleyTagIcon = (SThemeStatic)_MedleyTagIcon.GetTheme();
|
||||||
|
_Theme.SongMenuList.StaticTextBG = (SThemeStatic)_TextBG.GetTheme();
|
||||||
|
_Theme.SongMenuList.StaticVideoIcon = (SThemeStatic)_VideoIcon.GetTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override object GetTheme()
|
||||||
|
{
|
||||||
|
_ReadSubTheme();
|
||||||
|
return base.GetTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Init()
|
||||||
|
{
|
||||||
|
base.Init();
|
||||||
|
|
||||||
|
_PreviewNr = -1;
|
||||||
|
_InitTiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _InitTiles()
|
||||||
|
{
|
||||||
|
MaxRect = SmallView ? _Theme.SongMenuList.TileRectSmall : _Theme.SongMenuList.TileRect;
|
||||||
|
|
||||||
|
_ListTextWidth = MaxRect.W - _ListTextWidth;
|
||||||
|
|
||||||
|
_TileW = (int)((MaxRect.H - _SpaceH * (_ListLength - 1)) / _ListLength);
|
||||||
|
_TileH = _TileW;
|
||||||
|
|
||||||
|
_CoverBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBackground, _PartyModeID);
|
||||||
|
_CoverBigBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBigBackground, _PartyModeID);
|
||||||
|
|
||||||
|
//Create cover tiles
|
||||||
|
_Tiles = new List<CStatic>();
|
||||||
|
_Texts = new List<CText>();
|
||||||
|
|
||||||
|
for (int i = 0; i < _ListLength; i++)
|
||||||
|
{
|
||||||
|
//Create Cover
|
||||||
|
var rect = new SRectF(Rect.X + (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
||||||
|
var tile = new CStatic(_PartyModeID, _CoverBGTexture, _Color, rect);
|
||||||
|
_Tiles.Add(tile);
|
||||||
|
|
||||||
|
//Create text
|
||||||
|
var textRect = new SRectF(MaxRect.X + 2 * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z);
|
||||||
|
CText text = new CText(textRect.X, textRect.Y, textRect.Z,
|
||||||
|
textRect.H, textRect.W, EAlignment.Left, EStyle.Normal,
|
||||||
|
"Normal", _Artist.Color, "");
|
||||||
|
text.MaxRect = new SRectF(text.MaxRect.X, text.MaxRect.Y, MaxRect.W + MaxRect.X - text.Rect.X - 5f, text.MaxRect.H, text.MaxRect.Z);
|
||||||
|
text.ResizeAlign = EHAlignment.Center;
|
||||||
|
|
||||||
|
_Texts.Add(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
_ScrollRect = CBase.Settings.GetRenderRect();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _UpdateTileSelection()
|
||||||
|
{
|
||||||
|
foreach (CStatic tile in _Tiles)
|
||||||
|
tile.Selected = false;
|
||||||
|
|
||||||
|
int tileNr = _SelectionNr - _Offset;
|
||||||
|
if (tileNr >= 0 && tileNr < _Tiles.Count)
|
||||||
|
_Tiles[tileNr].Selected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Update(SScreenSongOptions songOptions)
|
||||||
|
{
|
||||||
|
if (songOptions.Selection.RandomOnly)
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
|
||||||
|
if (_Length < 0 && CBase.Songs.IsInCategory() && CBase.BackgroundMusic.GetLength() > 0)
|
||||||
|
_UpdateLength(CBase.Songs.GetVisibleSong(_PreviewNr));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _UpdatePreview()
|
||||||
|
{
|
||||||
|
//First hide everything so we just have to set what we actually want
|
||||||
|
_CoverBig.Texture = _CoverBigBGTexture;
|
||||||
|
_Artist.Text = String.Empty;
|
||||||
|
_Title.Text = String.Empty;
|
||||||
|
_SongLength.Text = String.Empty;
|
||||||
|
_DuetIcon.Visible = false;
|
||||||
|
_VideoIcon.Visible = false;
|
||||||
|
_MedleyCalcIcon.Visible = false;
|
||||||
|
_MedleyTagIcon.Visible = false;
|
||||||
|
_Length = -1f;
|
||||||
|
|
||||||
|
//Check if nothing is selected (for preview)
|
||||||
|
if (_PreviewNr < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (CBase.Songs.IsInCategory())
|
||||||
|
{
|
||||||
|
CSong song = CBase.Songs.GetVisibleSong(_PreviewNr);
|
||||||
|
//Check if we have a valid song (song still visible, index >=0 etc is checked by framework)
|
||||||
|
if (song == null)
|
||||||
|
{
|
||||||
|
//Display at least the category
|
||||||
|
CCategory category = CBase.Songs.GetCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||||
|
//Check if we have a valid category
|
||||||
|
if (category == null)
|
||||||
|
return;
|
||||||
|
_CoverBig.Texture = category.CoverTextureBig;
|
||||||
|
_Artist.Text = category.Name;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_CoverBig.Texture = song.CoverTextureBig;
|
||||||
|
_Artist.Text = song.Artist;
|
||||||
|
_Title.Text = song.Title;
|
||||||
|
_DuetIcon.Visible = song.IsDuet;
|
||||||
|
_VideoIcon.Visible = song.VideoFileName != "";
|
||||||
|
_MedleyCalcIcon.Visible = song.Medley.Source == EDataSource.Calculated;
|
||||||
|
_MedleyTagIcon.Visible = song.Medley.Source == EDataSource.Tag;
|
||||||
|
|
||||||
|
_UpdateLength(song);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CCategory category = CBase.Songs.GetCategory(_PreviewNr);
|
||||||
|
//Check if we have a valid category
|
||||||
|
if (category == null)
|
||||||
|
return;
|
||||||
|
_CoverBig.Texture = category.CoverTextureBig;
|
||||||
|
_Artist.Text = category.Name;
|
||||||
|
|
||||||
|
int num = category.GetNumSongsNotSung();
|
||||||
|
String songOrSongs = (num == 1) ? "TR_SCREENSONG_NUMSONG" : "TR_SCREENSONG_NUMSONGS";
|
||||||
|
_Title.Text = CBase.Language.Translate(songOrSongs).Replace("%v", num.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _UpdateLength(CSong song)
|
||||||
|
{
|
||||||
|
if (song == null)
|
||||||
|
return;
|
||||||
|
float time = CBase.BackgroundMusic.GetLength();
|
||||||
|
if (Math.Abs(song.Finish) > 0.001)
|
||||||
|
time = song.Finish;
|
||||||
|
|
||||||
|
// The audiobackend is ready to return the length
|
||||||
|
if (time > 0)
|
||||||
|
{
|
||||||
|
time -= song.Start;
|
||||||
|
var min = (int)Math.Floor(time / 60f);
|
||||||
|
var sec = (int)(time - min * 60f);
|
||||||
|
_SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
|
||||||
|
_Length = time;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_SongLength.Text = "...";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnShow()
|
||||||
|
{
|
||||||
|
_LastKnownElements = -1; //Force refresh of list
|
||||||
|
if (!CBase.Songs.IsInCategory())
|
||||||
|
{
|
||||||
|
if ((CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Songs.GetNumCategories() > 0) || CBase.Songs.GetNumCategories() == 1)
|
||||||
|
_EnterCategory(0);
|
||||||
|
}
|
||||||
|
if (CBase.Songs.IsInCategory())
|
||||||
|
SetSelectedSong(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||||
|
else
|
||||||
|
SetSelectedCategory(_SelectionNr < 0 ? 0 : _SelectionNr);
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
_UpdateListIfRequired();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HandleInput(ref SKeyEvent keyEvent, SScreenSongOptions options)
|
||||||
|
{
|
||||||
|
if (keyEvent.KeyPressed)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
bool moveAllowed = !options.Selection.RandomOnly || (options.Selection.CategoryChangeAllowed && !CBase.Songs.IsInCategory());
|
||||||
|
bool catChangePossible = CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && options.Selection.CategoryChangeAllowed;
|
||||||
|
|
||||||
|
//If nothing selected set a reasonable default value
|
||||||
|
if (keyEvent.IsArrowKey() && moveAllowed && _SelectionNr < 0)
|
||||||
|
_SelectionNr = (_PreviewNr < 0) ? _Offset : _PreviewNr;
|
||||||
|
|
||||||
|
switch (keyEvent.Key)
|
||||||
|
{
|
||||||
|
case Keys.Enter:
|
||||||
|
if (CBase.Songs.IsInCategory())
|
||||||
|
{
|
||||||
|
if (_SelectionNr >= 0 && _PreviewNr != _SelectionNr)
|
||||||
|
{
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_EnterCategory(_PreviewNr);
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Escape:
|
||||||
|
case Keys.Back:
|
||||||
|
if (CBase.Songs.IsInCategory() && catChangePossible)
|
||||||
|
{
|
||||||
|
_LeaveCategory();
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.PageUp:
|
||||||
|
if (catChangePossible)
|
||||||
|
{
|
||||||
|
_PrevCategory();
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.PageDown:
|
||||||
|
if (catChangePossible)
|
||||||
|
{
|
||||||
|
_NextCategory();
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Left:
|
||||||
|
//Check for >0 so we do not allow selection of nothing (-1)
|
||||||
|
if (_SelectionNr > 0 && moveAllowed)
|
||||||
|
{
|
||||||
|
_SelectionNr--;
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Right:
|
||||||
|
if (moveAllowed)
|
||||||
|
{
|
||||||
|
_SelectionNr++;
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Up:
|
||||||
|
if (keyEvent.ModShift)
|
||||||
|
{
|
||||||
|
if (catChangePossible)
|
||||||
|
{
|
||||||
|
_PrevCategory();
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (_SelectionNr >= 1 && moveAllowed)
|
||||||
|
{
|
||||||
|
_SelectionNr -= 1;
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Down:
|
||||||
|
if (keyEvent.ModShift)
|
||||||
|
{
|
||||||
|
if (catChangePossible)
|
||||||
|
{
|
||||||
|
_NextCategory();
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (moveAllowed)
|
||||||
|
{
|
||||||
|
_SelectionNr += 1;
|
||||||
|
keyEvent.Handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!CBase.Songs.IsInCategory())
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
return keyEvent.Handled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HandleMouse(ref SMouseEvent mouseEvent, SScreenSongOptions songOptions)
|
||||||
|
{
|
||||||
|
if (!songOptions.Selection.RandomOnly || (!CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed))
|
||||||
|
{
|
||||||
|
if (mouseEvent.Wheel != 0 && CHelper.IsInBounds(_ScrollRect, mouseEvent))
|
||||||
|
_UpdateList(_Offset + mouseEvent.Wheel);
|
||||||
|
|
||||||
|
int lastSelection = _SelectionNr;
|
||||||
|
int i = 0;
|
||||||
|
bool somethingSelected = false;
|
||||||
|
|
||||||
|
foreach (CStatic tile in _Tiles)
|
||||||
|
{
|
||||||
|
//create a rect including the cover and text of the song.
|
||||||
|
//(this way mouse over text should make a selection as well)
|
||||||
|
SRectF songRect = new SRectF(tile.Rect.X, tile.Rect.Y, Rect.W, tile.Rect.H, tile.Rect.Z);
|
||||||
|
if (tile.Texture != _CoverBGTexture && CHelper.IsInBounds(songRect, mouseEvent) && tile.Color.A != 0)
|
||||||
|
{
|
||||||
|
somethingSelected = true;
|
||||||
|
_SelectionNr = i + _Offset;
|
||||||
|
if (!CBase.Songs.IsInCategory())
|
||||||
|
_PreviewNr = i + _Offset;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
//Reset selection only if we moved out of the rect to avoid loosing it when selecting random songs
|
||||||
|
if (_MouseWasInRect && !somethingSelected)
|
||||||
|
_SelectionNr = -1;
|
||||||
|
if (mouseEvent.Sender == ESender.WiiMote && _SelectionNr != lastSelection && _SelectionNr != -1)
|
||||||
|
CBase.Controller.SetRumble(0.050f);
|
||||||
|
}
|
||||||
|
_MouseWasInRect = CHelper.IsInBounds(Rect, mouseEvent);
|
||||||
|
|
||||||
|
if (mouseEvent.RB)
|
||||||
|
{
|
||||||
|
if (CBase.Songs.IsInCategory() && CBase.Songs.GetNumCategories() > 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON &&
|
||||||
|
songOptions.Selection.CategoryChangeAllowed)
|
||||||
|
{
|
||||||
|
_LeaveCategory();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !songOptions.Selection.PartyMode)
|
||||||
|
{
|
||||||
|
CBase.Graphics.FadeTo(EScreen.Main);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (mouseEvent.LB)
|
||||||
|
{
|
||||||
|
if (_SelectionNr >= 0 && _MouseWasInRect)
|
||||||
|
{
|
||||||
|
if (CBase.Songs.IsInCategory())
|
||||||
|
{
|
||||||
|
if (_PreviewNr == _SelectionNr)
|
||||||
|
return false;
|
||||||
|
_PreviewNr = _SelectionNr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
EnterSelectedCategory();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Draw()
|
||||||
|
{
|
||||||
|
foreach (CStatic tile in _Tiles)
|
||||||
|
{
|
||||||
|
if (tile.Selected)
|
||||||
|
tile.Draw(EAspect.Crop, SelectedTileZoomFactor, -0.1f);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EAspect aspect = (tile.Texture != _CoverBGTexture) ? EAspect.Crop : EAspect.Stretch;
|
||||||
|
tile.Draw(aspect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//highlight the text of the selected song
|
||||||
|
int i = 0;
|
||||||
|
foreach (CText text in _Texts)
|
||||||
|
{
|
||||||
|
if (i < _Tiles.Count && _Tiles[i].Selected)
|
||||||
|
text.Font.Style = EStyle.BoldItalic;
|
||||||
|
else if (i < _Tiles.Count)
|
||||||
|
text.Font.Style = EStyle.Normal;
|
||||||
|
else
|
||||||
|
text.Text = "";
|
||||||
|
text.Draw();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
_TextBG.Draw();
|
||||||
|
|
||||||
|
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||||
|
|
||||||
|
if (vidtex != null)
|
||||||
|
{
|
||||||
|
if (vidtex.Color.A < 1)
|
||||||
|
_CoverBig.Draw(EAspect.Crop);
|
||||||
|
SRectF rect = CHelper.FitInBounds(_CoverBig.Rect, vidtex.OrigAspect, EAspect.Crop);
|
||||||
|
CBase.Drawing.DrawTexture(vidtex, rect, vidtex.Color, _CoverBig.Rect);
|
||||||
|
CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.Rect, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_CoverBig.Draw(EAspect.Crop);
|
||||||
|
|
||||||
|
foreach (IMenuElement element in _SubElements)
|
||||||
|
element.Draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override CStatic GetSelectedSongCover()
|
||||||
|
{
|
||||||
|
return _Tiles.FirstOrDefault(tile => tile.Selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool IsMouseOverSelectedSong(SMouseEvent mEvent)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _Tiles.Count; i++)
|
||||||
|
{
|
||||||
|
if (!_Tiles[i].Selected)
|
||||||
|
continue;
|
||||||
|
return CHelper.IsInBounds(_Tiles[i].Rect, mEvent) || CHelper.IsInBounds(_Texts[i].Rect, mEvent);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void _EnterCategory(int categoryNr)
|
||||||
|
{
|
||||||
|
base._EnterCategory(categoryNr);
|
||||||
|
|
||||||
|
SetSelectedSong(0);
|
||||||
|
_UpdateListIfRequired();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void _LeaveCategory()
|
||||||
|
{
|
||||||
|
base._LeaveCategory();
|
||||||
|
|
||||||
|
SetSelectedCategory(0);
|
||||||
|
_UpdateListIfRequired();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _NextCategory()
|
||||||
|
{
|
||||||
|
if (CBase.Songs.IsInCategory())
|
||||||
|
{
|
||||||
|
CBase.Songs.NextCategory();
|
||||||
|
_EnterCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _PrevCategory()
|
||||||
|
{
|
||||||
|
if (CBase.Songs.IsInCategory())
|
||||||
|
{
|
||||||
|
CBase.Songs.PrevCategory();
|
||||||
|
_EnterCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _UpdateListIfRequired()
|
||||||
|
{
|
||||||
|
int curElements = CBase.Songs.IsInCategory() ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
|
||||||
|
if ((_LastKnownElements == curElements) && (_LastKnownCategory == CBase.Songs.GetCurrentCategoryIndex()))
|
||||||
|
return;
|
||||||
|
|
||||||
|
_LastKnownCategory = CBase.Songs.GetCurrentCategoryIndex();
|
||||||
|
_LastKnownElements = curElements;
|
||||||
|
CBase.Songs.UpdateRandomSongList();
|
||||||
|
_UpdateList(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _UpdateList(bool force = false)
|
||||||
|
{
|
||||||
|
int offset;
|
||||||
|
if (_SelectionNr < _Offset && _SelectionNr >= 0)
|
||||||
|
offset = _SelectionNr;
|
||||||
|
else if (_SelectionNr >= _Offset + _ListLength)
|
||||||
|
offset = _SelectionNr - _ListLength + 1;
|
||||||
|
else
|
||||||
|
offset = _Offset;
|
||||||
|
_UpdateList(offset, force);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _UpdateList(int offset, bool force = false)
|
||||||
|
{
|
||||||
|
bool isInCategory = CBase.Songs.IsInCategory();
|
||||||
|
int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
|
||||||
|
int totalSongNumber = CBase.Songs.GetNumSongs();
|
||||||
|
|
||||||
|
offset = offset.Clamp(0, itemCount - _ListLength, true);
|
||||||
|
|
||||||
|
if (offset == _Offset && !force)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int i = 0; i < _Tiles.Count; i++)
|
||||||
|
{
|
||||||
|
if (i + offset < itemCount)
|
||||||
|
{
|
||||||
|
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||||
|
if (isInCategory)
|
||||||
|
{
|
||||||
|
CSong currentSong = CBase.Songs.GetVisibleSong(i + offset);
|
||||||
|
_Tiles[i].Texture = currentSong.CoverTextureSmall;
|
||||||
|
_Texts[i].Text = currentSong.Artist + " - " + currentSong.Title;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CCategory currentCat = CBase.Songs.GetCategory(i + offset);
|
||||||
|
_Tiles[i].Texture = currentCat.CoverTextureSmall;
|
||||||
|
int num = currentCat.GetNumSongsNotSung();
|
||||||
|
String songOrSongs = (num == 1) ? "TR_SCREENSONG_NUMSONG" : "TR_SCREENSONG_NUMSONGS";
|
||||||
|
_Texts[i].Text = currentCat.Name + " " + CBase.Language.Translate(songOrSongs).Replace("%v", num.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Tiles[i].Color.A = 0;
|
||||||
|
_Texts[i].Text = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_Offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadSkin()
|
||||||
|
{
|
||||||
|
foreach (IThemeable themeable in _SubElements.OfType<IThemeable>())
|
||||||
|
themeable.LoadSkin();
|
||||||
|
// Those are drawn seperately so they are not in the above list
|
||||||
|
_CoverBig.LoadSkin();
|
||||||
|
_TextBG.LoadSkin();
|
||||||
|
|
||||||
|
base.LoadSkin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
<Compile Include="Enums.cs" />
|
<Compile Include="Enums.cs" />
|
||||||
<Compile Include="Menu\IMenu.cs" />
|
<Compile Include="Menu\IMenu.cs" />
|
||||||
<Compile Include="Menu\IMenuElement.cs" />
|
<Compile Include="Menu\IMenuElement.cs" />
|
||||||
|
<Compile Include="Menu\SongMenu\CSongMenuList.cs" />
|
||||||
<Compile Include="Profile\CAvatar.cs" />
|
<Compile Include="Profile\CAvatar.cs" />
|
||||||
<Compile Include="Profile\CProfile.cs" />
|
<Compile Include="Profile\CProfile.cs" />
|
||||||
<Compile Include="Songs\CLineBase.cs" />
|
<Compile Include="Songs\CLineBase.cs" />
|
||||||
|
|||||||
Reference in new issue
Block a user