-
Notifications
You must be signed in to change notification settings - Fork 422
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.
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.
Looking at things in their current state, I think I'm fine with the proposed API? Better than nullable values IMHO.
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 |
else | ||
tablet.Value = null; |
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.
what is this change? this removal does not look correct in this context
aside from the above this looks roughly correct, but was there even any testing done here? no changes to test scenes to even add sliders to play with this framework side or anything, so i question whether this was tested to work at all. |
I assumed cross-testing with ppy/osu#31141, which looks to be working well for at least the user. I haven't personally tested, if we can have some minimal framework tests that definitely would be appreciated. |
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".