Skip to content

Conversation

@diquoks
Copy link
Contributor

@diquoks diquoks commented Dec 22, 2025

a slightly better version with localisation and code quality

@nagi-desuuu
Copy link

Reminder that this setting should also be in First run setup as well.

Comment on lines 80 to 81
fillMode = config.GetBindable<BackgroundFillMode>(OsuSetting.BackgroundFillMode);
fillMode.BindValueChanged(_ => loadBeatmapBackground(beatmap));
Copy link
Member

Choose a reason for hiding this comment

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

Why is this change handling done here as opposed to inside BeatmapBackground?

Also, we never put BindValueChanged inside BDL methods as it is thread unsafe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's really strange, don't remember why i did this, maybe something didn't work before that

should i use BindValueChanged inside LoadComplete instead?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but also consider not reloading the whole beatmap to update the mode. I think the can be removed and handled exclusively in BeatmapBackground.

{
base.LoadComplete();

fillMode.ValueChanged += _ => updateBackgroundFillMode();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

now, BindValueChanged doesn't seem to work properly during and after playing beatmap
@peppy what could be the reason for this?

2025-12-26.13-53-45.mp4

@peppy peppy self-requested a review December 29, 2025 05:52
@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 29, 2025
peppy
peppy previously approved these changes Dec 29, 2025
@peppy
Copy link
Member

peppy commented Dec 29, 2025

@bdach if you want to give this 5 minutes that would be appreciated, since i changed over 50%.

@diquoks diquoks changed the title Add "Background fill mode" setting Add "Background scale mode" setting Dec 29, 2025
@diquoks
Copy link
Contributor Author

diquoks commented Dec 29, 2025

since i changed over 50%.

didn't want to cause problems, i'm just not very familiar with the codebase yet 🙌

@peppy
Copy link
Member

peppy commented Dec 29, 2025

didn't want to cause problems, i'm just not very familiar with the codebase yet 🙌

it's fine, didn't mean it like that. just a standard practice that we get an extra review in such cases.

@bdach
Copy link
Collaborator

bdach commented Dec 29, 2025

This looks wonky in song select when progressing from main menu:

Screen.Recording.2025-12-29.at.12.12.23.mov

Note left side of screen, where the old background from main menu is visible where the "letterbox" would be until it insta-fades out.

@peppy
Copy link
Member

peppy commented Dec 29, 2025

Right, probably need to invoke some fake letterboxing boxes to fix that, which is going to be less fun.

@pull-request-size pull-request-size bot removed the size/M label Jan 4, 2026
@diquoks diquoks requested a review from peppy January 4, 2026 14:33
this.textureName = textureName;
RelativeSizeAxes = Axes.Both;

AddInternal(Letterbox = new Box
Copy link
Member

Choose a reason for hiding this comment

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

This results in a performance regression, due to overdrawing of layers.

  • Check something like LetterboxOverlay for how this needs to be done.
  • Should not result in any boxes unless required (ie. for fill screen it shouldn't be required).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Background images don't match expected stretch mode for stable users

4 participants