Skip to content

Conversation

@Gunoshozo
Copy link
Contributor

@Gunoshozo Gunoshozo commented Jan 4, 2026

CHLCC: Menus Polish

Sound:

  • Add scrollbar support
  • Add click support for switching playback mode
  • Fix misaligned elements ("Select ***" text and Menu Title text mostly) and animations

Tips:

  • Start with right page
  • Fix sprites bounds

Sound, Movie, CG:

  • Add "Select ***" animation based on the Tip's menu "Select Word" animation

Sound, Movie, CG, Save/Load:

  • Simplify sprite loading for "Select ***" in .lua

Tips, Save/Load, Title, Sound, Movie, CG:

  • Use one implementation for all "Select ***" animation (via composition)

Backlog, Clear, Tips, Save/Load, Title, Sound, Movie, CG, Options, Trophy:

  • Use one implementation for "Show Menu" animation taken from Options menu (via composition)

Bonus:

  • Shave off 16 bytes of every Animation (Widget has Animation field)
  • Shave off 8 bytes of every Menu

@Gunoshozo Gunoshozo marked this pull request as draft January 4, 2026 15:42
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch 4 times, most recently from 58069c9 to 7702594 Compare January 7, 2026 18:19
@Gunoshozo Gunoshozo changed the title CHLCC: Music menu Polish CHLCC: Menus Polish Jan 7, 2026
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch from 7702594 to ebd724c Compare January 9, 2026 17:45
@Enorovan Enorovan linked an issue Jan 9, 2026 that may be closed by this pull request
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch from ebd724c to 619487d Compare January 10, 2026 16:15
@Gunoshozo Gunoshozo marked this pull request as ready for review January 10, 2026 16:18
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch from 619487d to 62a0164 Compare January 11, 2026 23:19
@Enorovan Enorovan added the game-chlcc CHAOS;HEAD Love Chu☆Chu! label Jan 12, 2026
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch from 62a0164 to fd5dda1 Compare January 14, 2026 17:10
Sound:
- Add scrollbar support
- Add click support for switching playback mode
- Fix misaligned elements and animations

Tips:
- Start with right page
- Fix sprites bounds

System Messages:
- Fix 1px sprite gap for a button

Sound, Movie, CG:
- Add "Select ***" animation based on the Tip's menu "Select Word" animation

Sound, Movie, CG, Save/Load:
- Simplify sprite loading for "Select ***" in .lua

Tips, Save/Load, Title, Sound, Movie, CG:
- Use one implementation for all "Select ***" animation (via composition)

Backlog, Clear, Tips, Save/Load, Title, Sound, Movie, CG, Options, Trophy:
- Use one implementation for "Show Menu" animation taken from Options menu (via composition)

Bonus:
- Shave off 16 bytes of every Animation (Widget has Animation field)
- Shave off 8 bytes of every Menu
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch from fd5dda1 to 6a771bf Compare January 14, 2026 17:29
Copy link
Member

@Enorovan Enorovan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Select Animations sure are better and the missing inputs in Sound Menu work

Copy link
Collaborator

@KKhanhH KKhanhH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the behavioral changes for the music menu scrolling? Do cross input interactions work well, like scrollbar partial scroll then switch to kb/gamepad, backing out and in from a partial scroll, scroll hold, etc


class Scrollbar : public Widget {
public:
Scrollbar() {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do = default

inline uint8_t ButterflyFrameCount;
inline float ButterflyFlapFrameDuration;
inline float ButterflyFadeDuration;
inline float MenuSelectPromptDuration;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These would be much better suited in a common menu profile file but thats not in yet so I'll let it slide

class SelectPromptAnimation : public Animation {
public:
SelectPromptAnimation();
void Draw(const std::span<const Sprite> sprites,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont make function arguments value const in header files

SelectWordPos = GetMemberVector<glm::vec2>("SelectWordPos");
SelectWordDuration = EnsureGetMember<float>("SelectWordDuration");
SelectWordInterval = EnsureGetMember<float>("SelectWordInterval");
assert(SelectWordSprites.size() == SelectWordPos.size());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we throw an exception or something if this asserts false, its in the init stages anyway so might as well catch it rather than bug out in releases

SelectMenuHeader = GetMemberVector<Sprite>("SelectMenuSprites");
SelectMenuHeaderPositions =
GetMemberVector<glm::vec2>("SelectMenuTextPositions");
assert(SelectMenuHeader.size() == SelectMenuHeaderPositions.size());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

GetMemberArray<Sprite>(SelectMovie, 11, "SelectMovie");
GetMemberArray<glm::vec2>(SelectMoviePos, 11, "SelectMoviePos");
SelectMovie = GetMemberVector<Sprite>("SelectMovie");
SelectMoviePos = GetMemberVector<glm::vec2>("SelectMoviePos");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one doesn't have a check

GetMemberArray<Sprite>(SelectData, 10, "SelectData");
GetMemberArray<glm::vec2>(SelectDataPos, 10, "SelectDataPos");
SelectDataSprites = GetMemberVector<Sprite>("SelectDataSprites");
SelectDataPos = GetMemberVector<glm::vec2>("SelectDataPos");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one also has no check

using namespace Impacto::Vm::Interface;

constexpr bool isRepeatOne(MusicPlaybackMode playbackMode) {
return to_underlying(playbackMode) &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could overload operators for & and ^, then wouldn't need a specialty function or spam to_underlying everywhere

MenuTransition.SetDuration(MenuTransitionDuration);
void MusicMenu::ToggleRepeatMode() {
PlaybackMode =
(MusicPlaybackMode)(to_underlying(PlaybackMode) ^
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ^= work?


// adjusts sprite height to prevent visual bug tied to mouse support (1px of
// out of bounds highlight sprite can be visible)
TrackHighlight.Bounds = TrackHighlight.Bounds.ScaleAroundCenter(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This modifies a profile sprite, can you instead modify the trackbutton code?

@Gunoshozo Gunoshozo self-assigned this Jan 16, 2026
@Gunoshozo Gunoshozo force-pushed the chlcc/music-menu-polish branch from 5c7c532 to 4846e24 Compare January 17, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

game-chlcc CHAOS;HEAD Love Chu☆Chu!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix multiplat input in Library Menus

5 participants