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

Show item title on cartwall buttons #1

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

Conversation

mbaklor
Copy link

@mbaklor mbaklor commented Mar 14, 2023

I changed cartPlayerStates[cartIndex] to an object containing both the state and the title, and read the title into the SVG directly from there. This was done by using the parameter names directly from the read packet making expansion to add selected cart or artist support very easy.
Changed the element in the SVG from a text element to a textArea to support wrapping for long titles.
Changed the colors in the buttons to match hex codes from within the mairlist color list

While going over the project I replaced some of the keywords etc to be a little more modern js, including const and let instead of var, and using template literals instead of concatenating strings, to make it all more readable and better scoped.

change var to const or let
use template literals instead of concat strings
@tweibert
Copy link
Contributor

Thanks for the PR, @mbaklor!

I wonder if the "title instead of cart number" thing should be configurable? Due to the small font, users might prefer to only have the number on the SD, and read the title from the computer screen.

@mbaklor
Copy link
Author

mbaklor commented Mar 15, 2023

This is actually a good idea, I'll look into implementing it. Would you do it as individual settings for each button or as a global setting for the connection?

@tweibert
Copy link
Contributor

An individual setting would be the most flexible solution, I guess.

@mbaklor
Copy link
Author

mbaklor commented Mar 26, 2023

added the checkbox, I can't seem to get it checked by default, so maybe I need to change the wording to "hide cart title" but it feels counterintuitive so for now I leave it at this.

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.

2 participants