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

Question - Styling the player with javascript #8

Open
Andrew-J-Larson opened this issue Jul 2, 2023 · 10 comments
Open

Question - Styling the player with javascript #8

Andrew-J-Larson opened this issue Jul 2, 2023 · 10 comments

Comments

@Andrew-J-Larson
Copy link
Contributor

Andrew-J-Larson commented Jul 2, 2023

Is it possible to style the gui player with built in functions?

(if not, I know how I would go about doing this on my own... but I'd rather not)

@jazz-soft
Copy link
Owner

There are no special methods for styling, but you can hack into the code to find the DOM elements and style them.

@Andrew-J-Larson
Copy link
Contributor Author

Andrew-J-Larson commented Jul 2, 2023

There are no special methods for styling, but you can hack into the code to find the DOM elements and style them.

What about on when the buttons change states? That ends up resetting the styles, would I have to programmatically also include style code in each onSpecialEvent?

@Andrew-J-Larson
Copy link
Contributor Author

I've proposed this change, as I feel it would be much easier: #12

@Andrew-J-Larson
Copy link
Contributor Author

Andrew-J-Larson commented Jul 4, 2023

Scratch my original idea, I think I have a better way to solve it. (but keep the code in, since it's good prep work for dynamic button adding)

@Andrew-J-Larson
Copy link
Contributor Author

This is what I was after: #14

@jazz-soft
Copy link
Owner

Please document the use of styling.

@Andrew-J-Larson
Copy link
Contributor Author

Aka. before instantiating anything, one would edit the theme by directly interacting with:

JZZ.gui.Player.theme

After they've made their modifications to it.

Then they could create their midi player element and connect it to the player to be used.

@Andrew-J-Larson
Copy link
Contributor Author

If that's a bit too vague, I'm running on no sleep atm.

@jazz-soft
Copy link
Owner

If you enable styling, wouldn't it be more logical to style individual instances of the player?

@Andrew-J-Larson
Copy link
Contributor Author

Andrew-J-Larson commented Jul 5, 2023 via email

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

No branches or pull requests

2 participants