]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fixes for wall
authorClyne Sullivan <tullivan99@gmail.com>
Thu, 3 Dec 2015 20:51:59 +0000 (15:51 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Thu, 3 Dec 2015 20:51:59 +0000 (15:51 -0500)
src/inventory.cpp

index 7761c8c0873b1f436ca3947dca3a5bbae7db661d..4496cdc04e6c8a7d360e1762fbbfbcb96b23be4b 100644 (file)
@@ -164,7 +164,7 @@ void Inventory::draw(void){
                        a++;
                }
        }else if(invHover){
-               static int highlight = 0;
+               static unsigned int highlight = 0;
                std::cout << ui::mouse.x << "," << mouseStart.x  << "," << mouseSel << std::endl;
                if(!mouseSel){
                        mouseStart.x = ui::mouse.x;
@@ -183,7 +183,7 @@ void Inventory::draw(void){
                        }
                        if(ui::mouse.x < mouseStart.x){
                                highlight = (mouseStart.x - ui::mouse.x)/45;
-                               if(highlight<0)highlight=0;
+                               //if(highlight<0)highlight=0;
                                if(SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(SDL_BUTTON_RIGHT)){
                                        sel = highlight;
                                        mouseSel=false;