iniquity

A re-imagining of the iconic BBS software.

View on GitHub

Class: Menu

IQ.Core.Menu

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Menu(options)

Parameters

Name Type
options IQMenuOptions

Inherited from

IQMenu.constructor

Defined in

core/src/index.ts:616

Properties

commands

commands: Object

Index signature

▪ [s: string]: (…args: any) => any

Inherited from

IQMenu.commands

Defined in

core/src/index.ts:614


description

Optional description: string

Inherited from

IQMenu.description

Defined in

core/src/index.ts:612


name

Optional name: string

Inherited from

IQMenu.name

Defined in

core/src/index.ts:611

Methods

keypressed

keypressed(cmdkeys?): string

Parameters

Name Type
cmdkeys null | string

Returns

string

Inherited from

IQMenu.keypressed

Defined in

core/src/index.ts:698


prompt

prompt(options?): IQMenuPromptFunctions

Will render a prompt to the screen.

example menu.prompt({ x: 20, y: 30, text: “Feed me: “ }).command(cmdkey) menu.prompt({ text: “Enter your command: “.color(“bright cyan”), x: 20, y: 20 }).command(cmdkey) menu.prompt({ x: 20, y: 30, text: “Feed me: “ }).command(cmdkey, (response, error) => { if (response.error) { alert(errors) } })

Parameters

Name Type
options? string | IQMenuPromptOptions

Returns

IQMenuPromptFunctions

Functions that can be chained to the prompt.

Inherited from

IQMenu.prompt

Defined in

core/src/index.ts:665


render

render(module, options?): void

Parameters

Name Type
module Function
options? IQMenuLoopOptions

Returns

void

Inherited from

IQMenu.render

Defined in

core/src/index.ts:623