Skip to content

WindowUIBridge

class WindowUIBridge
Extends: StackUIBridge
Known subtypes: SnapshotUIBridge
Package: dev.joid.lib.bridge.ui · Module: core · Source: WindowUIBridge.java

The default UI bridge, which clears the window to a color every frame and draws text tooltips.

The backend registers one when no UI bridge was registered before it. Get it from BridgeHandler.UI.getBridge(WindowUIBridge.class) to set its colors and its tooltip text, as Style the window UI bridge shows.

ReturnsSignatureSummary
WindowUIBridgecreate() factoryCreates a window UI bridge with its default colors and no tooltip text style.
WindowUIBridge() protectedCreates the bridge with its default colors, for a subclass.

PropertyTypeDefaultSummary
backgroundColorColor.BLACKSets the color that clears the window before every frame, behind every UI.
hoverColorColorColor.decode("#18181b")Sets the fill of the tooltip box.
hoverInfoTextInfonull: no tooltipSets the text style of the tooltips; without it, the bridge draws no tooltip and, with the dev jar, prints a warning once.
hoverBorderColorColorColor.decode("#27272a")Sets the color of the border, one design pixel wide, of the tooltip box.

ReturnsSignatureSummary
voiddrawHover(UI ui, Object content, double mouseX, double mouseY)Draws the lines of the tooltip in a rounded box near the pointer, moved to stay inside the window.
ReturnsSignatureSummary
voiddrawBackground() hook protectedClears the color of the window to background, then the depth and the stencil.
Inherited from StackUIBridge (8)

open · close · add · remove · canHandle · forceOpen · replace · canReplace

Inherited from UIBridge (16)

load · update · mouseMoved · mousePressed · mouseReleased · mouseScroll · charTyped · keyPressed · keyReleased · isKeyConsumed · draw · isOpen · isOnTop · getUiList · isScreenOpen · isOverlayHidden

Inherited from IUIBridge (2)

getInterfaceScale · closeAll

WindowUIBridge create() factory

Creates a window UI bridge with its default colors and no tooltip text style.

WindowUIBridge() protected

Creates the bridge with its default colors, for a subclass.

  • this background(Color background) fluent
  • Color getBackground()

Default: Color.BLACK

Sets the color that clears the window before every frame, behind every UI.

  • this hoverColor(Color hoverColor) fluent
  • Color getHoverColor()

Default: Color.decode("#18181b")

Sets the fill of the tooltip box.

  • this hoverInfo(TextInfo hoverInfo) fluent
  • TextInfo getHoverInfo()

Default: null: no tooltip

Sets the text style of the tooltips; without it, the bridge draws no tooltip and, with the dev jar, prints a warning once.

  • this hoverBorderColor(Color hoverBorderColor) fluent
  • Color getHoverBorderColor()

Default: Color.decode("#27272a")

Sets the color of the border, one design pixel wide, of the tooltip box.

void drawHover(UI ui, Object content, double mouseX, double mouseY)

Draws the lines of the tooltip in a rounded box near the pointer, moved to stay inside the window.

void drawBackground() hook protected

Clears the color of the window to background, then the depth and the stencil.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page