Skip to content

Menu

The Menu API allows mods to add custom items to the Start Menu.

Import

ts
import { Menu } from "@hotbunny/hackhub-content-sdk";

Functions

Adds a custom item to the start menu.

ts
Menu.addItem({
    id: "my-tool",
    label: "My Custom Tool",
    icon: "mod-asset://icon.png",
    section: "bottom",
    onClick: () => {
        UI.toast("Tool activated!");
    },
});

Removes a previously added menu item by its ID.

ts
Menu.removeItem("my-tool");

Returns all mod-added menu items.

ts
const items = Menu.getItems();
console.log(`${items.length} mod menu items registered`);
PropertyTypeRequiredDescription
idstringYesUnique identifier for the menu item
labelstringYesDisplay text for the item
iconstringNoIcon URL (supports mod-asset:// protocol)
section"top" | "bottom"NoWhere to place the item (default: bottom)
onClick() => voidNoCallback when item is clicked

Example: Tool Launcher

ts
import { Menu, UI } from "@hotbunny/hackhub-content-sdk";

export function setupMenu() {
    Menu.addItem({
        id: "network-scanner",
        label: "Network Scanner",
        icon: "mod-asset://scanner-icon.png",
        section: "top",
        onClick: () => {
            UI.toast("Scanning network...");
        },
    });
}

HotBunny Interactive Entertainment Inc.