changed sizeof into property
This commit is contained in:
parent
9e2d680610
commit
d9b116f389
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue