Skip to main content

Module menu

Module menu 

Source
Expand description

A small menu that opens under what was pressed: what can be done to pass a note on, what the cog above the feed offers, how fast a video plays.

ConstantsΒ§

MENU_GAP
MENU_ITEM_HEIGHT πŸ”’
How tall one thing a menu offers is, at most.
MENU_PADDING πŸ”’
MENU_WIDTH
How wide a menu is, the room around what it offers, and the gap between what was pressed and the menu.

FunctionsΒ§

at_the_keys πŸ”’
How an item of a menu looks while the keyboard is at it: as one the pointer is over, wherever the pointer is.
choice_menu
A menu of choices, one under the other, width wide: each what it is called, whether it is the one chosen now, which is ticked, and what choosing it does.
menu
A menu of items, one under the other: each a picture, what it is called, and what choosing it does. One that does nothing shows, and can’t be chosen.
menu_at
As menu, with the keyboard at the item that is at in items, if it is at one: that item is shown as one the pointer is over.
menu_height
How tall a menu that offers items things is, at most: the room it needs under what was pressed to show all of them.