IslandMenu
import { IslandMenu } from 'pixi-silk/ui/island';
Rows of switches, choices and actions, sized for the open state of a small island: a settings menu that grows out of a gear. Its box is IslandMenu.boxWidth by IslandMenu.boxHeight from (0, 0). Switches slide when their signal changes, from a tap or from elsewhere.
Extends#
Container
Constructors#
Constructor#
new IslandMenu(options: IslandMenuOptions): IslandMenu;
Parameters#
| Parameter | Type |
|---|---|
options | IslandMenuOptions |
Returns#
IslandMenu
Overrides#
Container.constructor
Properties#
Methods#
destroy()#
destroy(options?: DestroyOptions): void;
Removes all internal references and listeners as well as removes children from the display list.
Do not use a Container after calling destroy.
Parameters#
| Parameter | Type | Description |
|---|---|---|
options? | DestroyOptions | Options parameter. A boolean will act as if all options have been set to that value |
Returns#
void
Example#
container.destroy();
container.destroy(true);
container.destroy({ children: true });
container.destroy({ children: true, texture: true, textureSource: true });
Overrides#
Container.destroy
select()#
select(index: number): void;
Taps a row by index, as a pointer would.
Parameters#
| Parameter | Type |
|---|---|
index | number |
Returns#
void
tick()#
tick(dt: number): boolean;
Advances the switches by dt seconds (for ticker: null). Returns true while one moves.
Parameters#
| Parameter | Type |
|---|---|
dt | number |
Returns#
boolean