-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add theme support #474
base: master
Are you sure you want to change the base?
Add theme support #474
Conversation
@@ -129,3 +129,43 @@ body { | |||
#game { | |||
border: 1px #666 solid; | |||
} | |||
|
|||
|
|||
/* The Modal (background) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need all this styles if we import the bootstrap library, but I don't see this commit in this PR.
this.sound = new Sound("res/soundtrack/Nyan_Cat.ogg"); | ||
this.sound = new Sound(`res/themes/${theme}/soundtrack/soundtrack.ogg`); | ||
|
||
console.log(this.theme); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug code
|
||
$( "#theme" ).on( "change", function() { | ||
var theme = $( "#theme").val(); | ||
window.location.replace(`http://127.0.0.1:8880/?theme=${theme}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't use 127.0.0.1, you need to extract the URL from the browser. Use window.location.href
to get the current URL instead.
this.effect = new Audio(); | ||
this.effect.src = "res/points_effects.mpeg"; | ||
this.players = state.players; | ||
console.log(state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug code,
And, if I remember correctly, this part didn't work as expected.
Enables the users to easily create new themes to the game.