Class: AbstractPopup

AbstractPopup

Class that represents a PixiJS AbstractPopup. The class is used for various other Popup-like classes like Popup, Message, Tooltip...

new AbstractPopup (opts) abstract

Creates an instance of an AbstractPopup (only for internal use).

Name Type Description
opts object optional

An options object to specify to style and behaviour of the popup.

Name Type Default Description
id number auto generated optional

The id of the popup.

x number 0 optional

The x position of the popup. Can be also set after creation with popup.x = 0.

y number 0 optional

The y position of the popup. Can be also set after creation with popup.y = 0.

theme string | Theme dark optional

The theme to use for this popup. Possible values are dark, light, red or a Theme object.

header string | number | PIXI.Text optional

The heading inside the popup as a string, a number (will be converted to a text) or as a PIXI.Text object.

content string | number | PIXI.DisplayObject optional

A text, a number (will be converted to a text) or an PIXI.DisplayObject as the content of the popup.

minWidth number 320 optional

The minimum width of the popup.

minHeight number 130 optional

The minimum height of the popup.

padding number Theme.padding optional

The inner spacing (distance from header and content) the the border.

fill number Theme.fill optional

The color of the button background as a hex value.

fillAlpha number Theme.fillAlpha optional

The alpha value of the background.

stroke number Theme.stroke optional

The color of the border as a hex value.

strokeWidth number Theme.strokeWidth optional

The width of the border in pixel.

strokeAlpha number Theme.strokeAlpha optional

The alpha value of the border.

headerStyle object Theme.textStyleLarge optional

A textstyle object for the styling of the header. See PIXI.TextStyle for possible options.

textStyle object Theme.textStyleSmall optional

A textstyle object for the styling of the text. See PIXI.TextStyle for possible options.

radius number Theme.radius optional

The radius of the four corners of the popup (which is a rounded rectangle).

onHidden hiddenCallback optional

Executed when the popup gets hidden.

visible boolean true optional

Is the popup initially visible (property visible)?

orientation string optional

When set to portrait, the popup cannot be displayed in landscape mode. When set to landscape, the popup cannot be displayed in portrait mode.

See:

Extends

  • PIXI.Graphics

Members

content string | number | PIXI.DisplayObject

Sets or gets the content. The getter always returns an PIXI.DisplayObject. The setter can receive a string, a number or a PIXI.DisplayObject.

Sets or gets the header. The getter always returns a PIXI.Text object. The setter can receive a string, a number or a PIXI.Text object.

Methods

Hides the popup (sets his alpha values to 0).

Name Type Description
cb callback optional

Executed when hide animation was completed.

Returns:
Type Description
AbstractPopup A reference to the popup for chaining.

Should be called to refresh the layout of the popup. Can be used after resizing.

Returns:
Type Description
AbstractPopup A reference to the popup for chaining.

Shows the popup (sets his alpha values to 1).

Name Type Description
cb callback optional

Executed when show animation was completed.

Returns:
Type Description
AbstractPopup A reference to the popup for chaining.