changed sizeof into property

This commit is contained in:
Booklordofthedings 2024-06-02 23:19:25 +02:00
parent 9e2d680610
commit d9b116f389
2 changed files with 4 additions and 3 deletions

View file

@ -77,9 +77,10 @@ abstract class GuiObject
App.Selected = this;
}
}
public Vector2 SizeOf()
public Vector2 SizeOf
{
return .(Width + MarginLeft + MarginRight, Height + MarginTop + MarginBottom);
get => .(Width + MarginLeft + MarginRight, Height + MarginTop + MarginBottom);
}
///Returns true if the onclick has been handled

View file

@ -9,7 +9,7 @@ class Label : GuiObject
public this(StringView pName) : base(Label, pName)
{
Label.Append(pName);
Padding = 3;
Margin = 3;
_Measure = Raylib.MeasureTextEx(Theme.Font, Label, Theme.FontSize, 0);
Height = (.)_Measure.y;
Width = (.)_Measure.x;