Added "--nobuttondistinction" option to return Tux Paint to pre-0.9.15

behavior regarding middle and right mouse clicks.
This commit is contained in:
William Kendrick 2005-01-16 09:32:14 +00:00
parent 933fd5d5ea
commit 86fe937dc5
4 changed files with 65 additions and 9 deletions

View file

@ -7,7 +7,7 @@ bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
2005.January.12 (0.9.15)
2005.January.16 (0.9.15)
* Stamp tool improvements:
------------------------
* Greatly improved stamp outlining (to avoid empty rows or columns
@ -103,6 +103,10 @@ http://www.newbreedsoftware.com/tuxpaint/
* Middle and right mouse buttons no longer do anything.
(No reason to teach kids that all the buttons do the same thing!)
Note: This can be disabled (resulting in the old-style support for
all three buttons meaning the same thing) by setting the
"--nobuttondistinction" option.
* If middle or right mouse buttons are clicked too much, a pop-up
appears explaining to click the left button, and includes a small
picture of a mouse with the left button being 'clicked.'

View file

@ -9,7 +9,7 @@
bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
January 9, 2005
January 16, 2005
---------------------------------------------------------------------------
@ -166,6 +166,18 @@ Windows Users
(Normally, the wheel will scroll the selector menu on the
right.)
nobuttondistinction=yes
Prior to Tux Paint 0.9.15, the middle and right buttons on a
mouse could also be used for clicking. In version 0.9.15, it was
changed so that only the left mouse button worked, so as to not
train children to use the wrong button.
However, for children who have trouble with the mouse, this
distinction between the two or three buttons on a mouse can be
disabled (returning Tux Paint to its old behavior) by using this
option.
nofancycursors=yes
This disables the fancy mouse pointer shapes in Tux Paint, and
@ -407,6 +419,7 @@ Windows Users
--grab
--noshortcuts
--nowheelmouse
--nobuttondistinction
--nofancycursors
--nooutlines
--nostamps
@ -436,6 +449,7 @@ Windows Users
--dontgrab
--shortcuts
--wheelmouse
--buttondistinction
--fancycursors
--outlines
--stamps

View file

@ -22,7 +22,7 @@ New Breed Software</p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<a href="http://www.newbreedsoftware.com/tuxpaint/">http://www.newbreedsoftware.com/tuxpaint/</a></p>
<p>January 9, 2005</p>
<p>January 16, 2005</p>
</center>
<hr size=2 noshade>
@ -218,6 +218,18 @@ New Breed Software</p>
(Normally, the wheel will scroll the selector menu on the right.)
</dd>
<dt><code><b>nobuttondistinction=yes</b></code></dt>
<dd>
<p>Prior to Tux&nbsp;Paint 0.9.15, the middle and right buttons on
a mouse could also be used for clicking. In version 0.9.15, it was changed
so that <i>only</i> the left mouse button worked, so as to not train
children to use the wrong button.</p>
<p>However, for children who have trouble with the mouse, this distinction
between the two or three buttons on a mouse can be disabled (returning
Tux&nbsp;Paint to its old behavior) by using this option.</p>
</dd>
<dt><code><b>nofancycursors=yes</b></code></dt>
<dd>
<p>This disables the fancy mouse pointer shapes in Tux&nbsp;Paint,
@ -644,6 +656,7 @@ New Breed Software</p>
--grab<br>
--noshortcuts<br>
--nowheelmouse<br>
--nobuttondistinction<br>
--nofancycursors<br>
--nooutlines<br>
--nostamps<br>
@ -676,6 +689,7 @@ New Breed Software</p>
--dontgrab<br>
--shortcuts<br>
--wheelmouse<br>
--buttondistinction<br>
--fancycursors<br>
--outlines<br>
--stamps<br>

View file

@ -22,12 +22,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - January 14, 2005
June 14, 2002 - January 16, 2005
*/
#define VER_VERSION "0.9.15"
#define VER_DATE "2005-01-14"
#define VER_DATE "2005-01-16"
/* Color depth for Tux Paint to run in, and store canvases in: */
@ -1425,7 +1425,7 @@ static int use_sound, fullscreen, disable_quit, simple_shapes,
wheely, no_fancy_cursors, keymouse, mouse_x, mouse_y,
mousekey_up, mousekey_down, mousekey_left, mousekey_right,
dont_do_xor, use_print_config, dont_load_stamps, noshortcuts,
no_system_fonts,
no_system_fonts, no_button_distinction,
mirrorstamps, disable_stamp_controls, disable_save, ok_to_use_lockfile;
static int starter_mirrored, starter_flipped;
static int recording, playing;
@ -2248,6 +2248,7 @@ static void load_starter(char * img_id);
static SDL_Surface * duplicate_surface(SDL_Surface * orig);
static void mirror_starter(void);
static void flip_starter(void);
int valid_click(Uint8 button);
#ifdef DEBUG
static char * debug_gettext(const char * str);
@ -2757,7 +2758,7 @@ static void mainloop(void)
}
}
else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button == 1)
valid_click(event.button.button))
{
if (HIT(r_tools))
{
@ -6709,6 +6710,7 @@ static void setup(int argc, char * argv[])
dont_do_xor = 0;
keymouse = 0;
wheely = 1;
no_button_distinction = 0;
grab_input = 0;
no_fancy_cursors = 0;
simple_shapes = 0;
@ -6973,6 +6975,10 @@ static void setup(int argc, char * argv[])
{
no_system_fonts = 1;
}
else if (strcmp(argv[i], "--nobuttondistinction") == 0)
{
no_button_distinction = 1;
}
else if (strcmp(argv[i], "--sysfonts") == 0)
{
no_system_fonts = 0;
@ -10722,7 +10728,7 @@ static void do_wait(void)
done = 1;
}
else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button == 1)
valid_click(event.button.button))
{
done = 1;
}
@ -11472,7 +11478,7 @@ static int do_prompt_image_flash(const char * const text, const char * const btn
}
}
else if (event.type == SDL_MOUSEBUTTONDOWN &&
event.button.button == 1)
valid_click(event.button.button))
{
if (event.button.x >= 166 + PROMPTOFFSETX &&
event.button.x < 166 + PROMPTOFFSETX + 48)
@ -14713,6 +14719,15 @@ static void parse_options(FILE * fi)
{
no_system_fonts = 0;
}
else if (strcmp(str, "nobuttondistinction=yes") == 0)
{
no_button_distinction= 1;
}
else if (strcmp(str, "nobuttondistinction=no") == 0 ||
strcmp(str, "buttondistinction=yes") == 0)
{
no_button_distinction= 0;
}
else if (strcmp(str, "nosound=yes") == 0)
{
use_sound = 0;
@ -15179,3 +15194,12 @@ static void flip_starter(void)
}
}
int valid_click(Uint8 button)
{
if (button == 1 ||
((button == 2 || button == 3) && no_button_distinction))
return(1);
else
return(0);
}