mirror of
https://github.com/4sval/FModel.git
synced 2026-04-04 16:15:52 -05:00
i stg if smth goes wrong
This commit is contained in:
parent
68d4636907
commit
cc0b094ad2
|
|
@ -204,14 +204,16 @@ namespace FModel.Creator.Bases
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (text.Any(char.IsDigit))
|
||||
//only trigger the fix if The Last char is a digit
|
||||
if (char.IsDigit(text[text.Length - 1]))
|
||||
{
|
||||
int s = text.Count(k => Char.IsDigit(k));
|
||||
float numberwidth = paint.MeasureText(text.Substring(text.Length - s));
|
||||
|
||||
//Draw Number Separately
|
||||
c.DrawShapedText(shaper, text.Substring(text.Length - s), x, 155, paint);
|
||||
|
||||
c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + 60, 155, paint);
|
||||
c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + numberwidth, 155, paint);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -96,18 +96,18 @@ namespace FModel.Creator.Bundles
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (text.Any(char.IsDigit))
|
||||
if (char.IsDigit(text[text.Length - 1]))
|
||||
{
|
||||
int s = text.Count(k => Char.IsDigit(k));
|
||||
float numberwidth = paint.MeasureText(text.Substring(text.Length - s));
|
||||
c.DrawShapedText(shaper, text.Substring(text.Length - s), x, 155, paint);
|
||||
|
||||
c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + 60, 155, paint);
|
||||
c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + numberwidth, 155, paint);
|
||||
}
|
||||
else
|
||||
{
|
||||
//feels bad man
|
||||
c.DrawShapedText(shaper, text, x, 155, paint);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
using FModel.Creator.Texts;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.HarfBuzz;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FModel.Creator.Bundles
|
||||
{
|
||||
|
|
@ -50,8 +52,18 @@ namespace FModel.Creator.Bundles
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (char.IsDigit(q.Description[q.Description.Length - 1]))
|
||||
{
|
||||
int s = q.Description.Count(k => Char.IsDigit(k));
|
||||
c.DrawShapedText(shaper, q.Description.Substring(q.Description.Length - s), 65, y + paint.TextSize + 11, paint);
|
||||
|
||||
c.DrawShapedText(shaper, q.Description, 65, y + paint.TextSize + 11, paint);
|
||||
c.DrawShapedText(shaper, q.Description.Substring(0, q.Description.Length - s), 115, y + paint.TextSize + 11, paint);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.DrawShapedText(shaper, q.Description, 65, y + paint.TextSize + 11, paint);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user