]> git.lizzy.rs Git - dragonblocks-bedrock.git/blobdiff - src/inventory.cpp
Upload Files
[dragonblocks-bedrock.git] / src / inventory.cpp
index 257b1814546f2c5aa0a20a0b3cda6f36d07a93f7..d87a23aa3fe9efe738d7e245bb34ece23fbde923 100644 (file)
@@ -13,12 +13,18 @@ Inventory::Inventory(){
 Node *Inventory::getSlot(int nr){
        if(nr >= 0 && nr < count)
                return list[nr];
-       return list[0]
+       return NULL
 }
 void Inventory::select(int nr){
        if(nr >= 0 && nr < count)
                selected = nr;
 }
+void Inventory::selectUp(){
+       select(selected - 1);
+}
+void Inventory::selectDown(){
+       select(selected + 1);
+}
 Node *Inventory::getSelectedSlot(){
        return list[selected];
 }