From 3fbcc67766745d28f1b39d95459e53835beb628a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 29 Sep 2019 23:24:37 +0200 Subject: GRAPHICS: MACGUI: Load border padding directly from the 9-patch --- graphics/macgui/macwindowborder.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'graphics/macgui/macwindowborder.h') diff --git a/graphics/macgui/macwindowborder.h b/graphics/macgui/macwindowborder.h index 1500b9b847..330e407460 100644 --- a/graphics/macgui/macwindowborder.h +++ b/graphics/macgui/macwindowborder.h @@ -32,13 +32,6 @@ namespace Graphics { -enum MacBorderOffset { - kBorderOffsetLeft = 0, - kBorderOffsetRight = 1, - kBorderOffsetTop = 2, - kBorderOffsetBottom = 3 -}; - /** * A representation of a custom border, which allows for arbitrary border offsets * and nine-patch resizable displays for both active and inactive states. @@ -89,6 +82,7 @@ public: * @param bottom Thickness (in pixels) of the bottom side of the border. */ void setOffsets(int left, int right, int top, int bottom); + void setOffsets(Common::Rect &rect); /** * Accessor method to retrieve a given border. @@ -97,7 +91,7 @@ public: * @param offset The identifier of the offset wanted. * @return The desired offset in pixels. */ - int getOffset(MacBorderOffset offset); + Common::Rect &getOffset(); /** * Blit the desired border (active or inactive) into a destination surface. @@ -115,8 +109,7 @@ private: bool _activeInitialized; bool _inactiveInitialized; - bool _hasOffsets; - int _borderOffsets[4]; + Common::Rect _borderOffsets; }; -- cgit v1.2.3