From: Clyne Sullivan Date: Thu, 3 Dec 2015 20:51:59 +0000 (-0500) Subject: fixes for wall X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=67803d1c1ef1bb96a6cdfdfecba943378e0ec5d1;p=clyne%2Fgamedev.git fixes for wall --- diff --git a/src/inventory.cpp b/src/inventory.cpp index 7761c8c..4496cdc 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -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;