Merge branch 'FlamedDogo99:main' into main

This commit is contained in:
radmanplays 2024-05-30 10:36:27 +03:30 committed by GitHub
commit f9a151e051
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View File

@ -8,8 +8,9 @@ To-do
- [ ] Gamepad support
- [ ] Cancel button for file upload
- [ ] Styling for file upload
- [ ] Pick block button
- [ ] Back button for Kiwi browser?
- [ ] Re-orginize button layout
- [ ] Redo the display button functions
Implemented
@ -18,5 +19,5 @@ Implemented
- [x] Custom upload button for files (because safari is a pain with button clicks)
- [x] Fake mousemove events (Allows touch and drag to simulate mouse movement)
- [x] Fake cursor scroll events (Allows scrolling through hotbar and in menus)
- [x] On-screen controls (Movement, block placement/removal, inventory, item dropping, keyboard, and exiting keys)
- [x] On-screen controls (Movement, block placement/removal/picking, inventory, item dropping, keyboard, and exiting keys)
- [x] Styling for html, body, and canvas (So that the canvas doesn't ignore the navigation bars for viewport sizing)

View File

@ -7,7 +7,7 @@
// @license Apache License 2.0 - http://www.apache.org/licenses/
// @match https://eaglercraft.com/mc/*
// @grant none
// @version 1.3
// @version 1.4
// @updateURL https://raw.githubusercontent.com/FlamedDogo99/EaglerMobile/main/eaglermobile.user.js
// @run-at document-start
// ==/UserScript==
@ -335,6 +335,14 @@ function insertCanvasElements() {
breakButton.addEventListener("touchend", function(e){mouseEvent(0, "mouseup", canvas)}, false);
breakButton.addEventListener("touchmove", function(e){e.preventDefault()}, false);
document.body.appendChild(breakButton);
var selectButton = document.createElement('button');
selectButton.id = "hideButton"
selectButton.textContent = "⬚";
selectButton.style.cssText = "right:20vh;bottom:20vh;"
selectButton.addEventListener("touchstart", function(e){mouseEvent(1, "mousedown", canvas)}, false);
selectButton.addEventListener("touchend", function(e){mouseEvent(1, "mouseup", canvas)}, false);
selectButton.addEventListener("touchmove", function(e){e.preventDefault()}, false);
document.body.appendChild(selectButton);
var scrollUpButton = document.createElement('button');
scrollUpButton.id = "hideButton"
scrollUpButton.textContent = "⇨";