Blitz3D+ Command Reference

CheckMenu menu

Parameters

menu - menu item to put a check mark against

Description

Puts a check mark against a menu item.

Requires Extended language mode.

Check marks are how menus show on/off options - Wireframe, Show grid, Snap to grid. The mark never toggles by itself: when the menu action event ($1001) arrives, your code reads the current state with MenuChecked and calls CheckMenu or UncheckMenu to flip it, then applies the matching change to the game or tool.

For items on a window's menu bar, call UpdateWindowMenu afterwards so the native bar redraws with the new mark. These updates are idempotent - setting a state that has not changed does not rebuild or flicker the bar. Popup menu items need no update call, because their native menu is built fresh each time the popup is shown.

See it working in the menus and events sample and the world editor shell sample.

See also: UncheckMenu, MenuChecked, CreateMenu, UpdateWindowMenu, EnableMenu.

Index