From 4d845e5862410b689402c003e35d93bd68972cb0 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 1 Aug 2021 16:04:26 -0400 Subject: [PATCH] api: add menu location and size accessors --- .../main/java/net/runelite/api/Client.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index d5a2393a5e..b669649272 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -618,6 +618,34 @@ public interface Client extends GameEngine */ boolean isMenuOpen(); + /** + * Get the menu x location. Only valid if the menu is open. + * + * @return the menu x location + */ + int getMenuX(); + + /** + * Get the menu y location. Only valid if the menu is open. + * + * @return the menu y location + */ + int getMenuY(); + + /** + * Get the menu height. Only valid if the menu is open. + * + * @return the menu height + */ + int getMenuHeight(); + + /** + * Get the menu width. Only valid if the menu is open. + * + * @return the menu width + */ + int getMenuWidth(); + /** * Gets the angle of the map, or target camera yaw. *