Package privbot.ui.overlay
The rule: render reads the snapshot and nothing else. Copy what an overlay needs into an
immutable value on the game tick and publish it; the
composers given to PrivBotOverlays.panel(java.lang.String) (rows(...)) and
PrivBotOverlays.scene(net.runelite.api.Client) (draw(...)) receive that value only. On
Impact the render thread cannot call client hooks, so an overlay that reads the client in
render stalls or draws nothing. visibleWhen conditions run on the render thread
too and must read published flags.
HUD rows come from Rows, colours only from
OverlayTheme and ColorRamp (user-chosen colours
enter through OverlayPalette). Scene drawing goes through
SceneCanvas over a SceneProjection, which is
what makes tiles draw on Impact and Elorin, where RuneLite's Perspective draws nothing.
Register with PrivBotOverlays.install(net.runelite.client.ui.overlay.OverlayManager, net.runelite.client.ui.overlay.Overlay...) in startUp() and
OverlaySet.close() in shutDown().
The Workflow Studio (Builder) HUD and the "Move overlay" support classes also live here; the HUD's own classes are not plugin API. Guide: the SDK docs, Concepts (UI kit surfaces) and the overlays and UI cookbook.
-
ClassDescriptionA value-to-colour rule, so a threshold ladder is written once and reused.Maps a plain value.Text drawn in runs, so characters the chosen font has no glyph for (an emoji, a pickaxe) are drawn in "Segoe UI Emoji", then "Dialog", at the same size and style instead of as a missing-glyph box.The full-colour icon set offered for Builder flow overlays (ids such as
skill:miningortile:combat)."Move overlay" on clients without RuneLite's MouseManager (Impact, Elorin, SpawnPK): anEventQueuepushed only while move mode is on, so a drag on a panel never also clicks the game.Feeds the game canvas's mouse into anOverlayMoveModewhile "Move overlay" is on."Move overlay": drag a flow's Builder panel to a new place, or drag its bottom-right corner to resize its width, in game.Receives a saved move: the corner anchor nearest the panel's centre and the offsets from it (OverlayPlacementrules), or FREE with the panel's top-left when the viewport is unknown.The resolved colours of one overlay: the scheme's, with a custom scheme's per-colour overrides.Where a flow's overlay panel goes on the game canvas: its anchor plus offsets, clamped inside the viewport, and moved off any panel placed before it.The overlays a plugin registered, as one handle:OverlaySet.setVisible(boolean)adds or removes them all,OverlaySet.close()removes them forshutDown().The one palette for in-game overlays.The colours a user chose for one overlay, asOverlayPalette.of(PaletteSettings)reads them: a built-inPaletteSettings.Scheme, and forPaletteSettings.Scheme.CUSTOMa colour perPaletteSettings.Slotthat replaces Classic's.The built-in colour schemes, the ones the Workflow Studio HUD offers.The colours of a palette, one perOverlayPalettefield.Shared drawing helpers for PrivBot-branded chatbox overlays.Shared metric layout helpers for PrivBot chatbox overlays.One key/value row for the chatbox layouts; build withrow(...).A themed HUD panel composed from a published state on every render.Entry point of the overlay kit: describe a HUD panel or a scene overlay, then install the set.Describes a HUD panel;PrivBotOverlays.PanelBuilder.rows(java.util.function.Supplier<S>, java.util.function.BiConsumer<privbot.ui.overlay.Rows, S>)is the terminal step.Describes a scene overlay;PrivBotOverlays.SceneBuilder.draw(java.util.function.Supplier<S>, java.util.function.BiConsumer<privbot.ui.overlay.SceneCanvas, S>)is the terminal step.A scene overlay (tiles, outlines, labels, paths) drawn from a published state on every render.The rows of a HUD panel, composed fresh on every render.The scene-drawing primitives every tile overlay used to hand-roll, over oneSceneProjection.World → canvas, the same way on every server.Snapshot<S>State published on the game tick and read on the render thread.