From d9b116f3895f24c42f1c26c44797b055159b4cb1 Mon Sep 17 00:00:00 2001 From: Booklordofthedings Date: Sun, 2 Jun 2024 23:19:25 +0200 Subject: [PATCH] changed sizeof into property --- src/Controls/GuiObject.bf | 5 +++-- src/Controls/Label.bf | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Controls/GuiObject.bf b/src/Controls/GuiObject.bf index a8eac03..5ca29d3 100644 --- a/src/Controls/GuiObject.bf +++ b/src/Controls/GuiObject.bf @@ -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 diff --git a/src/Controls/Label.bf b/src/Controls/Label.bf index d176c95..48f9c35 100644 --- a/src/Controls/Label.bf +++ b/src/Controls/Label.bf @@ -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;