Use CFont class to define the font to use

This commit is contained in:
Flamefire committed 2014-09-07 10:35:41 +02:00
1 parent 7f60e6f321
commit 94be5ce97b
13 files changed
+242 -255

No files matched your search

+5 -8
View File
@@ -205,10 +205,7 @@ namespace VocaluxeLib.Menu
private void _SetText(CSongNote note)
{
_Text.Text = note.Text;
_Text.Style = EStyle.Bold;
if (note.Type == ENoteType.Freestyle)
_Text.Style = EStyle.BoldItalic;
_Text.Font.Style = (note.Type == ENoteType.Freestyle)? EStyle.BoldItalic:EStyle.Bold;
}
public void Clear()
@@ -350,11 +347,11 @@ namespace VocaluxeLib.Menu
p = 1f - p;
float ty = _Text.Y;
float th = _Text.Height;
float th = _Text.Font.Height;
float tz = _Text.Z;
SRectF normalRect = _Text.Rect;
_Text.Height += _Text.Height * p * 0.4f;
_Text.Font.Height *= 1f+ p * 0.4f;
_Text.X -= (_Text.Rect.W - normalRect.W) / 2f;
_Text.Y -= (_Text.Rect.H - normalRect.H) / 2f;
_Text.Z -= 0.1f;
@@ -364,7 +361,7 @@ namespace VocaluxeLib.Menu
_Text.Draw();
_Text.Y = ty;
_Text.Height = th;
_Text.Font.Height = th;
_Text.Z = tz;
}
}
@@ -456,7 +453,7 @@ namespace VocaluxeLib.Menu
else
{
float y = _Text.Y;
_Text.Y -= _Text.Height * 0.1f * p;
_Text.Y -= _Text.Font.Height * 0.1f * p;
_Text.Draw();
_Text.Y = y;
}