Ignore:
Timestamp:
May 4, 2020, 10:24:23 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/ButtonB.pas

    r165 r184  
    44
    55uses
    6   ButtonBase,
    7   Classes, Graphics, LCLIntf, LCLType;
     6  ButtonBase, Classes, Graphics, LCLIntf, LCLType;
    87
    98type
     
    1312    FMask: TBitmap;
    1413    FIndex: integer;
    15     procedure SetIndex(x: integer);
     14    procedure SetIndex(Text: integer);
    1615  public
    1716    property Mask: TBitmap read FMask write FMask;
     
    2625procedure Register;
    2726
     27
    2828implementation
    2929
     
    3636begin
    3737  inherited Create(aOwner);
    38   ShowHint := true;
     38  ShowHint := True;
    3939  SetBounds(0, 0, 25, 25);
    4040end;
     
    4343begin
    4444  with Canvas do
    45     if FGraphic <> nil then
    46     begin
     45    if FGraphic <> nil then begin
    4746      BitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle, 169,
    4847        243 + 26 * Byte(FDown), SRCCOPY);
    49       if FIndex >= 0 then
    50       begin
     48      if FIndex >= 0 then begin
    5149        BitBlt(Canvas.Handle, 0, 0, 25, 25, FMask.Canvas.Handle,
    5250          1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCAND);
     
    5452          1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCPAINT);
    5553      end
    56     end
    57     else
    58     begin
     54    end else begin
    5955      Brush.Color := $0000FF;
    60       FrameRect(Rect(0, 0, 25, 25))
    61     end
     56      FrameRect(Rect(0, 0, 25, 25));
     57    end;
    6258end;
    6359
    64 procedure TButtonB.SetIndex(x: integer);
     60procedure TButtonB.SetIndex(Text: integer);
    6561begin
    66   if x <> FIndex then
    67   begin
    68     FIndex := x;
    69     Invalidate
    70   end
     62  if Text <> FIndex then begin
     63    FIndex := Text;
     64    Invalidate;
     65  end;
    7166end;
    7267
Note: See TracChangeset for help on using the changeset viewer.