Fixed the button areas being too large

This commit is contained in:
Anna Rose 2011-07-06 15:06:23 -04:00
parent 735a9dfcef
commit 78409c80d7
2 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@
#include "debug.h" #include "debug.h"
#include "itos.h" #include "itos.h"
#include <SDL.h> #include <SDL.h>
using std::pair;
Game::Game(stack<GameState*>* state_stack, SDL_Surface* display) Game::Game(stack<GameState*>* state_stack, SDL_Surface* display)
: GameState(state_stack, display) : GameState(state_stack, display)

View File

@ -71,7 +71,7 @@ void MenuButton::render(SDL_Surface* display)
bool MenuButton::is_at(int test_x, int test_y) bool MenuButton::is_at(int test_x, int test_y)
{ {
if (!visible) return false; if (!visible) return false;
return test_x >= x && test_y >= y && test_x <= x + 100 && test_y <= y + 40; return test_x > x && test_y > y && test_x < x + 80 && test_y < y + 20;
} }