Skip to content

Commit

Permalink
feat: add config option to toggle the overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Jan 9, 2025
1 parent 05269e8 commit c08e1fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,13 @@ default int currentHouse() {
description = "Whether or not to show artefacts to next level"
)
default boolean showToNextLevel() { return true; }

@ConfigItem(
keyName = "showOverlay",
name = "Show overlay",
description = "Uncheck this to hide the overlay"
)
default boolean showOverlay() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ private StealingArtefactsOverlay(Client client, StealingArtefactsPlugin plugin,
*/
@Override
public Dimension render(Graphics2D graphics) {
if (!config.showOverlay()) {
return null;
}

if (client.getLocalPlayer() != null && plugin.isInPisc(client.getLocalPlayer().getWorldLocation())) {
panelComponent.getChildren().clear();
String title = "Stealing Artefacts";
Expand Down

0 comments on commit c08e1fd

Please sign in to comment.