From 4db5d6247698ffa991b7b6df4ead917882325983 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 20 Apr 2024 18:44:51 +0200 Subject: [PATCH] Add methods to move a widget --- src/openrct2/interface/Window.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 2c0e189bc7..7f05f7a0b6 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -137,6 +137,18 @@ struct Widget return top - 1; } + void moveRight(int32_t amount) + { + left += amount; + right += amount; + } + + void moveDown(int32_t amount) + { + top += amount; + bottom += amount; + } + bool IsVisible() const { return !(flags & WIDGET_FLAGS::IS_HIDDEN);