Skip to content

Commit

Permalink
lower priority of hardcoded key in inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Try committed Jan 29, 2023
1 parent ff635df commit b9f20ee
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions game/ui/inventorymenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,26 +302,11 @@ void InventoryMenu::keyDownEvent(KeyEvent &e) {

processMove(e);

if(e.key==KeyEvent::K_Z) {
lootMode = LootMode::Ten;
takeTimer.start(200);
onTakeStuff();
}
else if(e.key==KeyEvent::K_X) {
lootMode = LootMode::Hundred;
takeTimer.start(200);
onTakeStuff();
}
else if(e.key==KeyEvent::K_Space) {
if(keycodec.tr(e)==KeyCodec::Jump) {
lootMode = LootMode::Stack;
takeTimer.start(200);
onTakeStuff();
}
else if(keycodec.tr(e)==KeyCodec::Jump) {
lootMode = LootMode::Normal;
takeTimer.start(200);
onTakeStuff();
}
else if (keycodec.tr(e)==KeyCodec::ActionGeneric || e.key==KeyEvent::K_Return) {
onItemAction(Item::NSLOT);
}
Expand All @@ -334,6 +319,21 @@ void InventoryMenu::keyDownEvent(KeyEvent &e) {
else if(e.key==KeyEvent::K_ESCAPE || keycodec.tr(e)==KeyCodec::Inventory){
close();
}
else if(e.key==KeyEvent::K_Space) {
lootMode = LootMode::Normal;
takeTimer.start(200);
onTakeStuff();
}
else if(e.key==KeyEvent::K_Z) {
lootMode = LootMode::Ten;
takeTimer.start(200);
onTakeStuff();
}
else if(e.key==KeyEvent::K_X) {
lootMode = LootMode::Hundred;
takeTimer.start(200);
onTakeStuff();
}

adjustScroll();
update();
Expand Down

0 comments on commit b9f20ee

Please sign in to comment.