|
Atrinik Client 2.5
|
00001 /************************************************************************ 00002 * Atrinik, a Multiplayer Online Role Playing Game * 00003 * * 00004 * Copyright (C) 2009-2011 Alex Tokar and Atrinik Development Team * 00005 * * 00006 * Fork from Daimonin (Massive Multiplayer Online Role Playing Game) * 00007 * and Crossfire (Multiplayer game for X-windows). * 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 * This program is distributed in the hope that it will be useful, * 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00017 * GNU General Public License for more details. * 00018 * * 00019 * You should have received a copy of the GNU General Public License * 00020 * along with this program; if not, write to the Free Software * 00021 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00022 * * 00023 * The author can be reached at admin@atrinik.org * 00024 ************************************************************************/ 00025 00030 #ifndef BUTTON_H 00031 #define BUTTON_H 00032 00034 #define BUTTON_MOUSE_OVER(button, mx, my, sprite) ((mx) >= (button)->x && (mx) < (button)->x + (sprite)->bitmap->w && (my) >= (button)->y && (my) < (button)->y + (sprite)->bitmap->h) 00035 00036 #define BUTTON_TOOLTIP_DELAY 750 00037 00039 typedef struct button_struct 00040 { 00042 int x; 00043 00045 int y; 00046 00048 int bitmap; 00049 00053 int bitmap_over; 00054 00058 int bitmap_pressed; 00059 00061 int font; 00062 00064 uint64 flags; 00065 00067 const char *color; 00068 00070 const char *color_shadow; 00071 00073 const char *color_over; 00074 00076 const char *color_over_shadow; 00077 00079 int mouse_over; 00080 00082 int pressed; 00083 00085 int disabled; 00086 00088 uint32 pressed_ticks; 00089 00091 uint32 hover_ticks; 00092 00094 uint32 pressed_repeat_ticks; 00095 00099 void (*repeat_func)(struct button_struct *button); 00100 } button_struct; 00101 00102 #endif
1.7.4