This class represents a popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.
</p>
<p>Let's look at some popup examples:</p><br/>
<canvasid="canvas"class="interactive"></canvas>
<p>
What you should see: Three popups and a button which opens a popup.
</p>
<scriptclass="doctest">
const app = new PIXIApp({
view: canvas,
width: 900,
height: 250,
transparent: false,
backgroundColor: 0xcccccc
}).setup().run()
let popup1 = new Popup({
x: 20,
y: 20,
header: 'Popup'
})
let popup2 = new Popup({
x: 140,
y: 30,
padding: 20,
header: 'Popup',
content: 'Man kann die Erfahrung nicht\nfrüh genug machen, wie\nentbehrlich man in der\nWelt ist.',
headerStyle: {fill: 0xaa3322},
textStyle: {fill: 0x5544ee, fontSize: 10}
})
let popup3 = new Popup({
x: 330,
y: 20,
content: 'Man sollte alle Tage wenigstens ein kleines Lied hören, ein gutes Gedicht lesen,\nein treffliches Gemälde sehen und, wenn es möglich zu machen wäre,\neinige vernünftige Worte sprechen.'
})
let button1 = new Button({
x: 20,
y: 160,
icon: 'speaker_notes',
action: () => {
app.scene.addChild(new Popup({
x: 100,
y: 100,
closeButton: true,
header: 'Die Kunst ist eine Vermittlerin des Unaussprechlichen.',