Mouse cursor can be hidden, useful on touchscreen devices.
This commit is contained in:
parent
0ade6590f6
commit
839776e2e3
7 changed files with 68 additions and 19 deletions
10
src/cursor.c
10
src/cursor.c
|
|
@ -4,9 +4,9 @@
|
|||
For Tux Paint
|
||||
Bitmapped mouse pointer (cursor)
|
||||
|
||||
Copyright (c) 2002-2006 by Bill Kendrick and others
|
||||
Copyright (c) 2002-2007 by Bill Kendrick and others
|
||||
bill@newbreedsoftware.com
|
||||
http://www.newbreedsoftware.com/tuxpaint/
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - February 18, 2006
|
||||
June 14, 2002 - May 15, 2007
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ SDL_Cursor *cursor_hand, *cursor_arrow, *cursor_watch,
|
|||
*cursor_up, *cursor_down, *cursor_tiny, *cursor_crosshair,
|
||||
*cursor_brush, *cursor_wand, *cursor_insertion, *cursor_rotate;
|
||||
|
||||
int no_fancy_cursors;
|
||||
int no_fancy_cursors, hide_cursor;
|
||||
|
||||
void do_setcursor(SDL_Cursor * c)
|
||||
{
|
||||
|
|
@ -66,7 +66,7 @@ void do_setcursor(SDL_Cursor * c)
|
|||
UNUSED(arrow_bits);
|
||||
UNUSED(arrow_mask_bits);
|
||||
|
||||
if (!no_fancy_cursors)
|
||||
if (!hide_cursor && !no_fancy_cursors)
|
||||
SDL_SetCursor(c);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
For Tux Paint
|
||||
Bitmapped mouse pointer (cursor)
|
||||
|
||||
Copyright (c) 2002-2006 by Bill Kendrick and others
|
||||
Copyright (c) 2002-2007 by Bill Kendrick and others
|
||||
bill@newbreedsoftware.com
|
||||
http://www.newbreedsoftware.com/tuxpaint/
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - February 17, 2006
|
||||
June 14, 2002 - May 15, 2007
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ extern SDL_Cursor *cursor_hand, *cursor_arrow, *cursor_watch,
|
|||
*cursor_up, *cursor_down, *cursor_tiny, *cursor_crosshair,
|
||||
*cursor_brush, *cursor_wand, *cursor_insertion, *cursor_rotate;
|
||||
|
||||
extern int no_fancy_cursors;
|
||||
extern int no_fancy_cursors, hide_cursor;
|
||||
|
||||
void do_setcursor(SDL_Cursor * c);
|
||||
void free_cursor(SDL_Cursor ** cursor);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.\" tuxpaint.1 - 2007.05.14
|
||||
.TH TUXPAINT 1 "14 May 2006" "0.9.17" "Tux Paint"
|
||||
.\" tuxpaint.1 - 2007.05.15
|
||||
.TH TUXPAINT 1 "15 May 2007" "0.9.17" "Tux Paint"
|
||||
.SH NAME
|
||||
tuxpaint -- A drawing program for young children.
|
||||
|
||||
|
|
@ -25,6 +25,7 @@ tuxpaint -- A drawing program for young children.
|
|||
[\-\-nowheelmouse]
|
||||
[\-\-nobuttondistinction]
|
||||
[\-\-nofancycursors]
|
||||
[\-\-hidecursor]
|
||||
[\-\-nooutlines]
|
||||
[\-\-nostamps]
|
||||
[\-\-nostampcontrols]
|
||||
|
|
@ -54,6 +55,7 @@ tuxpaint -- A drawing program for young children.
|
|||
[\-\-wheelmouse]
|
||||
[\-\-buttondistinction]
|
||||
[\-\-fancycursors]
|
||||
[\-\-showcursor]
|
||||
[\-\-outlines]
|
||||
[\-\-stamps]
|
||||
[\-\-stampcontrols]
|
||||
|
|
@ -196,6 +198,11 @@ Disable or enable (default) the 'fancy' mouse pointer shapes in \fITux Paint\fP.
|
|||
While the shapes are larger, and context sensitive, some environments have
|
||||
trouble displaying the mouse pointer, and/or leave 'trails' on the screen.
|
||||
|
||||
.TP 8
|
||||
.B \-\-hidecursor \-\-showcursor
|
||||
Completely hide, or enable (default) the mouse pointer in \fITux Paint\fP.
|
||||
This can be useful on touchscreen devices, such as tablet PCs.
|
||||
|
||||
.TP 8
|
||||
.B \-\-nooutlines \-\-outlines
|
||||
In \fInooutlines\fP mode, much simpler outlines and 'rubber-band' lines are
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - May 14, 2007
|
||||
June 14, 2002 - May 15, 2007
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -108,6 +108,7 @@
|
|||
|
||||
/* Disable fancy cursors in fullscreen mode, to avoid SDL bug: */
|
||||
/* (This bug is still around, as of SDL 1.2.9, October 2005) */
|
||||
/* (Is it still in SDL 1.2.11 in May 2007, though!? -bjk) */
|
||||
#define LARGE_CURSOR_FULLSCREEN_BUG
|
||||
|
||||
// control the color selector
|
||||
|
|
@ -5315,7 +5316,8 @@ static void show_usage(FILE * f, char *prg)
|
|||
" %s [--startblank | --startlast ]\n"
|
||||
" %s [--sound | --nosound] [--quit | --noquit]\n"
|
||||
" %s [--print | --noprint] [--complexshapes | --simpleshapes]\n"
|
||||
" %s [--mixedcase | --uppercase] [--fancycursors | --nofancycursors]\n"
|
||||
" %s [--mixedcase | --uppercase]\n"
|
||||
" %s [--fancycursors | --nofancycursors | --hidecursor ]\n"
|
||||
" %s [--mouse | --keyboard] [--dontgrab | --grab]\n"
|
||||
" %s [--noshortcuts | --shortcuts] [--wheelmouse | --nowheelmouse]\n"
|
||||
" %s [--nobuttondistinction | --buttondistinction ]\n"
|
||||
|
|
@ -5338,7 +5340,7 @@ static void show_usage(FILE * f, char *prg)
|
|||
prg, prg,
|
||||
blank, blank, blank,
|
||||
blank, blank, blank,
|
||||
blank, blank, blank, blank, blank, blank, blank, blank,
|
||||
blank, blank, blank, blank, blank, blank, blank, blank, blank,
|
||||
#ifdef WIN32
|
||||
blank,
|
||||
#endif
|
||||
|
|
@ -6056,9 +6058,11 @@ static void setup(int argc, char *argv[])
|
|||
#ifdef NOKIA_770
|
||||
simple_shapes = 1;
|
||||
no_fancy_cursors = 1;
|
||||
hide_cursor = 1;
|
||||
#else
|
||||
simple_shapes = 0;
|
||||
no_fancy_cursors = 0;
|
||||
hide_cursor = 0;
|
||||
#endif
|
||||
only_uppercase = 0;
|
||||
promptless_save = SAVE_OVER_PROMPT;
|
||||
|
|
@ -6317,6 +6321,14 @@ static void setup(int argc, char *argv[])
|
|||
{
|
||||
no_fancy_cursors = 0;
|
||||
}
|
||||
else if (strcmp(argv[i], "--hidecursor") == 0)
|
||||
{
|
||||
hide_cursor = 1;
|
||||
}
|
||||
else if (strcmp(argv[i], "--showcursor") == 0)
|
||||
{
|
||||
hide_cursor = 0;
|
||||
}
|
||||
else if (strcmp(argv[i], "--saveover") == 0)
|
||||
{
|
||||
promptless_save = SAVE_OVER_ALWAYS;
|
||||
|
|
@ -6883,9 +6895,8 @@ static void setup(int argc, char *argv[])
|
|||
#endif
|
||||
SDL_WM_SetCaption("Tux Paint", "Tux Paint");
|
||||
|
||||
#ifdef NOKIA_770
|
||||
SDL_ShowCursor (SDL_DISABLE);
|
||||
#endif
|
||||
if (hide_cursor)
|
||||
SDL_ShowCursor (SDL_DISABLE);
|
||||
|
||||
|
||||
/* Deal with 'native' screen size option */
|
||||
|
|
@ -15410,6 +15421,15 @@ static void parse_options(FILE * fi)
|
|||
{
|
||||
no_fancy_cursors = 0;
|
||||
}
|
||||
else if (strcmp(str, "hidecursor=yes") == 0)
|
||||
{
|
||||
hide_cursor = 1;
|
||||
}
|
||||
else if (strcmp(str, "hidecursor=no") == 0 ||
|
||||
strcmp(str, "showcursor=yes") == 0)
|
||||
{
|
||||
hide_cursor = 0;
|
||||
}
|
||||
else if (strcmp(str, "uppercase=yes") == 0)
|
||||
{
|
||||
only_uppercase = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue