mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-18 04:20:11 -07:00
Fix hotbar not registering 0-9 inputs
This commit is contained in:
parent
e732f7d823
commit
c2e5ddaeda
2 changed files with 13 additions and 7 deletions
|
|
@ -577,7 +577,7 @@ public class MinecraftGLView extends TextureView {
|
|||
int barX = (CallbackBridge.physicalWidth / 2) - (barWidth / 2);
|
||||
if(x < barX || x >= barX + barWidth) return -1;
|
||||
|
||||
return hotbarKeys[((x - barX) / barWidth / 9) % 9];
|
||||
return hotbarKeys[(int) net.kdt.pojavlaunch.utils.MathUtils.map(x, barX, barX + barWidth, 0, 9)];
|
||||
}
|
||||
|
||||
/** Return the size, given the UI scale size */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue