Package net.storm.sdk.utils
Class ScreenUtils
java.lang.Object
net.storm.sdk.utils.ScreenUtils
Utility class for screen-related operations and validations.
This class provides methods for:
- Checking if click coordinates are within valid screen bounds
- Detecting clicks inside the minimap area
- Retrieving minimap bounds for different client modes
These utilities are essential for validating click targets and ensuring interactions occur within appropriate screen regions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RectangleGets the bounding rectangle of the minimap.static booleanisClickInsideMinimap(int x, int y) Checks if coordinates are inside the minimap area.static booleanisClickInsideMinimap(Point point) Checks if a point is inside the minimap area.static booleanisClickInsideMinimap(net.runelite.api.Point point) Checks if a point is inside the minimap area.static booleanisClickOffScreen(int x, int y) Checks if coordinates are off the visible game screen.static booleanisClickOffScreen(Point point) Checks if a point is off the visible game screen.static booleanisClickOffScreen(net.runelite.api.Point point) Checks if a point is off the visible game screen.
-
Constructor Details
-
ScreenUtils
public ScreenUtils()
-
-
Method Details
-
isClickOffScreen
public static boolean isClickOffScreen(net.runelite.api.Point point) Checks if a point is off the visible game screen.- Parameters:
point- the RuneLite Point to check- Returns:
trueif the point is outside screen bounds,falseotherwise
-
isClickOffScreen
Checks if a point is off the visible game screen.- Parameters:
point- the AWT Point to check- Returns:
trueif the point is outside screen bounds,falseotherwise
-
isClickOffScreen
public static boolean isClickOffScreen(int x, int y) Checks if coordinates are off the visible game screen.A point is considered off-screen if it has negative coordinates or exceeds the viewport dimensions.
- Parameters:
x- the X coordinate to checky- the Y coordinate to check- Returns:
trueif the coordinates are outside screen bounds,falseotherwise
-
isClickInsideMinimap
public static boolean isClickInsideMinimap(int x, int y) Checks if coordinates are inside the minimap area.- Parameters:
x- the X coordinate to checky- the Y coordinate to check- Returns:
trueif the coordinates are within the minimap,falseotherwise
-
isClickInsideMinimap
Checks if a point is inside the minimap area.- Parameters:
point- the AWT Point to check- Returns:
trueif the point is within the minimap,falseotherwise
-
isClickInsideMinimap
public static boolean isClickInsideMinimap(net.runelite.api.Point point) Checks if a point is inside the minimap area.- Parameters:
point- the RuneLite Point to check- Returns:
trueif the point is within the minimap,falseotherwise
-
getMinimap
Gets the bounding rectangle of the minimap.This method checks multiple possible minimap widget locations depending on the client mode (fixed, resizable, etc.). If no minimap widget is found, it returns a default rectangle in the top-right corner of the screen.
- Returns:
- the minimap bounds as a Rectangle
-