- Timestamp:
- May 4, 2020, 10:24:23 PM (5 years ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/Area.pas
r165 r184 26 26 begin 27 27 inherited; 28 Enabled := false;29 ShowHint := true;28 Enabled := False; 29 ShowHint := True; 30 30 end; 31 31 … … 36 36 begin 37 37 Brush.Color := $FF0000; 38 FrameRect(Rect(0, 0, width, height));38 FrameRect(Rect(0, 0, Width, Height)); 39 39 end; 40 40 end; -
trunk/Packages/CevoComponents/ButtonA.pas
r165 r184 4 4 5 5 uses 6 ButtonBase, 7 Classes, Graphics, LCLIntf, LCLType; 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType; 8 7 9 8 type … … 12 11 private 13 12 FCaption: string; 14 procedure SetCaption( x: string);15 procedure SetFont(const x: TFont);13 procedure SetCaption(Text: string); 14 procedure SetFont(const Font: TFont); 16 15 published 17 16 property Visible; … … 25 24 26 25 procedure Register; 26 27 27 28 28 implementation … … 58 58 end; 59 59 60 procedure TButtonA.SetCaption( x: string);60 procedure TButtonA.SetCaption(Text: string); 61 61 begin 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; 67 66 end; 68 67 69 procedure TButtonA.SetFont(const x: TFont);68 procedure TButtonA.SetFont(const Font: TFont); 70 69 begin 71 Canvas.Font.Assign( x);70 Canvas.Font.Assign(Font); 72 71 Canvas.Font.Color := $000000; 73 72 end; -
trunk/Packages/CevoComponents/ButtonB.pas
r165 r184 4 4 5 5 uses 6 ButtonBase, 7 Classes, Graphics, LCLIntf, LCLType; 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType; 8 7 9 8 type … … 13 12 FMask: TBitmap; 14 13 FIndex: integer; 15 procedure SetIndex( x: integer);14 procedure SetIndex(Text: integer); 16 15 public 17 16 property Mask: TBitmap read FMask write FMask; … … 26 25 procedure Register; 27 26 27 28 28 implementation 29 29 … … 36 36 begin 37 37 inherited Create(aOwner); 38 ShowHint := true;38 ShowHint := True; 39 39 SetBounds(0, 0, 25, 25); 40 40 end; … … 43 43 begin 44 44 with Canvas do 45 if FGraphic <> nil then 46 begin 45 if FGraphic <> nil then begin 47 46 BitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle, 169, 48 47 243 + 26 * Byte(FDown), SRCCOPY); 49 if FIndex >= 0 then 50 begin 48 if FIndex >= 0 then begin 51 49 BitBlt(Canvas.Handle, 0, 0, 25, 25, FMask.Canvas.Handle, 52 50 1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCAND); … … 54 52 1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCPAINT); 55 53 end 56 end 57 else 58 begin 54 end else begin 59 55 Brush.Color := $0000FF; 60 FrameRect(Rect(0, 0, 25, 25)) 61 end 56 FrameRect(Rect(0, 0, 25, 25)); 57 end; 62 58 end; 63 59 64 procedure TButtonB.SetIndex( x: integer);60 procedure TButtonB.SetIndex(Text: integer); 65 61 begin 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; 71 66 end; 72 67 -
trunk/Packages/CevoComponents/ButtonC.pas
r165 r184 4 4 5 5 uses 6 ButtonBase, 7 Classes, Graphics, LCLIntf, LCLType; 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType; 8 7 9 8 type … … 12 11 private 13 12 FIndex: Integer; 14 procedure SetIndex( x: Integer);13 procedure SetIndex(Text: Integer); 15 14 published 16 15 property Visible; … … 47 46 Brush.Color := $0000FF; 48 47 FrameRect(Rect(0, 0, 12, 12)) 49 end 48 end; 50 49 end; 51 50 52 procedure TButtonC.SetIndex( x: integer);51 procedure TButtonC.SetIndex(Text: integer); 53 52 begin 54 if x<> FIndex then53 if Text <> FIndex then 55 54 begin 56 FIndex := x;55 FIndex := Text; 57 56 Invalidate; 58 57 end; -
trunk/Packages/CevoComponents/ButtonN.pas
r165 r184 70 70 BitBlt(Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle, 71 71 195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT); 72 end 72 end; 73 73 end; 74 74 MoveTo(0, 41); … … 79 79 LineTo(41, 41); 80 80 LineTo(0, 41); 81 end 81 end; 82 82 end; 83 83 … … 86 86 begin 87 87 if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then 88 ChangeProc(Self) 88 ChangeProc(Self); 89 89 end; 90 90 … … 98 98 else 99 99 Hint := ''; 100 Invalidate 101 end 100 Invalidate; 101 end; 102 102 end; 103 103 … … 107 107 begin 108 108 FLit := x; 109 Invalidate 110 end 109 Invalidate; 110 end; 111 111 end; 112 112 … … 120 120 else 121 121 BackIndex := 0; 122 Invalidate 123 end 122 Invalidate; 123 end; 124 124 end; 125 125 … … 131 131 if FPossible then 132 132 Hint := x; 133 end 133 end; 134 134 end; 135 135 -
trunk/Packages/CevoComponents/EOTButton.pas
r165 r184 14 14 15 15 type 16 // EndOfTurn button 16 17 TEOTButton = class(TButtonBase) 17 18 public … … 138 139 Brush.Color := $0000FF; 139 140 FrameRect(Rect(0, 0, 48, 48)) 140 end 141 end; 141 142 end; 142 143 … … 146 147 begin 147 148 FIndex := x; 148 Invalidate 149 end 149 Invalidate; 150 end; 150 151 end; 151 152 … … 158 159 Paint 159 160 except 160 end 161 end 161 end; 162 end; 162 163 end; 163 164
Note:
See TracChangeset
for help on using the changeset viewer.