mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix regression: mouse wheel couldn't scroll from last hotbar item to first
This commit is contained in:
@@ -2402,7 +2402,7 @@ void MinetestApp::processItemSelection(u16 *new_playeritem)
|
|||||||
player->hud_hotbar_itemcount - 1);
|
player->hud_hotbar_itemcount - 1);
|
||||||
|
|
||||||
if (wheel < 0)
|
if (wheel < 0)
|
||||||
*new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : max_item;
|
*new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : 0;
|
||||||
else if (wheel > 0)
|
else if (wheel > 0)
|
||||||
*new_playeritem = *new_playeritem > 0 ? *new_playeritem - 1 : max_item;
|
*new_playeritem = *new_playeritem > 0 ? *new_playeritem - 1 : max_item;
|
||||||
// else wheel == 0
|
// else wheel == 0
|
||||||
|
Reference in New Issue
Block a user