-
Notifications
You must be signed in to change notification settings - Fork 421
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
Expose tablet OutputSize #6460
base: master
Are you sure you want to change the base?
Expose tablet OutputSize #6460
Conversation
@@ -38,6 +38,8 @@ public class OpenTabletDriverHandler : InputHandler, IAbsolutePointer, IRelative | |||
|
|||
public Bindable<Vector2> AreaSize { get; } = new Bindable<Vector2>(); | |||
|
|||
public Bindable<Vector2> OutputSize { get; } = new Bindable<Vector2>(); |
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.
Not sold on this API design. I'd say this should be nullable, and if the output size is null, then it is presumed that the output area is the whole window (which would fall back to the old logic). Curious of other thoughts on this though @ppy/team-client
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.
OutputAreaSize
now has a default value of Vector2(1f, 1f)
. So it behaves correctly on first launch.
OutputAreaPosition
does not have a default value, but it's unused until the scaling mode is changed, at which point it will have been populated. I could give it a default of Vector2(0.5f, 0.5f)
if that would be preferable.
I'm also open to making them nullable if that would be better.
Seems like a duplicate of #6166? |
That's a good catch. I can close this and instead use #6166 as a base for ppy/osu#31141 if that would be preferable. Their PR is more complete as it also includes the output position, which may be useful for future configurability. |
…een-scaling-tablet-output # Conflicts: # osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs # osu.Framework/Input/Handlers/Tablet/OpenTabletDriverHandler.cs
…een-scaling-tablet-output # Conflicts: # osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs # osu.Framework/Input/Handlers/Tablet/OpenTabletDriverHandler.cs
… screen-scaling-tablet-output # Conflicts: # osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs
#6166 is too outdated to work off of directly due to conflicts with osu.Game. So I've:
Apologies, this has made the commit history a little messy. I can rebase if desired, but I'll leave it as-is for now since |
Resolves #6150
Related to ppy/osu#12098
Required by ppy/osu#31141
Description
Exposes new bindables
OutputAreaSize
andOutputAreaPosition
, so thatabsoluteOutputMode.Output
can be updated from osu.Game. This is used by ppy/osu#31141 to scale the tablet output when screen scaling is set to "Everything".