#include "globals.h"
#include "button.h"
-timer_type Button::popup_timer;
+Timer Button::popup_timer;
Button::Button(std::string icon_file, std::string ninfo, SDLKey nshortcut, int x, int y, int mw, int mh)
{
- timer_init(&popup_timer,false);
+ popup_timer.init(false);
char filename[1024];
bkgd = NULL;
}
-void Button::change_icon(std::string icon_file, int mw, int mh)
+void Button::change_icon(std::string icon_file, int /*mw*/, int /*mh*/)
{
char filename[1024];
void Button::draw()
{
if(state == BUTTON_HOVER)
- if(!timer_check(&popup_timer))
+ if(!popup_timer.check())
show_info = true;
fillrect(rect.x,rect.y,rect.w,rect.h,75,75,75,200);
}
else if(event.type == SDL_MOUSEMOTION)
{
- timer_start(&popup_timer, 1500);
+ popup_timer.start(1500);
if(show_info)
{