Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Client/Javascript/MainPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function MainPage(appLogic) {
this.championSelectDiv = CreateElement({type: 'div', class: 'MainPage_ChampionSelectDiv col s10', elements:
[
this.championSelect = CreateElement({type: 'select', id: 'championSelect', class: 'MainPage_ChampionSelect icons'}),
this.championSelectSound = CreateElement({type: 'audio'}),
]}),
this.skinSelectDiv = CreateElement({type: 'button', id: 'selectSkin', class: 'MainPage_ButtonSelectSkin btn col s2', text: 'Select skin'}),
this.modalSkin = CreateElement({type: 'div', id: 'modalSkin', class: 'modal modal-fixed-footer', elements: [
Expand Down Expand Up @@ -80,6 +81,9 @@ MainPage.prototype.championSelectChange = function() {
this.selectedSkin = 0;
this.appLogic.networkManager.sendChampionSelectChange(champion);
this.skinChange();
var soundSrc = 'assets/sounds/' + champion + '.mp3';
this.championSelectSound.src = soundSrc;
this.championSelectSound.play();
while (this.carouselSkin.hasChildNodes()) {
this.carouselSkin.removeChild(this.carouselSkin.lastChild);
}
Expand Down Expand Up @@ -174,4 +178,4 @@ MainPage.prototype.getDiv = function() {

fs = require('fs');
var ChampionList = JSON.parse(fs.readFileSync('./assets/ChampionList.json'));
var ExtendedChampionsData = JSON.parse(fs.readFileSync('./assets/ExtendedChampionList.json'));
var ExtendedChampionsData = JSON.parse(fs.readFileSync('./assets/ExtendedChampionList.json'));