Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

BoazShalev
Copy link

Enables the users to easily create new themes to the game.

@BoazShalev BoazShalev marked this pull request as ready for review August 10, 2023 12:49
@@ -129,3 +129,43 @@ body {
#game {
border: 1px #666 solid;
}


/* The Modal (background) */
Copy link
Member

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);
Copy link
Member

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}`);
Copy link
Member

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)
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants