Skip to content

Option to hide the overlay when the inventory panel is closed #8

Description

@SnavvieJD

The histogram sits over the inventory panel, which works well while the inventory is open. When I close the inventory the panel goes away but the histogram stays, so the tick marks are left floating over the game world with nothing behind them.

I'd like an option for the overlay to hide whenever the inventory is hidden, so it comes and goes with the rest of the interface.

As far as I can tell this isn't currently possible. HistogramOverlay is constructed with only HistogramConfig, so it has no Client to ask about widget state, and render draws unconditionally with no early return. There's no config key that could drive one either.

Suggested shape:

  • A boolean in the Panel section, e.g. Hide When Inventory Closed, defaulting to off so nothing changes for existing users
  • Pass the plugin's already-injected Client into HistogramOverlay
  • Return null early from render when the toggle is on and the inventory widget is hidden

I've also opened a PR with one implementation of this, but no strong feelings about the approach if you'd rather do it differently.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions