UI Seek bar - phreaknation/phaserwebcomponents GitHub Wiki
A generic seek bar.
new this.game.PhaserWebComponents.components.UI.SeekBar({
game: this.game,
target: htmlNode.querySelector('[data-replace="seekbar"]'),
events: {
// Seekbar seends seekupdate event when the bars position is updated by the setPosition function.
setPosition: (name, data) => {
// data.detail.value: Location of the scrubber
// data.detail.percentage: what percentage the scrubber is at.
}
// Seekbar seends seekupdate event when the bars position is updated by the mouse.
seekupdate: (name, data) => {
// data.detail.value: Location of the scrubber
// data.detail.percentage: what percentage the scrubber is at.
}
},
options: {}
})