Class OverlayManager


  • @Singleton
    public class OverlayManager
    extends Object
    Manages state of all game overlays
    • Method Detail

      • onMenuOptionClicked

        @Subscribe
        public void onMenuOptionClicked​(net.runelite.api.events.MenuOptionClicked event)
      • add

        public boolean add​(Overlay overlay)
        Add overlay.
        Parameters:
        overlay - the overlay
        Returns:
        true if overlay was added
      • remove

        public boolean remove​(Overlay overlay)
        Remove overlay.
        Parameters:
        overlay - the overlay
        Returns:
        true if overlay was removed
      • removeIf

        public boolean removeIf​(Predicate<Overlay> filter)
        Remove if overlay matches filter
        Parameters:
        filter - the filter
        Returns:
        true if any overlay was removed
      • anyMatch

        public boolean anyMatch​(Predicate<Overlay> filter)
        Returns whether an overlay exists which matches the given predicate.
        Parameters:
        filter - Filter predicate function
        Returns:
        true if any overlays match the given filter, false otherwise
      • clear

        public void clear()
        Clear all overlays
      • saveOverlay

        public void saveOverlay​(Overlay overlay)
        Force save overlay data
        Parameters:
        overlay - overlay to save
      • resetOverlay

        public void resetOverlay​(Overlay overlay)
        Resets stored overlay position data
        Parameters:
        overlay - overlay to reset