mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-29 00:23:31 -04:00
fix last commit
This commit is contained in:
parent
f48e15561b
commit
0748f54f87
@ -145,7 +145,8 @@ namespace ClassicalSharp {
|
|||||||
void ScrollHotbar(float deltaPrecise) {
|
void ScrollHotbar(float deltaPrecise) {
|
||||||
Inventory inv = game.Inventory;
|
Inventory inv = game.Inventory;
|
||||||
if (AltDown) {
|
if (AltDown) {
|
||||||
inv.Offset = ScrolledIndex(deltaPrecise, inv.Offset) * Inventory.BlocksPerRow;
|
int index = inv.Offset / Inventory.BlocksPerRow;
|
||||||
|
inv.Offset = ScrolledIndex(deltaPrecise, index) * Inventory.BlocksPerRow;
|
||||||
} else {
|
} else {
|
||||||
inv.SelectedIndex = ScrolledIndex(deltaPrecise, inv.SelectedIndex);
|
inv.SelectedIndex = ScrolledIndex(deltaPrecise, inv.SelectedIndex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user