Allowed for the text to set a text origin.
This commit is contained in:
parent
51f8dfd522
commit
17e76a9dd4
6 changed files with 56 additions and 38 deletions
|
|
@ -23,6 +23,14 @@ namespace SM2D.Drawing
|
|||
Transform.Size = new CVector2(1);
|
||||
}
|
||||
|
||||
public void SetHeight(float desiredHeight)
|
||||
{
|
||||
if (!Font.WasCompiled) Font.Compile();
|
||||
|
||||
float factor = desiredHeight / Font.Height;
|
||||
Transform.Size.Set(factor);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void DrawContext(ref DrawContext context)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue