Only mouse button 1 works for clicking. 2 and 3 (middle/right) are ignored.

This commit is contained in:
William Kendrick 2005-01-14 09:16:40 +00:00
parent 9f1416c1ec
commit 28f9f83230
2 changed files with 8 additions and 9 deletions

View file

@ -100,6 +100,9 @@ http://www.newbreedsoftware.com/tuxpaint/
* Interface improvements: * Interface improvements:
----------------------- -----------------------
* Middle and right mouse buttons no longer do anything.
(No reason to teach kids that all the buttons do the same thing!)
* Thumbnail of selected image now shown on "Erase this image?" * Thumbnail of selected image now shown on "Erase this image?"
confirmation pop-up. confirmation pop-up.

View file

@ -2758,9 +2758,8 @@ static void mainloop(void)
} }
} }
} }
else if ((event.type == SDL_MOUSEBUTTONDOWN && else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button >= 1 && event.button.button == 1)
event.button.button <= 3))
{ {
if (HIT(r_tools)) if (HIT(r_tools))
{ {
@ -10569,8 +10568,7 @@ static void do_wait(void)
done = 1; done = 1;
} }
else if (event.type == SDL_MOUSEBUTTONDOWN && else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button >= 1 && event.button.button == 1)
event.button.button <= 3)
{ {
done = 1; done = 1;
} }
@ -11309,8 +11307,7 @@ static int do_prompt_image(const char * const text, const char * const btn_yes,
} }
} }
else if (event.type == SDL_MOUSEBUTTONDOWN && else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button >= 1 && event.button.button == 1)
event.button.button <= 3)
{ {
if (event.button.x >= 166 + PROMPTOFFSETX && if (event.button.x >= 166 + PROMPTOFFSETX &&
event.button.x < 166 + PROMPTOFFSETX + 48) event.button.x < 166 + PROMPTOFFSETX + 48)
@ -13057,8 +13054,7 @@ static int do_open(int want_new_tool)
} }
} }
else if (event.type == SDL_MOUSEBUTTONDOWN && else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button >= 1 && event.button.button >= 1)
event.button.button <= 3)
{ {
if (event.button.x >= 96 && event.button.x < WINDOW_WIDTH - 96 && if (event.button.x >= 96 && event.button.x < WINDOW_WIDTH - 96 &&
event.button.y >= 24 && event.button.y >= 24 &&