Class PrivBotSceneOverlay<S>
java.lang.Object
net.runelite.client.ui.overlay.Overlay
privbot.ui.overlay.PrivBotSceneOverlay<S>
- Type Parameters:
S- the tick-published state (seeSnapshot)
- All Implemented Interfaces:
net.runelite.client.ui.overlay.components.LayoutableRenderableEntity,net.runelite.client.ui.overlay.RenderableEntity
public abstract class PrivBotSceneOverlay<S>
extends net.runelite.client.ui.overlay.Overlay
A scene overlay (tiles, outlines, labels, paths) drawn from a published state on every render.
Subclass and implement draw(SceneCanvas, Object), or build one with
PrivBotOverlays.scene(Client). Projection goes through SceneProjection, so the same
code draws on RuneLite-API servers and on Impact and Elorin.
-
Field Summary
Fields inherited from class net.runelite.client.ui.overlay.Overlay
PRIORITY_DEFAULT, PRIORITY_HIGH, PRIORITY_HIGHEST, PRIORITY_LOW, PRIORITY_MED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrivBotSceneOverlay(net.runelite.api.Client client, Supplier<S> state) Projects throughSceneProjection.of(Client);stateis read on the render thread.protectedPrivBotSceneOverlay(SceneProjection projection, Supplier<S> state) Usesprojection; the overlay is dynamic, above the scene, low priority. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddraw(SceneCanvas canvas, S state) Draw this render's scene; called only with a non-null state.The projection this overlay draws with.render(Graphics2D graphics) Render-thread entry: checks visibility, reads the state and callsdraw(privbot.ui.overlay.SceneCanvas, S)with a freshSceneCanvas.visibleWhen(BooleanSupplier condition) Draw only whileconditionis true (null = always).Methods inherited from class net.runelite.client.ui.overlay.Overlay
addMenuEntry, addMenuEntry, drawAfterInterface, drawAfterLayer, drawAfterLayer, drawAfterLayer, getBounds, getDrawHooks, getLayer, getMenuEntries, getMinimumSize, getName, getParentBounds, getPlugin, getPosition, getPreferredLocation, getPreferredPosition, getPreferredSize, getPriority, isDragTargetable, isMovable, isResettable, isResizable, isSnappable, onDrag, onMouseOver, removeMenuEntry, revalidate, setBounds, setDragTargetable, setLayer, setMinimumSize, setMovable, setPosition, setPreferredLocation, setPreferredPosition, setPreferredSize, setPriority, setPriority, setResettable, setResizable, setSnappable
-
Constructor Details
-
PrivBotSceneOverlay
Projects throughSceneProjection.of(Client);stateis read on the render thread. -
PrivBotSceneOverlay
Usesprojection; the overlay is dynamic, above the scene, low priority.
-
-
Method Details
-
draw
Draw this render's scene; called only with a non-null state. -
visibleWhen
Draw only whileconditionis true (null = always). It runs on the render thread, so it must read published state only. -
projection
The projection this overlay draws with. -
render
Render-thread entry: checks visibility, reads the state and callsdraw(privbot.ui.overlay.SceneCanvas, S)with a freshSceneCanvas. Draws nothing when hidden or when the state is null; an exception indrawdrops that frame only. Always returns null (dynamic overlay).
-