Class: Menu

Menu(x, y, dir)

Menu
Parameters:
Name Type Default Description
x number the topleft-x coordinate of the Menu
y number the topleft-y coordinate of the Menu
dir number 0 The direction of the menu (0: vertical, 1: horizontal)
Source:

Methods

add(btn)

Add a Button to the menu
Parameters:
Name Type Description
btn Button the button to add to the menu
Source:

click()

Passes the click event to all buttons for processing
Source:

layout()

Recalculate the position p for the layout of buttons in the menu
Source:

render()

Draw the menu by calling render on all buttons
Source: