Skip to content

Implement chat ticker#37608

Open
curoviyxru wants to merge 12 commits intoppy:masterfrom
curoviyxru:chat-ticker
Open

Implement chat ticker#37608
curoviyxru wants to merge 12 commits intoppy:masterfrom
curoviyxru:chat-ticker

Conversation

@curoviyxru
Copy link
Copy Markdown
Contributor

@curoviyxru curoviyxru commented May 2, 2026

Closes #5117.

My only concern is off-screen text rendering of long messages because ChatLine's text flow doesn't have single line mode or trimming functionality. Probably shouldn't worry too much about it when messages are limited by length server-side.

Changes

  • Added chat ticker drawable
  • Added chat ticker related tests to TestSceneChatTicker and TestSceneMessageNotifier
  • Added MuteSounds property to OsuClickableContainer to remove unwanted sounds from DrawableChatUsername
  • Added chat ticker property to settings and chat overlay like in stable

Demo video

2026-05-02.15-57-16.mp4

Comment thread osu.Game/OsuGame.cs Fixed
Comment thread osu.Game/OsuGame.cs Outdated
loadComponentSingleFile<IDialogOverlay>(new DialogOverlay(), topMostOverlayContent.Add, true);
loadComponentSingleFile(new MedalOverlay(), topMostOverlayContent.Add);

loadComponentSingleFile(fpsCounter = new FPSCounter
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To make FPS counter draw above chat ticker (and everything else) in topMostOverlayContent container.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change you've made changes the load order of the counter, which may not be what we want.

Comment thread osu.Game/Overlays/Chat/ChatLine.cs Outdated

protected virtual float UsernameWidth => 150;

protected virtual bool UsernameIsClickable => true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use ctor init variable not virtual.

Comment on lines +201 to +202
Enabled = { Value = UsernameIsClickable },
MuteSounds = { Value = !UsernameIsClickable },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm very confused by this. Why not just use Enabled for the muting of sounds?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because Enabled set to false has disabled sound.

sampleClickDisabled = audio.Samples.Get($@"UI/{SampleSet.GetDescription()}-select-disabled")

Maybe this should be implemented some other way.

Colour = colourProvider.Background4,
}
},
new OsuCheckbox
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove this.

Comment thread osu.Game/Overlays/ChatTicker.cs Outdated
Comment on lines +63 to +64
State.Value = Visibility.Visible;
this.FadeOutFromOne(10000).OnComplete(_ => State.Value = Visibility.Hidden);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What on earth is this visibility changing? The only time visibility state should be changed is if the component is enabled or disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat ticker

3 participants