///

Ui Class

Ui.clickText(text, options?, region?)

Find visible text and click it. Checks accessible UI text first, then falls back to OCR. Default timeout is 5000ms, pass { timeout: 0 } for a single instant pass. Options: { timeout, mode: "exact"/"fuzzy"/"contains", scanRate }.

Ui.clickText('Daily Reward Ready', 'demo', new Region(0, 0, Screen.getWidth(), Screen.getHeight()));

Ui.Overlay.setText(id, text, x, y, color?, size?, align?)

Draw text on the script UI overlay. align is "left" (default), "center" (centres on screen, ignoring x) or "right" (places the text’s right edge at x).

Ui.Overlay.setText('status', 'Reward found', CenterPoint().x, 140, Color.green(), 18, 'center');

Ui.Overlay.setPanel(id, x, y, w, h, color?)

Draw a panel on the script UI overlay.

Ui.Overlay.setPanel('statusPanel', 40, 100, 420, 120, Color.fromHex('#2200FF88'));

Ui.Overlay.remove(id)

Remove one overlay element.

Ui.Overlay.remove('status');

Ui.Overlay.clear(id)

Remove one overlay element.

Ui.Overlay.clear('statusPanel');

Ui.Overlay.clearAll()

Remove all script overlay elements.

Ui.Overlay.clearAll();

Ui.Overlay.showScene(name, keepOrOpts?)

Show a HUD designed in the scene builder, by name. See Overlay Scenes.

Ui.Overlay.showScene('demo', 'demo');

Ui.Overlay.hideScene(name?)

Hide one scene, or every scene this macro drew.

Ui.Overlay.hideScene('demo');

For buttons the user can tap, draggable panels, images, gauges and charts, see Overlay Widgets. To show a HUD you laid out visually instead of building it in code, see Overlay Scenes.