}
void
-Menu::event(const SDL_Event& event)
+Menu::event(const SDL_Event& ev)
{
- switch(event.type) {
+ switch(ev.type) {
case SDL_MOUSEBUTTONDOWN:
- if(event.button.button == SDL_BUTTON_LEFT)
+ if(ev.button.button == SDL_BUTTON_LEFT)
{
- Vector mouse_pos = Renderer::instance()->to_logical(event.motion.x, event.motion.y);
+ Vector mouse_pos = Renderer::instance()->to_logical(ev.motion.x, ev.motion.y);
int x = int(mouse_pos.x);
int y = int(mouse_pos.y);
case SDL_MOUSEMOTION:
{
- Vector mouse_pos = Renderer::instance()->to_logical(event.motion.x, event.motion.y);
+ Vector mouse_pos = Renderer::instance()->to_logical(ev.motion.x, ev.motion.y);
float x = mouse_pos.x;
float y = mouse_pos.y;