Skip to content

UI

The UI namespace provides methods to show notifications and toast messages to the player.

Required permission: ui

Import

typescript
import { UI } from "@hotbunny/hackhub-content-sdk";

Methods

UI.notify(message)

Show a notification popup to the player. Appears as a system-style notification.

ParameterTypeDescription
messagestringNotification text
typescript
UI.notify("New quest available!");
UI.notify("You received a file from an unknown sender.");

UI.toast(message, type?)

Show a brief toast message at the bottom of the screen.

ParameterTypeDescription
messagestringToast message text
type"success" | "error" | "warning" | "info"Toast style (optional, defaults to info)
typescript
UI.toast("File downloaded successfully", "success");
UI.toast("Connection failed", "error");
UI.toast("Low disk space", "warning");
UI.toast("Scanning network...", "info");

HotBunny Interactive Entertainment Inc.