Merged buttons 'Grad rectangle' and 'Gradient menu' (issue 107)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@868 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-06-15 19:53:12 +00:00
parent 04ff11c4d9
commit 2189d00ec4
8 changed files with 19 additions and 30 deletions

View File

@ -2073,7 +2073,7 @@ void Button_Gradients(void)
default:
if (Is_shortcut(Key,0x100+BUTTON_HELP))
{
Window_help(BUTTON_GRADMENU, NULL);
Window_help(BUTTON_GRADRECT, NULL);
Key=0;
break;
}
@ -2082,7 +2082,10 @@ void Button_Gradients(void)
while (clicked_button<6);
Close_window();
Unselect_button(BUTTON_GRADMENU);
// The Grad rect operation uses the same button as Grad menu.
if (Current_operation != OPERATION_GRAD_RECTANGLE)
Unselect_button(BUTTON_GRADRECT);
Display_cursor();
Gradient_pixel=Display_pixel;
@ -3804,12 +3807,7 @@ void Effects_off(void)
Stencil_mode=0;
Mask_mode=0;
Sieve_mode=0;
Snap_mode=0;
if (! Windows_open)
{
}
Snap_mode=0;
}
void Transparency_set(byte amount)

View File

@ -271,7 +271,6 @@ enum BUTTON_NUMBERS
BUTTON_CIRCLES,
BUTTON_FILLCIRC,
BUTTON_GRADRECT,
BUTTON_GRADMENU,
BUTTON_SPHERES,
BUTTON_BRUSH,
BUTTON_POLYBRUSH,

View File

@ -75,8 +75,7 @@ char * Menu_tooltip[NB_BUTTONS]=
"Filled rectangles ",
"Empty circles / ellipses",
"Filled circles / ellips.",
"Grad. rectangles ",
"Gradation menu ",
"Grad. rect / Grad. menu ",
"Grad. spheres / ellipses",
"Brush grab. / Restore ",
"Lasso / Restore brush ",
@ -372,6 +371,9 @@ void Select_button(int btn_number,byte click)
// the unselection of all "Tool" buttons.
if (btn_number==BUTTON_ADJUST && click==RIGHT_SIDE)
break;
// Same case with the Grad. Rectangle button.
if (btn_number==BUTTON_GRADRECT && click==RIGHT_SIDE)
break;
// Pour chaque bouton:
for (b=0; b<NB_BUTTONS; b++)
// S'il est de la même famille

View File

@ -153,7 +153,7 @@ static const T_Help_table helptable_help[] =
HELP_LINK ("Polyfill: %s", 0x100+BUTTON_POLYFILL)
HELP_LINK ("Filled polyform: %s", 0x200+BUTTON_POLYFILL)
HELP_LINK ("Gradient rectangle: %s", 0x100+BUTTON_GRADRECT)
HELP_LINK ("Gradation menu: %s", 0x100+BUTTON_GRADMENU)
HELP_LINK ("Gradation menu: %s", 0x200+BUTTON_GRADRECT)
HELP_LINK ("Spheres: %s", 0x100+BUTTON_SPHERES)
HELP_LINK ("Gradient ellipses: %s", 0x200+BUTTON_SPHERES)
HELP_LINK ("Adjust picture: %s", 0x100+BUTTON_ADJUST)
@ -958,6 +958,7 @@ static const T_Help_table helptable_grad_rect[] =
{
HELP_TITLE("GRAD RECTANGLE")
HELP_TEXT ("")
HELP_BOLD ("LEFT CLICK")
HELP_LINK ("(Key:%s)",0x100+BUTTON_GRADRECT)
HELP_TEXT ("")
HELP_TEXT ("Selects the rectangle with gradations as")
@ -978,12 +979,10 @@ static const T_Help_table helptable_grad_rect[] =
HELP_TEXT ("button. You can press SHIFT to enforce your")
HELP_TEXT ("line to be vertical, horizontal, or")
HELP_TEXT ("diagonal.")
};
static const T_Help_table helptable_grad_menu[] =
{
HELP_TITLE("GRAD MENU")
HELP_TEXT ("")
HELP_LINK ("(Key:%s)",0x100+BUTTON_GRADMENU)
HELP_TEXT ("")
HELP_BOLD ("RIGHT CLICK")
HELP_LINK ("(Key:%s)",0x200+BUTTON_GRADRECT)
HELP_TEXT ("")
HELP_TEXT ("Opens a window where you can define the way")
HELP_TEXT ("gradations are processed. The different")
@ -2391,7 +2390,6 @@ T_Help_section Help_section[] =
HELP_TABLE_DECLARATION(helptable_circles)
HELP_TABLE_DECLARATION(helptable_filled_circles)
HELP_TABLE_DECLARATION(helptable_grad_rect)
HELP_TABLE_DECLARATION(helptable_grad_menu)
HELP_TABLE_DECLARATION(helptable_spheres)
HELP_TABLE_DECLARATION(helptable_brush)
HELP_TABLE_DECLARATION(helptable_polybrush)

View File

@ -1231,7 +1231,7 @@ word Ordering[NB_SHORTCUTS]=
0x100+BUTTON_POLYFILL, // Polyfill
0x200+BUTTON_POLYFILL, // Filled polyform
0x100+BUTTON_GRADRECT, // Gradient rectangle
0x100+BUTTON_GRADMENU, // Gradation menu
0x200+BUTTON_GRADRECT, // Gradation menu
0x100+BUTTON_SPHERES, // Spheres
0x200+BUTTON_SPHERES, // Gradient ellipses
0x100+BUTTON_ADJUST, // Adjust picture

14
init.c
View File

@ -920,20 +920,12 @@ void Init_buttons(void)
Init_button(BUTTON_GRADRECT,
85,1,
15,15,
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
Button_Grad_rectangle,Button_Grad_rectangle,
16,16,
BUTTON_SHAPE_RECTANGLE,
Button_Grad_rectangle,Button_Gradients,
Do_nothing,
FAMILY_TOOL);
Init_button(BUTTON_GRADMENU,
86,2,
15,15,
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
Button_Gradients,Button_Gradients,
Do_nothing,
FAMILY_INSTANT);
Init_button(BUTTON_SPHERES,
85,18,
16,16,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB