aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index 181803d..31a9056 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -627,8 +627,11 @@ DONE:
if(SDL_KEY==SDLK_e){
if(heyOhLetsGo == 0){
heyOhLetsGo = loops;
- }else if(loops - heyOhLetsGo >= 5 && !(player->inv->invOpen)){
+ player->inv->mouseSel = false;
+ }
+ if(loops - heyOhLetsGo >= 2 && !(player->inv->invOpen) && !(player->inv->selected)){
player->inv->invHover=true;
+ //heyOhLetsGo = 0;
}
}
break;
@@ -648,8 +651,15 @@ DONE:
player->inv->invHover = false;
heyOhLetsGo = 0;
}else{
- player->inv->invOpening ^= true;
- heyOhLetsGo = 0;
+ if(player->inv->selected == false){
+ player->inv->invOpening ^= true;
+ player->inv->mouseSel = false;
+ heyOhLetsGo = 0;
+ }else{
+ player->inv->selected = false;
+ player->inv->mouseSel = false;
+ heyOhLetsGo = 0;
+ }
}
}
if(SDL_KEY==SDLK_RIGHT){player->inv->sel+=1;}