Skip to content
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

[V2.5] Controls Revision #2211

Merged

Conversation

Mathias-Boulay
Copy link
Contributor

Control revision 2.5 aka let's add bugs

Oh boi, time for another small increment in controls usability !
This control revision lays the groundwork of a refactor that is needed in the UI of the launcher as a whole while concentrating on a few issues plaguing the current control scheme.

Frame Perfect Gamepad

Some of you may have noticed that despite ranking an impressive 200fps with your device, the gamepad smoothness was far from top notch.

This is now fully fixed !
The new implementation is now perfectly smooth for 60 fps players, but supports pretty much any refresh rate¹, including VRR (variable refresh rate) displays !

¹ Induces more CPU costs on high refresh rate displays. Still smoooooooth though 😄

Better mouse

Managing the inventory in pojav is a pain in the ass without dedicated buttons in the layout. Did I tell you I don't like adding buttons ?

Better inventory click

The way android dealt with quick taps and double taps were kinda blocking me.
This is best shown in this video

Two things are noticeable here:

  • I can't double-tap to fuse item stacks
  • Quick taps don't put the item in another slot but the item stays hovering instead

By using a fully custom TapDetector, both of those behaviors are now fixed, as shown in this video

Another worthy changelog is the latency that has been reduced by ~2 frames.
Seems like waiting before sending another mouse input was kinda worthless 👀

Better scrolling - 1.13+ compatible !

You read it right, scrolling in more recent versions of minecraft is finally working !
On top of that, it now behaves in a consistent manner, regardless of the screen resolution and size.
A nice video showing it in action

[1.12.2 or lower] Sub-pixel precision

Some devices have a low screen density, either due to the resolution being low or the size.
Thanks to this update, they can now benefit from a better camera granularity 👍

New option: control offsets

Many new devices come with rounded corners and notches of all sorts now. As dumb as it is we have to accommodate for it, and so this new option is born.
Under the settings > control section you can now set an offset in pixels !

It is fully compatible with currently compatible layouts !

Without any offset:
Without

With the full offset:
enter image description here

UI / UX improvements

This PR isn't only about pure controls it seems.

Microsoft accounts version spinner fix

Previously, logging into a Microsoft account would pretty much always reset the selected version to vanilla 1.12.2.
This is now fully fixed.

Streamlined UI

We have quite a few changes in the UI, that aren't complete yet:

  • The head of the account is now shown in the launcher activity
  • Custom controls and install jar file buttons are more accessible
  • The settings screen has been re-arranged into sub-sections to allow for more settings without cluttering too much.
  • The component dealing with the fragment has changed, so scrolling feels a bit different
  • Adding a sub-button to the button drawer doesn't dismiss the dialog anymore !
  • I also broke a few things 😅
    UI_shown

Developer's stuff

For developers, you may want to check out a few new classes made available by this update:

  • The TapDetector class, a simple multipointer implementation to help detect N-taps via multiple methods

  • The ExtraCore and ExtraListener classes. They provide a context independant way to pass basic data across every part of the app, mostly useful for Threads used across activities. It is powerful, but dangerous and will be more used in the UI refactor to avoid context leaks.

Some classes from the old support library are gone, since I upgraded from viewpager to viewpager2.

@ankur60
Copy link

ankur60 commented Nov 6, 2021

Oh Man you are the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants