aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-12-03 09:29:34 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-12-03 09:29:34 -0500
commit8a2f08dc35632a9a8e5272a629e0b4770d567c3a (patch)
treea58dd9f26094d7cac7710180f3848d393ac507c5 /src/ui.cpp
parentbf91141782766f3648b62c6d96528fddb9ae7447 (diff)
New inventory highlight system
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;}