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 Shuffle button to Jukebox #2392

Open
6 tasks
MandrakeHorse opened this issue Aug 24, 2023 · 4 comments
Open
6 tasks

Add Shuffle button to Jukebox #2392

MandrakeHorse opened this issue Aug 24, 2023 · 4 comments
Labels
enhancement issue type

Comments

@MandrakeHorse
Copy link

What feature or enhancement would you like to add?

Once the ability to define a playlist has been implemented (#2386), a Shuffle feature can be added to the Jukebox.

  • A Shuffle button would appear in the Jukebox, next to the Loop play jukebox button.
  • The button would use a suitable icon - this is conventionally represented with two arrows pointing to the right, swapping over to form a curved X.
  • The button would have a tooltip reading "Shuffle" that appears on hover.
  • When enabled, the remaining tracks in the Jukebox would play in a random order.
  • Once all the shuffled tracks have been played, a new shuffle order would be generated.
  • When disabled, the Jukebox would play tracks in order as normal.

How would this feature benefit the gameplay of CorsixTH?

Players will be able to listen to either the MIDI soundtrack or their custom music in a random order without needing to edit any configuration files or audio filenames.

Was the feature in the original game?

No

What version of CorsixTH are you using?

0.67

Does this feature/enhancement relate to a current problem?

See issue #2386

Additional Information

No response

@MandrakeHorse MandrakeHorse added the enhancement issue type label Aug 24, 2023
@lewri
Copy link
Member

lewri commented Aug 24, 2023

The UI setup currently lacks a seamless addition of a shuffle button. Though I think the jukebox may be a safe candidate for attempting to build it up from scratch maybe with window code.

@MandrakeHorse
Copy link
Author

The Jukebox currently has a "Loop play jukebox" button which simply repeats the current track when enabled (by disabling all the other tracks in the playlist). We could replace this with a shuffle button if we can't add more buttons, but as you've suggested, rewriting the Jukebox from scratch would allow us to keep both buttons and implement future enhancements.

@Alberth289346
Copy link
Contributor

Once all the shuffled tracks have been played, a new shuffle order would be generated.

An edge case to avoid is that the last song of the old and the first song of the new order are the same.

@lewri
Copy link
Member

lewri commented Jan 6, 2024

The UI setup currently lacks a seamless addition of a shuffle button. Though I think the jukebox may be a safe candidate for attempting to build it up from scratch maybe with window code.

A thought from last week was to integrate the open source Material Icons by Google for new UI elements in some areas:
https://fonts.google.com/icons
Trouble is workign on how to get it loaded into the game, current code isn't written ready to load this on the fly.

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

No branches or pull requests

3 participants