Double-clicking a palette color to open the palette now requires a time of less than 0.5 seconds between clicks

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@803 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-05-13 18:17:24 +00:00
parent ce812e481d
commit 315a17ae5b
2 changed files with 12 additions and 3 deletions

View File

@@ -274,12 +274,22 @@ void Button_Pal_right_fast(void)
//-------------------- item de la forecolor dans le menu --------------------
void Button_Select_forecolor(void)
{
static long time_click = 0;
long time_previous;
int color=Pick_color_in_palette();
time_previous = time_click;
time_click = SDL_GetTicks();
if (color == Fore_color)
{
// Open palette window
Button_Palette();
// Check if it's a double-click
if (time_click - time_previous < 500)
{
// Open palette window
Button_Palette();
}
}
else if (color!=-1)
{