Media Icon - phreaknation/phaserwebcomponents GitHub Wiki
Used for external icon libraries such as font awesome.
new this.game.PhaserWebComponents.components.Media.Icon({
// attach to an HTML component. Will replace what ever selector you have
// target: secondWindow.getContainerNode().querySelector('[data-replace="videoplayer"]'),
// attach to a phaser object.
owner: box,
options: {
// Centers the element over the object.
center: true,
// Template of the object you wish to show.
template: `<i class="fa fa-fw fa-2x fa-search"></i>`,
// CSS styles to apply to the icon.
styles: {
color: '#aad',
textShadow: '1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000',
top: 20,
}
}
}),