Skip to content

Menu Module

STBrian edited this page Nov 9, 2026 · 1 revision

The Menu submodule integrates scripts into the CTRPluginFramework in-game menu, allowing developers to create custom menu entries, subfolders, and message boxes.

Types

MenuFolder Represents a folder item in the in-game plugin menu

Functions

Core.Menu.getMenuFolder Returns the root mods folder in the plugin menu
Core.Menu.showMessageBox Displays an OK message box in the menu
Core.Menu.showAskMessageBox Displays a Yes/No dialog and returns the response
Core.Menu.isOpen Checks if the CTRPluginFramework menu is currently open

Core.Menu.getMenuFolder

Returns a reference to the main mods folder within the plugin menu. You can append new subfolders or clickable menu entries to it.

Core.Menu.getMenuFolder() -> MenuFolder

Example

local modsFolder = Core.Menu.getMenuFolder()
local myFolder = modsFolder:newFolder("My Custom Mod")
myFolder:newEntry("Teleport Home", function()
    Game.LocalPlayer.Position.set(0, 70, 0)
    Core.Debug.message("Teleported home!")
end)

Core.Menu.showMessageBox

Displays an informational popup dialog box with an OK button.

Core.Menu.showMessageBox(msg: string)

Core.Menu.showAskMessageBox

Displays a question dialog box with Yes and No buttons. Returns true if the user pressed Yes, false otherwise.

Core.Menu.showAskMessageBox(msg: string) -> boolean

Example

if Core.Menu.showAskMessageBox("Do you want to reset your inventory?") then
    -- perform action
end

Core.Menu.isOpen

Returns true if the in-game CTRPF menu UI is currently open and visible.

Core.Menu.isOpen() -> boolean

Clone this wiki locally