Show "pipette"-shaped pointer when selecting colors
This commit is contained in:
parent
20c0db88c3
commit
a927f7287b
6 changed files with 39 additions and 8 deletions
|
|
@ -65,6 +65,11 @@ http://www.tuxpaint.org/
|
||||||
+ Closes https://sourceforge.net/p/tuxpaint/feature-requests/212/
|
+ Closes https://sourceforge.net/p/tuxpaint/feature-requests/212/
|
||||||
(h/t Anat Caspi)
|
(h/t Anat Caspi)
|
||||||
|
|
||||||
|
* Improvements to Color Picking:
|
||||||
|
------------------------------
|
||||||
|
* Show a "pipette"-shaped mouse pointer when selecting a
|
||||||
|
color from the color palette, or the picture.
|
||||||
|
|
||||||
* Localization Updates:
|
* Localization Updates:
|
||||||
---------------------
|
---------------------
|
||||||
* Albanian translation
|
* Albanian translation
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
For Tux Paint
|
For Tux Paint
|
||||||
Bitmapped mouse pointer (cursor)
|
Bitmapped mouse pointer (cursor)
|
||||||
|
|
||||||
Copyright (c) 2002-2007 by Bill Kendrick and others
|
Copyright (c) 2002-2022 by Bill Kendrick and others
|
||||||
bill@newbreedsoftware.com
|
bill@newbreedsoftware.com
|
||||||
http://www.tuxpaint.org/
|
http://www.tuxpaint.org/
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
(See COPYING.txt)
|
(See COPYING.txt)
|
||||||
|
|
||||||
June 14, 2002 - May 15, 2007
|
June 14, 2002 - January 25, 2022
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -34,7 +34,8 @@
|
||||||
|
|
||||||
SDL_Cursor *cursor_hand, *cursor_arrow, *cursor_watch,
|
SDL_Cursor *cursor_hand, *cursor_arrow, *cursor_watch,
|
||||||
*cursor_up, *cursor_down, *cursor_tiny, *cursor_crosshair,
|
*cursor_up, *cursor_down, *cursor_tiny, *cursor_crosshair,
|
||||||
*cursor_brush, *cursor_wand, *cursor_insertion, *cursor_rotate;
|
*cursor_brush, *cursor_wand, *cursor_insertion, *cursor_rotate,
|
||||||
|
*cursor_pipette;
|
||||||
|
|
||||||
#ifdef NOKIA_770
|
#ifdef NOKIA_770
|
||||||
int hide_cursor = 1;
|
int hide_cursor = 1;
|
||||||
|
|
|
||||||
10
src/cursor.h
10
src/cursor.h
|
|
@ -4,7 +4,7 @@
|
||||||
For Tux Paint
|
For Tux Paint
|
||||||
Bitmapped mouse pointer (cursor)
|
Bitmapped mouse pointer (cursor)
|
||||||
|
|
||||||
Copyright (c) 2002-2007 by Bill Kendrick and others
|
Copyright (c) 2002-2022 by Bill Kendrick and others
|
||||||
bill@newbreedsoftware.com
|
bill@newbreedsoftware.com
|
||||||
http://www.tuxpaint.org/
|
http://www.tuxpaint.org/
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
(See COPYING.txt)
|
(See COPYING.txt)
|
||||||
|
|
||||||
June 14, 2002 - May 15, 2007
|
June 14, 2002 - January 25, 2022
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -65,9 +65,13 @@
|
||||||
#include "arrow.xbm"
|
#include "arrow.xbm"
|
||||||
#include "arrow-mask.xbm"
|
#include "arrow-mask.xbm"
|
||||||
|
|
||||||
|
#include "pipette.xbm"
|
||||||
|
#include "pipette-mask.xbm"
|
||||||
|
|
||||||
extern SDL_Cursor *cursor_hand, *cursor_arrow, *cursor_watch,
|
extern SDL_Cursor *cursor_hand, *cursor_arrow, *cursor_watch,
|
||||||
*cursor_up, *cursor_down, *cursor_tiny, *cursor_crosshair,
|
*cursor_up, *cursor_down, *cursor_tiny, *cursor_crosshair,
|
||||||
*cursor_brush, *cursor_wand, *cursor_insertion, *cursor_rotate;
|
*cursor_brush, *cursor_wand, *cursor_insertion, *cursor_rotate,
|
||||||
|
*cursor_pipette;
|
||||||
|
|
||||||
extern int no_fancy_cursors, hide_cursor;
|
extern int no_fancy_cursors, hide_cursor;
|
||||||
|
|
||||||
|
|
|
||||||
9
src/mouse/pipette-mask.xbm
Normal file
9
src/mouse/pipette-mask.xbm
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#define pipette_mask_width 23
|
||||||
|
#define pipette_mask_height 23
|
||||||
|
static unsigned char pipette_mask_bits[] = {
|
||||||
|
0x00, 0x00, 0x0f, 0x00, 0x80, 0x1f, 0x00, 0xc0, 0x3f, 0x00, 0xec, 0x7f,
|
||||||
|
0x00, 0xfe, 0x79, 0x00, 0xff, 0x78, 0x80, 0x7f, 0x7c, 0x80, 0x3f, 0x3e,
|
||||||
|
0x00, 0x7f, 0x1f, 0x80, 0xff, 0x0f, 0xc0, 0xf7, 0x07, 0xe0, 0xe3, 0x0f,
|
||||||
|
0xf0, 0xf1, 0x0f, 0xf8, 0xf8, 0x07, 0x7c, 0xfc, 0x03, 0x3e, 0xbe, 0x01,
|
||||||
|
0x1f, 0x1f, 0x00, 0x8f, 0x0f, 0x00, 0xc7, 0x07, 0x00, 0xe7, 0x03, 0x00,
|
||||||
|
0xf8, 0x01, 0x00, 0xf8, 0x00, 0x00, 0x78, 0x00, 0x00 };
|
||||||
9
src/mouse/pipette.xbm
Normal file
9
src/mouse/pipette.xbm
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#define pipette_width 23
|
||||||
|
#define pipette_height 23
|
||||||
|
static unsigned char pipette_bits[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x1f,
|
||||||
|
0x00, 0xc0, 0x19, 0x00, 0xec, 0x18, 0x00, 0x7e, 0x1c, 0x00, 0x3e, 0x0e,
|
||||||
|
0x00, 0x7c, 0x07, 0x00, 0xfe, 0x03, 0x00, 0xf7, 0x01, 0x80, 0xe3, 0x03,
|
||||||
|
0xc0, 0xf1, 0x03, 0xe0, 0xb8, 0x01, 0x70, 0x1c, 0x00, 0x38, 0x0e, 0x00,
|
||||||
|
0x1c, 0x07, 0x00, 0x8c, 0x03, 0x00, 0xc4, 0x01, 0x00, 0xe4, 0x00, 0x00,
|
||||||
|
0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
|
|
@ -14228,6 +14228,7 @@ static void cleanup(void)
|
||||||
free_cursor(&cursor_wand);
|
free_cursor(&cursor_wand);
|
||||||
free_cursor(&cursor_insertion);
|
free_cursor(&cursor_insertion);
|
||||||
free_cursor(&cursor_rotate);
|
free_cursor(&cursor_rotate);
|
||||||
|
free_cursor(&cursor_pipette);
|
||||||
|
|
||||||
for (i = 0; i < NUM_COLORS; i++)
|
for (i = 0; i < NUM_COLORS; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -22145,7 +22146,7 @@ static int do_color_sel(void)
|
||||||
{
|
{
|
||||||
/* Hovering over the colors! */
|
/* Hovering over the colors! */
|
||||||
|
|
||||||
do_setcursor(cursor_hand);
|
do_setcursor(cursor_pipette);
|
||||||
|
|
||||||
|
|
||||||
/* Show a big solid example of the color: */
|
/* Show a big solid example of the color: */
|
||||||
|
|
@ -22583,7 +22584,7 @@ static int do_color_picker(void)
|
||||||
{
|
{
|
||||||
/* Hovering over the colors! */
|
/* Hovering over the colors! */
|
||||||
|
|
||||||
do_setcursor(cursor_hand);
|
do_setcursor(cursor_pipette);
|
||||||
|
|
||||||
|
|
||||||
/* Show a big solid example of the color: */
|
/* Show a big solid example of the color: */
|
||||||
|
|
@ -26129,6 +26130,8 @@ static void setup(void)
|
||||||
|
|
||||||
cursor_hand = get_cursor(hand_bits, hand_mask_bits, hand_width, hand_height, 12 / scale, 1 / scale);
|
cursor_hand = get_cursor(hand_bits, hand_mask_bits, hand_width, hand_height, 12 / scale, 1 / scale);
|
||||||
|
|
||||||
|
cursor_pipette = get_cursor(pipette_bits, pipette_mask_bits, pipette_width, pipette_height, 2 / scale, 20 / scale);
|
||||||
|
|
||||||
cursor_wand = get_cursor(wand_bits, wand_mask_bits, wand_width, wand_height, 4 / scale, 4 / scale);
|
cursor_wand = get_cursor(wand_bits, wand_mask_bits, wand_width, wand_height, 4 / scale, 4 / scale);
|
||||||
|
|
||||||
cursor_insertion = get_cursor(insertion_bits, insertion_mask_bits,
|
cursor_insertion = get_cursor(insertion_bits, insertion_mask_bits,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue