Changeset 184


Ignore:
Timestamp:
May 4, 2020, 10:24:23 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Code formatting.
Location:
trunk/Packages/CevoComponents
Files:
6 edited

Legend:

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

    r165 r184  
    2626begin
    2727  inherited;
    28   Enabled := false;
    29   ShowHint := true;
     28  Enabled := False;
     29  ShowHint := True;
    3030end;
    3131
     
    3636      begin
    3737        Brush.Color := $FF0000;
    38         FrameRect(Rect(0, 0, width, height));
     38        FrameRect(Rect(0, 0, Width, Height));
    3939      end;
    4040end;
  • trunk/Packages/CevoComponents/ButtonA.pas

    r165 r184  
    44
    55uses
    6   ButtonBase,
    7   Classes, Graphics, LCLIntf, LCLType;
     6  ButtonBase, Classes, Graphics, LCLIntf, LCLType;
    87
    98type
     
    1211  private
    1312    FCaption: string;
    14     procedure SetCaption(x: string);
    15     procedure SetFont(const x: TFont);
     13    procedure SetCaption(Text: string);
     14    procedure SetFont(const Font: TFont);
    1615  published
    1716    property Visible;
     
    2524
    2625procedure Register;
     26
    2727
    2828implementation
     
    5858end;
    5959
    60 procedure TButtonA.SetCaption(x: string);
     60procedure TButtonA.SetCaption(Text: string);
    6161begin
    62   if x <> FCaption then
    63   begin
    64     FCaption := x;
    65     Invalidate
    66   end
     62  if Text <> FCaption then begin
     63    FCaption := Text;
     64    Invalidate;
     65  end;
    6766end;
    6867
    69 procedure TButtonA.SetFont(const x: TFont);
     68procedure TButtonA.SetFont(const Font: TFont);
    7069begin
    71   Canvas.Font.Assign(x);
     70  Canvas.Font.Assign(Font);
    7271  Canvas.Font.Color := $000000;
    7372end;
  • 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
  • trunk/Packages/CevoComponents/ButtonC.pas

    r165 r184  
    44
    55uses
    6   ButtonBase,
    7   Classes, Graphics, LCLIntf, LCLType;
     6  ButtonBase, Classes, Graphics, LCLIntf, LCLType;
    87
    98type
     
    1211  private
    1312    FIndex: Integer;
    14     procedure SetIndex(x: Integer);
     13    procedure SetIndex(Text: Integer);
    1514  published
    1615    property Visible;
     
    4746      Brush.Color := $0000FF;
    4847      FrameRect(Rect(0, 0, 12, 12))
    49     end
     48    end;
    5049end;
    5150
    52 procedure TButtonC.SetIndex(x: integer);
     51procedure TButtonC.SetIndex(Text: integer);
    5352begin
    54   if x <> FIndex then
     53  if Text <> FIndex then
    5554  begin
    56     FIndex := x;
     55    FIndex := Text;
    5756    Invalidate;
    5857  end;
  • trunk/Packages/CevoComponents/ButtonN.pas

    r165 r184  
    7070        BitBlt(Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle,
    7171          195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT);
    72       end
     72      end;
    7373    end;
    7474    MoveTo(0, 41);
     
    7979    LineTo(41, 41);
    8080    LineTo(0, 41);
    81   end
     81  end;
    8282end;
    8383
     
    8686begin
    8787  if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then
    88     ChangeProc(Self)
     88    ChangeProc(Self);
    8989end;
    9090
     
    9898    else
    9999      Hint := '';
    100     Invalidate
    101   end
     100    Invalidate;
     101  end;
    102102end;
    103103
     
    107107  begin
    108108    FLit := x;
    109     Invalidate
    110   end
     109    Invalidate;
     110  end;
    111111end;
    112112
     
    120120    else
    121121      BackIndex := 0;
    122     Invalidate
    123   end
     122    Invalidate;
     123  end;
    124124end;
    125125
     
    131131    if FPossible then
    132132      Hint := x;
    133   end
     133  end;
    134134end;
    135135
  • trunk/Packages/CevoComponents/EOTButton.pas

    r165 r184  
    1414
    1515type
     16  // EndOfTurn button
    1617  TEOTButton = class(TButtonBase)
    1718  public
     
    138139      Brush.Color := $0000FF;
    139140      FrameRect(Rect(0, 0, 48, 48))
    140     end
     141    end;
    141142end;
    142143
     
    146147  begin
    147148    FIndex := x;
    148     Invalidate
    149   end
     149    Invalidate;
     150  end;
    150151end;
    151152
     
    158159      Paint
    159160    except
    160     end
    161   end
     161    end;
     162  end;
    162163end;
    163164
Note: See TracChangeset for help on using the changeset viewer.