summaryrefslogtreecommitdiff
path: root/src/widget_button.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-01 21:30:00 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-01 21:30:00 +0000
commit8a14d60d2078b4bcdfc789b1b9794e2008979f02 (patch)
treea6095da867303ec71fed55a952ecd45fc0835417 /src/widget_button.c
parentf5258aed755575c1abf269348e4e335cdcb17a3b (diff)
- 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
Diffstat (limited to 'src/widget_button.c')
-rw-r--r--src/widget_button.c8
1 files changed, 8 insertions, 0 deletions
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);
}
}