Add a distinctive icon for the fill (and color replace) tool.

Thanks to DawnBringer for icon drawing.
All skins use the same icon, feel free to draw something else for them.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1893 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2012-01-08 20:44:05 +00:00
parent 5a8d016691
commit 781cda3a47
12 changed files with 21 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -40,9 +40,9 @@
#define NB_ZOOM_FACTORS 15 ///< Number of zoom levels available in the magnifier.
#define MENU_WIDTH 254 ///< Width of the menu (not counting the palette)
#define MENU_HEIGHT 44 ///< Height of the menu.
#define NB_CURSOR_SPRITES 8 ///< Number of available mouse cursor sprites.
#define CURSOR_SPRITE_WIDTH 15 ///< Width of a mouse cursor sprite.
#define CURSOR_SPRITE_HEIGHT 15 ///< Height of a mouse cursor sprite.
#define NB_CURSOR_SPRITES 9 ///< Number of available mouse cursor sprites.
#define CURSOR_SPRITE_WIDTH 16 ///< Width of a mouse cursor sprite.
#define CURSOR_SPRITE_HEIGHT 16 ///< Height of a mouse cursor sprite.
#define MENU_SPRITE_WIDTH 16 ///< Width of a menu sprite in pixels
#define MENU_SPRITE_HEIGHT 16 ///< Height of a menu sprite in pixels
#define EFFECT_SPRITE_WIDTH 14 ///< Width of an effect sprite in pixels
@ -187,17 +187,21 @@ enum BUTTON_SHAPES
/// The different "mouse cursor" shapes
enum CURSOR_SHAPES
{
// Sprite based cursors first (also used as index in cursor sprite array)
CURSOR_SHAPE_ARROW,
CURSOR_SHAPE_TARGET, ///< This one uses the paintbrush
CURSOR_SHAPE_COLORPICKER, ///< This one uses the paintbrush
CURSOR_SHAPE_COLORPICKER,
CURSOR_SHAPE_HOURGLASS,
CURSOR_SHAPE_MULTIDIRECTIONAL,
CURSOR_SHAPE_HORIZONTAL,
CURSOR_SHAPE_THIN_TARGET, ///< This one uses the paintbrush
CURSOR_SHAPE_THIN_COLORPICKER, ///< This one uses the paintbrush
CURSOR_SHAPE_BUCKET,
// XOR/runtime-generated cursors last
CURSOR_SHAPE_XOR_TARGET,
CURSOR_SHAPE_XOR_RECTANGLE,
CURSOR_SHAPE_XOR_ROTATION
CURSOR_SHAPE_XOR_ROTATION,
};
/// The different shapes that can be used as a paintbrush (paintbrush types go in the beginning)

View File

@ -887,8 +887,8 @@ GFX2_GLOBAL T_Brush_template Brush_container[BRUSH_CONTAINER_COLUMNS*BRUSH_CONTA
CURSOR_SHAPE_XOR_TARGET , // Filled circle
CURSOR_SHAPE_XOR_TARGET , // Empty ellipse
CURSOR_SHAPE_XOR_TARGET , // Filled ellipse
CURSOR_SHAPE_TARGET , // Fill
CURSOR_SHAPE_TARGET , // Color replacer
CURSOR_SHAPE_BUCKET , // Fill
CURSOR_SHAPE_BUCKET , // Color replacer
CURSOR_SHAPE_XOR_TARGET , // Rectangular brush grabbing
CURSOR_SHAPE_TARGET , // Polygonal brush grabbing
CURSOR_SHAPE_COLORPICKER , // Colorpicker

View File

@ -267,7 +267,7 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
int char_2=0; // grands titres de l'aide. Chaque indice avance dans
int char_3=0; // l'une des fontes dans l'ordre : 1 2
int char_4=0; // 3 4
byte mouse_cursor_area[29][29];
byte mouse_cursor_area[31][29];
SDL_Palette * SDLPal;
// Default palette
@ -475,12 +475,12 @@ byte Parse_skin(SDL_Surface * gui, T_Gui_skin *gfx)
if (GUI_seek_right(gui, &cursor_x, cursor_y, neutral_color, "mouse cursor"))
return 1;
}
if (Read_GUI_block(gfx, gui, cursor_x, cursor_y, mouse_cursor_area, 29, 29, "mouse cursor",1))
if (Read_GUI_block(gfx, gui, cursor_x, cursor_y, mouse_cursor_area, 29, 31, "mouse cursor",1))
return 1;
Center_GUI_cursor(gfx, (byte *)mouse_cursor_area,i);
cursor_x+=29;
}
cursor_y+=29;
cursor_y+=31;
// Menu sprites
for (i=0; i<NB_MENU_SPRITES; i++)

View File

@ -2086,6 +2086,7 @@ void Display_cursor(void)
case CURSOR_SHAPE_MULTIDIRECTIONAL :
case CURSOR_SHAPE_HORIZONTAL :
case CURSOR_SHAPE_BUCKET :
if (Cursor_hidden)
break;
@ -2093,11 +2094,11 @@ void Display_cursor(void)
case CURSOR_SHAPE_HOURGLASS :
start_x=Mouse_X-Gfx->Cursor_offset_X[shape];
start_y=Mouse_Y-Gfx->Cursor_offset_Y[shape];
for (y_pos=start_y,counter_y=0;counter_y<15;y_pos++,counter_y++)
for (y_pos=start_y,counter_y=0;counter_y<CURSOR_SPRITE_HEIGHT;y_pos++,counter_y++)
{
if(y_pos<0) continue;
if(y_pos>=Screen_height) break;
for (x_pos=start_x,counter_x=0;counter_x<15;x_pos++,counter_x++)
for (x_pos=start_x,counter_x=0;counter_x<CURSOR_SPRITE_WIDTH;x_pos++,counter_x++)
{
if(x_pos<0) continue;
if(x_pos>=Screen_width) break;
@ -2384,6 +2385,7 @@ void Hide_cursor(void)
case CURSOR_SHAPE_MULTIDIRECTIONAL :
case CURSOR_SHAPE_HORIZONTAL :
case CURSOR_SHAPE_BUCKET :
if (Cursor_hidden)
break;
@ -2392,11 +2394,11 @@ void Hide_cursor(void)
start_x=Mouse_X-Gfx->Cursor_offset_X[shape];
start_y=Mouse_Y-Gfx->Cursor_offset_Y[shape];
for (y_pos=start_y,counter_y=0;counter_y<15;y_pos++,counter_y++)
for (y_pos=start_y,counter_y=0;counter_y<CURSOR_SPRITE_HEIGHT;y_pos++,counter_y++)
{
if(y_pos<0) continue;
if(y_pos>=Screen_height) break;
for (x_pos=start_x,counter_x=0;counter_x<15;x_pos++,counter_x++)
for (x_pos=start_x,counter_x=0;counter_x<CURSOR_SPRITE_WIDTH;x_pos++,counter_x++)
{
if(x_pos<0) continue;
if(x_pos>=Screen_width) break;