Skip to content

Commit

Permalink
feat: add config to toggle the overlay (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada authored Jan 9, 2025
1 parent 0726962 commit 9a7f85e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Minor: Add a config for toggling the overlay. (#22)

## 1.3

- Minor: Add a plugin hub icon of Captain Khaled, the face of artefact stealing. (#1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@ default int currentHouse() {
name = "Show artefacts to next level",
description = "Whether or not to show artefacts to next level"
)
default boolean showToNextLevel() { return true; }}
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 9a7f85e

Please sign in to comment.