Package net.runelite.client.ui.overlay
Class OverlayManager
- java.lang.Object
-
- net.runelite.client.ui.overlay.OverlayManager
-
@Singleton public class OverlayManager extends Object
Manages state of all game overlays
-
-
Field Summary
Fields Modifier and Type Field Description static String
OPTION_CONFIGURE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Overlay overlay)
Add overlay.boolean
anyMatch(Predicate<Overlay> filter)
Returns whether an overlay exists which matches the given predicate.void
clear()
Clear all overlaysCollection<WidgetItem>
getWidgetItems()
void
onConfigChanged(ConfigChanged event)
void
onProfileChanged(ProfileChanged event)
boolean
remove(Overlay overlay)
Remove overlay.boolean
removeIf(Predicate<Overlay> filter)
Remove if overlay matches filtervoid
resetOverlay(Overlay overlay)
Resets stored overlay position datavoid
saveOverlay(Overlay overlay)
Force save overlay datavoid
setWidgetItems(Collection<WidgetItem> widgetItems)
-
-
-
Field Detail
-
OPTION_CONFIGURE
public static final String OPTION_CONFIGURE
- See Also:
- Constant Field Values
-
-
Method Detail
-
onConfigChanged
@Subscribe public void onConfigChanged(ConfigChanged event)
-
onProfileChanged
@Subscribe public void onProfileChanged(ProfileChanged 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
-
getWidgetItems
public Collection<WidgetItem> getWidgetItems()
-
setWidgetItems
public void setWidgetItems(Collection<WidgetItem> widgetItems)
-
-