PartyNames: Workaround for right size of select-slide-textures. Anyone better ideas?
This commit is contained in:
1 parent
c14ea466f5
commit
11df1dd0ad
1 file changed
+7
-2
@@ -771,9 +771,14 @@ namespace VocaluxeLib.Menu
|
|||||||
_ValueBounds.Clear();
|
_ValueBounds.Clear();
|
||||||
for (int i = 0; i < numvis; i++)
|
for (int i = 0; i < numvis; i++)
|
||||||
{
|
{
|
||||||
var text = new CText(0, 0, 0, TextH, MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, TextColor, _ValueNames[i + offset],
|
var text = new CText(0, 0, 0, TextH, MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, TextColor, "T",
|
||||||
_ValuePartyModeIDs[i + offset]);
|
_ValuePartyModeIDs[i + offset]);
|
||||||
|
|
||||||
|
if (_ValueNames[i + offset] != "")
|
||||||
|
text.Text = _ValueNames[i + offset];
|
||||||
|
else
|
||||||
|
text.Visible = false;
|
||||||
|
|
||||||
var alpha = new SColorF(1f, 1f, 1f, 0.35f);
|
var alpha = new SColorF(1f, 1f, 1f, 0.35f);
|
||||||
if (i + offset == _Selection)
|
if (i + offset == _Selection)
|
||||||
{
|
{
|
||||||
@@ -796,7 +801,7 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
float dh = text.Y - Rect.Y - Rect.H * 0.1f;
|
float dh = text.Y - Rect.Y - Rect.H * 0.1f;
|
||||||
var rect = new SRectF(text.X - dh / 2, Rect.Y + Rect.H * 0.05f, dh, dh, Rect.Z);
|
var rect = new SRectF(text.X - dh / 2, Rect.Y + Rect.H * 0.05f, dh, dh, Rect.Z);
|
||||||
CBase.Drawing.DrawTexture(_Textures[i + offset], rect, alpha);
|
CBase.Drawing.DrawTexture(_Textures[i + offset], rect, alpha, rect);
|
||||||
_ValueBounds.Add(rect);
|
_ValueBounds.Add(rect);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user