Skip to content

Commit 815cadf

Browse files
committed
Open inventory with mouse wheel
1 parent 3e2353b commit 815cadf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

blade-engine/src/com/bladecoder/engine/ui/SceneScreen.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,16 @@ public boolean keyTyped(char character) {
217217

218218
return false;
219219
}
220+
221+
@Override
222+
public boolean scrolled (int amount) {
223+
if(amount > 0 && inventoryUI.isVisible())
224+
inventoryUI.hide();
225+
else if(amount < 0 && !inventoryUI.isVisible())
226+
inventoryUI.show();
227+
228+
return true;
229+
}
220230
};
221231

222232
public SceneScreen() {

0 commit comments

Comments
 (0)