Skip to main content

Toolbar

Utility module for controlling the floating Android Macro toolbar from Lua.

Methods

isAvailable(): boolean

Check whether the toolbar service is running.

isVisible(): boolean

Check whether the toolbar is currently visible.

show(): void

Show the toolbar.

hide(): void

Hide the toolbar.

setPosition(x: number, y: number): void

setPosition(point: Point): void

Move the toolbar to a screen position.

setScale(scaleFactor: number): void

getScale(): number

Change or read the toolbar scale.

setOpacity(opacity: number): void

getOpacity(): number

Change or read the toolbar opacity.

setSnap(snapped: boolean): void

Enable or disable edge snap mode.

setCollapse(collapsed: boolean): void

Enable or disable collapsed circle mode.

isSnapped(): boolean

Check whether the toolbar is currently in a snapped state.

Notes

  • Except for isAvailable(), these methods require the toolbar service to be running
  • setScale() is clamped between 0.25 and 3.0
  • setOpacity() is clamped between 0.1 and 1.0