From 8a14d60d2078b4bcdfc789b1b9794e2008979f02 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 1 Mar 2008 21:30:00 +0000 Subject: - screen na vyberanie aren - areny z povodnych tuxancov boli prescriptovane do tuxanci-ng, treba este dopisat teleporty a rury git-svn-id: http://opensvn.csie.org/tuxanci_ng@7 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/widget_button.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widget_button.c') diff --git a/src/widget_button.c b/src/widget_button.c index 940b7bd..1024091 100644 --- a/src/widget_button.c +++ b/src/widget_button.c @@ -52,14 +52,22 @@ void drawWidgetButton(widget_button_t *p) void eventWidgetButton(widget_button_t *p) { + static int time = 0; int x, y; + if( time > 0) + { + time--; + return; + } + getMousePosition(&x, &y); if( x >= p->x && x <= p->x+WIDGET_BUTTON_WIDTH && y >= p->y && y <= p->y+WIDGET_BUTTON_HEIGHT && isMouseClicked() ) { + time = WIDGET_BUTTON_TIME; p->fce_event(p); } } -- cgit v1.2.3