Repository navigation
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.
| MenuFolder:newFolder | Creates and appends a child folder |
| MenuFolder:newEntry | Creates and appends an executable menu item |
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) -> MenuFolderlocal root = Core.Menu.getMenuFolder()
local cheats = root:newFolder("Cheats")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)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)