← All Docs

User Interface (UI) Documentation

User Interface (UI) Documentation Source Code

The UI code is made up of immediate-mode UI helpers.

The current UI implementation is tap-driven and intended for touch-first games. Controls are declared during rendering and resolve input immediately using the input system’s tap model.

Keyboard or focus-based navigation may be added later.

Ui Methods

b8.UI.iconButton(opts)

Draws a simple icon button at the current cursor position.

Parameters

  • opts (Object): * @param {number} [opts.width=1]

b8.UI.region(opts)

Registers a clickable region at the current cursor position.

A region is defined in tile space using the current cursor as the top-left corner.

This uses the input system’s tap model:

  • A tap persists until consumed
  • Only one region can consume a tap

Parameters

  • opts (Object): * @param {number} [opts.width=1] Width in tiles

Returns

  • (boolean): True if this region consumed the tap

b8.UI.textButton(opts)

Draws a simple text button at the current cursor position.

Parameters

  • opts (Object): * @param {number} [opts.width=1]

More BeepMini Docs

A* Documentation

Actors Documentation

Animation Documentation

App Intro Documentation

Async Documentation

Cart API

Core Functions

ECS (Entity Component System) Documentation

Game Math Documentation

Game State

Image Processing

Input Documentation

Inventory API

Joystick Documentation

Menu Documentation

Music Documentation

Particle System Documentation

Passcodes Documentation

Path Documentation

Public API

Random Numbers Documentation

SFX Documentation

Scene Documentation

Text Renderer

Textmode

Tilemap Documentation

User Interface (UI) Documentation

Utilities Documentation

Visual Effects Documentation

B8:// Make BeepMini Games