_wipshit
This commit is contained in:
@@ -91,7 +91,7 @@ namespace Game
|
||||
|
||||
private int GetFontCharacterWidth()
|
||||
{
|
||||
Font font = Font.GetFont();
|
||||
Font font = Font?.GetFont();
|
||||
if (!font)
|
||||
return 0;
|
||||
return (int)font.MeasureText("a").X; // hacky, but works for fixed-size fonts...
|
||||
@@ -99,7 +99,7 @@ namespace Game
|
||||
|
||||
public int GetFontHeight()
|
||||
{
|
||||
Font font = Font.GetFont();
|
||||
Font font = Font?.GetFont();
|
||||
if (font == null)
|
||||
return (int)Height;
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Game
|
||||
|
||||
private int GetHeightInLines()
|
||||
{
|
||||
Font font = Font.GetFont();
|
||||
Font font = Font?.GetFont();
|
||||
if (!font)
|
||||
return 0;
|
||||
return (int)(Height / (font.Height / Platform.DpiScale)); // number of fully visible lines
|
||||
@@ -323,7 +323,6 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Render2D.FillRectangle(selectionRect, selectionColor);
|
||||
|
||||
layout.Bounds.Y += lineHeight;
|
||||
|
||||
Reference in New Issue
Block a user