forked from PojavLauncherTeam/PojavLauncher
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix[msa]: Avoid the issue of accounts 404-ing when attempting to log in * Feat[layout_vert]: center screen scrollability * Feat[mouse]: always grab the mouse and use the touchpad as the cursor. * Code[mouse]: change internal function names and use `default` in AbstractTouchpad * Feat[mouse]: scale touchpad mouse speed by 1dp * Fix[mouse]: TOOL_TYPE_MOUSE events handled in both generic motion and touch event handlers * Fix[input]: implement scrolling gestures for touchpads * Fix[msa_fragment]: fix inability to track log-ins in fragment after partial state restoration * Fix[fragment]: only initialize the ROOT transaction if the back stack is empty. * Feat[download]: don't always redowload files with missing hashes * Fix[dialog]: clipboard copies are no longer empty text * Fix[lang]: remove the mention of "email" * Fix: QoL stuff (PojavLauncherTeam#5443) * Tweak: align ram selection to multiples of height * tweak: ignore the notch for portrait devices while in the launcher * tweak(colors): make colors consistent across screens * fix(ui): make click animation consistent * fix(modpack-ui): handle long titles overlapping the source icon * fix:(modrinth-api): offset call is being ignored * fix(modpack-ui): remove keyboard after search * fix(profile-editor): properly consume file selection for custom controls Based from the work of @HopiHopy * Merge conflict fix --------- Co-authored-by: artdeell <[email protected]> Co-authored-by: Mathias Boulay <[email protected]>
- Loading branch information
1 parent
ab5a962
commit a8424c9
Showing
26 changed files
with
391 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 34 additions & 1 deletion
35
...ojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/mouse/AbstractTouchpad.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,39 @@ | ||
package net.kdt.pojavlaunch.customcontrols.mouse; | ||
|
||
public interface AbstractTouchpad { | ||
/** | ||
* Get the supposed display state of the mouse (whether it should be shown when the user is in a GUI) | ||
* Note that this does *not* reflect the actual visibility state of the mouse | ||
* @return current supposed enabled state | ||
*/ | ||
boolean getDisplayState(); | ||
void applyMotionVector(float[] vector); | ||
|
||
/** | ||
* Apply a motion vector to the mouse in form of a two-entry float array. This will move the mouse | ||
* on the screen and send the new cursor position to the game. | ||
* @param vector the array that contains the vector | ||
*/ | ||
default void applyMotionVector(float[] vector) { | ||
applyMotionVector(vector[0], vector[1]); | ||
} | ||
|
||
/** | ||
* Apply a motion vector to the mouse in form of the separate X/Y coordinates. This will move the mouse | ||
* on the screen and send the new cursor position to the game. | ||
* @param x the relative X coordinate of the vector | ||
* @param y the relative Y coordinate for the vector | ||
*/ | ||
void applyMotionVector(float x, float y); | ||
|
||
/** | ||
* Sets the state of the touchpad to "enabled" | ||
* @param supposed if set to true, this will set the supposed display state to enabled but may not | ||
* affect the touchpad until internal conditions are met | ||
* if set to false it will turn the touchpad on regardless of internal conditions | ||
*/ | ||
void enable(boolean supposed); | ||
/** | ||
* Sets the state of the touchpad to "disabled". | ||
*/ | ||
void disable(); | ||
} |
Oops, something went wrong.