Fixed the button areas being too large
This commit is contained in:
parent
735a9dfcef
commit
78409c80d7
1
game.cpp
1
game.cpp
|
@ -4,7 +4,6 @@
|
|||
#include "debug.h"
|
||||
#include "itos.h"
|
||||
#include <SDL.h>
|
||||
using std::pair;
|
||||
|
||||
Game::Game(stack<GameState*>* state_stack, SDL_Surface* display)
|
||||
: GameState(state_stack, display)
|
||||
|
|
|
@ -71,7 +71,7 @@ void MenuButton::render(SDL_Surface* display)
|
|||
bool MenuButton::is_at(int test_x, int test_y)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user