Show rating bar in singscreen
This commit is contained in:
1 parent
ce4c3db025
commit
cb4dfdabba
9 files changed
+293
-15
No files matched your search
@@ -1,5 +1,11 @@
|
||||
ScreenSing
|
||||
|
||||
+++++++++
|
||||
Version 9
|
||||
|
||||
Add:
|
||||
<StaticRatingBar$P$N$>
|
||||
|
||||
+++++++++
|
||||
Version 8
|
||||
|
||||
|
||||
@@ -316,6 +316,7 @@
|
||||
<VolUp>VolUp.png</VolUp>
|
||||
<VolDown>VolDown.png</VolDown>
|
||||
<Random>RandomIcon.png</Random>
|
||||
<RatingBar>RatingBar.png</RatingBar>
|
||||
<PopupBG>PopupBG.png</PopupBG>
|
||||
<ScrollUp>ScrollUp.png</ScrollUp>
|
||||
<ScrollDown>ScrollDown.png</ScrollDown>
|
||||
@@ -331,4 +332,4 @@
|
||||
<IntroMid>IntroMid.mp4</IntroMid>
|
||||
<IntroOut>IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
@@ -316,6 +316,7 @@
|
||||
<VolUp>VolUp.png</VolUp>
|
||||
<VolDown>VolDown.png</VolDown>
|
||||
<Random>RandomIcon.png</Random>
|
||||
<RatingBar>RatingBar.png</RatingBar>
|
||||
<PopupBG>PopupBG.png</PopupBG>
|
||||
<ScrollUp>ScrollUp.png</ScrollUp>
|
||||
<ScrollDown>ScrollDown.png</ScrollDown>
|
||||
@@ -331,4 +332,4 @@
|
||||
<IntroMid>IntroMid.mp4</IntroMid>
|
||||
<IntroOut>IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
@@ -316,6 +316,7 @@
|
||||
<VolUp>VolUp.png</VolUp>
|
||||
<VolDown>VolDown.png</VolDown>
|
||||
<Random>RandomIcon.png</Random>
|
||||
<RatingBar>RatingBar.png</RatingBar>
|
||||
<PopupBG>PopupBG.png</PopupBG>
|
||||
<ScrollUp>ScrollUp.png</ScrollUp>
|
||||
<ScrollDown>ScrollDown.png</ScrollDown>
|
||||
@@ -331,4 +332,4 @@
|
||||
<IntroMid>IntroMid.mp4</IntroMid>
|
||||
<IntroOut>IntroOut.mp4</IntroOut>
|
||||
</Videos>
|
||||
</root>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
@@ -2,7 +2,7 @@
|
||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Informations>
|
||||
<ScreenName>ScreenSing</ScreenName>
|
||||
<ScreenVersion>8</ScreenVersion>
|
||||
<ScreenVersion>9</ScreenVersion>
|
||||
</Informations>
|
||||
<Backgrounds>
|
||||
<Background Name="Background1">
|
||||
@@ -174,6 +174,17 @@
|
||||
<H>50</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP1N1">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1085</X>
|
||||
<Y>410</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP1N1">
|
||||
<Skin/>
|
||||
@@ -196,6 +207,17 @@
|
||||
<H>50</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP1N2">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1085</X>
|
||||
<Y>170</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP1N2">
|
||||
<Skin/>
|
||||
@@ -218,6 +240,17 @@
|
||||
<H>50</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP2N2">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1085</X>
|
||||
<Y>430</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP2N2">
|
||||
<Skin/>
|
||||
@@ -241,6 +274,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP1N3">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1155</X>
|
||||
<Y>135</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP1N3">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -263,6 +307,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP2N3">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1155</X>
|
||||
<Y>305</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP2N3">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -285,6 +340,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP3N3">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1155</X>
|
||||
<Y>475</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP3N3">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -307,6 +373,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP1N4">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>471</X>
|
||||
<Y>170</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP1N4">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -329,6 +406,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP2N4">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>471</X>
|
||||
<Y>430</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP2N4">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -344,13 +432,24 @@
|
||||
<Skin/>
|
||||
<Color Name="Invisible" />
|
||||
<Rect>
|
||||
<X>1150</X>
|
||||
<X>1085</X>
|
||||
<Y>150</Y>
|
||||
<W>100</W>
|
||||
<H>50</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP3N4">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1105</X>
|
||||
<Y>170</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP3N4">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -373,6 +472,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP4N4">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1105</X>
|
||||
<Y>430</Y>
|
||||
<W>160</W>
|
||||
<H>10</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP4N4">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -395,6 +505,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP1N5">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>540</X>
|
||||
<Y>135</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP1N5">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -417,6 +538,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP2N5">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>540</X>
|
||||
<Y>305</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP2N5">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -439,6 +571,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP3N5">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>540</X>
|
||||
<Y>475</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP3N5">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -461,6 +604,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP4N5">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1175</X>
|
||||
<Y>135</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP4N5">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -483,6 +637,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP5N5">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1175</X>
|
||||
<Y>305</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP5N5">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -505,6 +670,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP1N6">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>540</X>
|
||||
<Y>135</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP1N6">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -527,6 +703,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP2N6">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>540</X>
|
||||
<Y>305</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP2N6">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -549,6 +736,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP3N6">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>540</X>
|
||||
<Y>475</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP3N6">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -571,6 +769,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP4N6">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1175</X>
|
||||
<Y>135</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP4N6">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -593,6 +802,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP5N6">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1175</X>
|
||||
<Y>305</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP5N6">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
@@ -615,6 +835,17 @@
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticRatingBarP6N6">
|
||||
<Skin>RatingBar</Skin>
|
||||
<Color Name="Visible" />
|
||||
<Rect>
|
||||
<X>1175</X>
|
||||
<Y>475</Y>
|
||||
<W>85</W>
|
||||
<H>7</H>
|
||||
<Z>-0.75</Z>
|
||||
</Rect>
|
||||
</Static>
|
||||
<Static Name="StaticAvatarP6N6">
|
||||
<Skin/>
|
||||
<Color Name="StaticAvatarColor" />
|
||||
|
||||
@@ -367,9 +367,9 @@ namespace Vocaluxe.Base
|
||||
Players[p].SungLines[line].BonusPoints += points;
|
||||
|
||||
//Calculate rating
|
||||
double stretchFactor = 0.2;
|
||||
//Shift fraction of correct sung notes to [-0.1, 0.1], player needs to sing five lines fully correctly to get highest ranking
|
||||
double current = Players[p].SungLines[line].Points / (double)lines[line].Points;
|
||||
Players[p].Rating = (Players[p].Rating + (current * stretchFactor - 0.1)).Clamp(0, 1);
|
||||
Players[p].Rating = (Players[p].Rating + (current * 0.2 - 0.1)).Clamp(0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Vocaluxe.Screens
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 8; }
|
||||
get { return 9; }
|
||||
}
|
||||
|
||||
private struct STimeRect
|
||||
@@ -73,6 +73,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private string[,] _StaticScores;
|
||||
private string[,] _StaticAvatars;
|
||||
private string[,] _StaticRatingBars;
|
||||
|
||||
private const string _ButtonCancel = "ButtonCancel";
|
||||
private const string _ButtonContinue = "ButtonContinue";
|
||||
@@ -303,12 +304,14 @@ namespace Vocaluxe.Screens
|
||||
|
||||
_UpdateSongText();
|
||||
_UpdateDuetNames();
|
||||
|
||||
if (_FadeOut)
|
||||
return true;
|
||||
|
||||
_UpdateTimeLine();
|
||||
|
||||
CGame.UpdatePoints(_CurrentTime);
|
||||
_UpdateRatingBars();
|
||||
_UpdateLyrics();
|
||||
if (CGame.GameMode == EGameMode.TR_GAMEMODE_MEDLEY)
|
||||
_UpdateMedleyCountdown();
|
||||
@@ -783,6 +786,7 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void _TogglePause()
|
||||
{
|
||||
_SetPause(!_Pause);
|
||||
@@ -826,8 +830,9 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private void _BuildStaticStrings(ref List<string> statics)
|
||||
{
|
||||
_StaticScores = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
|
||||
_StaticAvatars = new string[CSettings.MaxNumPlayer,CSettings.MaxNumPlayer];
|
||||
_StaticScores = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||
_StaticAvatars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||
_StaticRatingBars = new string[CSettings.MaxNumPlayer, CSettings.MaxNumPlayer];
|
||||
|
||||
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
|
||||
{
|
||||
@@ -838,9 +843,11 @@ namespace Vocaluxe.Screens
|
||||
string target = "P" + (player + 1) + "N" + (numplayer + 1);
|
||||
_StaticScores[player, numplayer] = "StaticScore" + target;
|
||||
_StaticAvatars[player, numplayer] = "StaticAvatar" + target;
|
||||
_StaticRatingBars[player, numplayer] = "StaticRatingBar" + target;
|
||||
|
||||
statics.Add(_StaticScores[player, numplayer]);
|
||||
statics.Add(_StaticAvatars[player, numplayer]);
|
||||
statics.Add(_StaticRatingBars[player, numplayer]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -890,15 +897,16 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
for (int player = 0; player < CSettings.MaxNumPlayer && player <= numplayer; player++)
|
||||
{
|
||||
bool isIvisible = numplayer + 1 == CGame.NumPlayers && player <= CGame.NumPlayers;
|
||||
_Texts[_TextScores[player, numplayer]].Visible = isIvisible;
|
||||
_Texts[_TextNames[player, numplayer]].Visible = isIvisible &&
|
||||
bool isVisible = numplayer + 1 == CGame.NumPlayers && player <= CGame.NumPlayers;
|
||||
_Texts[_TextScores[player, numplayer]].Visible = isVisible;
|
||||
_Texts[_TextNames[player, numplayer]].Visible = isVisible &&
|
||||
(CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH ||
|
||||
CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_NAME);
|
||||
_Statics[_StaticScores[player, numplayer]].Visible = isIvisible;
|
||||
_Statics[_StaticAvatars[player, numplayer]].Visible = isIvisible &&
|
||||
_Statics[_StaticScores[player, numplayer]].Visible = isVisible;
|
||||
_Statics[_StaticAvatars[player, numplayer]].Visible = isVisible &&
|
||||
(CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH ||
|
||||
CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR);
|
||||
_Statics[_StaticRatingBars[player, numplayer]].Visible = isVisible;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1371,5 +1379,13 @@ namespace Vocaluxe.Screens
|
||||
_Texts[_TextNames[i, CGame.NumPlayers - 1]].Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void _UpdateRatingBars()
|
||||
{
|
||||
for (int i = 0; i < CGame.NumPlayers; i++)
|
||||
{
|
||||
_Statics[_StaticRatingBars[i, CGame.NumPlayers - 1]].ModW = _Statics[_StaticRatingBars[i, CGame.NumPlayers - 1]].Rect.W * (float)CGame.Players[i].Rating;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,15 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public EAspect Aspect = EAspect.Stretch;
|
||||
|
||||
/// <summary>
|
||||
/// Adjust this value if you want to draw only a part of your texture, width
|
||||
/// </summary>
|
||||
public float ModW = -1f;
|
||||
/// <summary>
|
||||
/// Adjust this value if you want to draw only a part of your texture, height
|
||||
/// </summary>
|
||||
public float ModH = -1f;
|
||||
|
||||
public CStatic(int partyModeID)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
@@ -168,8 +177,21 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
CTextureRef texture = Texture;
|
||||
SRectF bounds = Rect.Scale(scale);
|
||||
|
||||
//Change bounds if rect size should be modified without adjusting texture
|
||||
if (ModH != -1)
|
||||
bounds.H = ModH * scale;
|
||||
if (ModW != -1)
|
||||
bounds.W = ModW * scale;
|
||||
|
||||
bounds.Z += zModify;
|
||||
|
||||
SRectF rect = texture == null ? bounds : CHelper.FitInBounds(bounds, texture.OrigAspect, aspect);
|
||||
|
||||
//Use original rect
|
||||
if (ModH != -1 || ModW != -1)
|
||||
rect = Rect.Scale(scale);
|
||||
|
||||
var color = new SColorF(Color.R, Color.G, Color.B, Color.A * Alpha);
|
||||
if (Visible || forceDraw || (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user