-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add "Background scale mode" setting #36111
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
base: master
Are you sure you want to change the base?
Add "Background scale mode" setting #36111
Conversation
|
Reminder that this setting should also be in First run setup as well. |
| fillMode = config.GetBindable<BackgroundFillMode>(OsuSetting.BackgroundFillMode); | ||
| fillMode.BindValueChanged(_ => loadBeatmapBackground(beatmap)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
No one in their right mind would want this.
|
@bdach if you want to give this 5 minutes that would be appreciated, since i changed over 50%. |
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. |
|
This looks wonky in song select when progressing from main menu: Screen.Recording.2025-12-29.at.12.12.23.movNote left side of screen, where the old background from main menu is visible where the "letterbox" would be until it insta-fades out. |
|
Right, probably need to invoke some fake letterboxing boxes to fix that, which is going to be less fun. |
| this.textureName = textureName; | ||
| RelativeSizeAxes = Axes.Both; | ||
|
|
||
| AddInternal(Letterbox = new Box |
There was a problem hiding this comment.
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
LetterboxOverlayfor how this needs to be done. - Should not result in any boxes unless required (ie. for fill screen it shouldn't be required).
a slightly better version with localisation and code quality