Skip to content

MenuFolder

STBrian edited this page Nov 9, 2026 · 1 revision

MenuFolder is a reference to a folder inside the CTRPluginFramework in-game menu. It allows grouping multiple menu entries or nested subfolders together.

Methods

MenuFolder:newFolder Creates and appends a child folder
MenuFolder:newEntry Creates and appends an executable menu item

MenuFolder:newFolder

Creates a new folder item, appends it as a child to the current folder, and returns a reference to the newly created folder.

MenuFolder:newFolder(name: string) -> MenuFolder

Example

local root = Core.Menu.getMenuFolder()
local cheats = root:newFolder("Cheats")

MenuFolder:newEntry

Creates a new menu entry with the specified title and appends it to the folder. When selected or toggled by the player in the menu, the callback function is executed.

MenuFolder:newEntry(name: string, callback: function)

Example

local root = Core.Menu.getMenuFolder()
root:newEntry("Toggle Flying", function()
    Game.LocalPlayer.CanFly = not Game.LocalPlayer.CanFly
    Game.LocalPlayer.Flying = Game.LocalPlayer.CanFly
    Core.Debug.message("Flying set to: " .. tostring(Game.LocalPlayer.CanFly))
end)

See also

Clone this wiki locally