diff --git a/src/buttons.c b/src/buttons.c index 68ea2cd8..c87e6d59 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -5028,14 +5028,26 @@ void Store_brush(int index) void Select_paintbrush(int index) { int x_pos,y_pos; + Paintbrush_shape=Paintbrush[index].Shape; - Paintbrush_width=Paintbrush[index].Width; - Paintbrush_height=Paintbrush[index].Height; - Paintbrush_offset_X=Paintbrush[index].Offset_X; - Paintbrush_offset_Y=Paintbrush[index].Offset_Y; - for (y_pos=0; y_posPAINTBRUSH_WIDTH) + x_off=(Paintbrush_width-PAINTBRUSH_WIDTH)/2; + if (Paintbrush_height>PAINTBRUSH_HEIGHT) + y_off=(Paintbrush_height-PAINTBRUSH_HEIGHT)/2; + + for (y_pos=0; y_pos