Changeset 521 for GraphicTest/Packages/bgrabitmap/bgraspritegl.pas
- Timestamp:
- Apr 17, 2019, 12:58:41 AM (5 years ago)
- Location:
- GraphicTest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest
- Property svn:ignore
-
old new 8 8 GraphicTest.lps 9 9 GraphicTest.dbg 10 heaptrclog.trc
-
- Property svn:ignore
-
GraphicTest/Packages/bgrabitmap/bgraspritegl.pas
r494 r521 32 32 function GetLayer: Integer; virtual; abstract; 33 33 function GetLocation: TPointF; virtual; 34 function GetVisible: Boolean; virtual; 34 35 function GetW: Single; virtual; abstract; 35 36 function GetX: Single; virtual; abstract; … … 46 47 procedure SetLocation(AValue: TPointF); virtual; 47 48 procedure SetW(AValue: Single); virtual; abstract; 49 procedure SetVisible({%H-}AValue: boolean); virtual; 48 50 procedure SetX(AValue: Single); virtual; abstract; 49 51 procedure SetY(AValue: Single); virtual; abstract; … … 54 56 destructor Destroy; override; 55 57 procedure OnDraw; virtual; 56 procedure OnElapse( AElapsedMs: integer); virtual;58 procedure OnElapse({%H-}AElapsedMs: integer); virtual; 57 59 procedure OnTimer; virtual; 58 60 procedure QueryDestroy; virtual; abstract; … … 71 73 property HorizontalAlign: TAlignment read GetHorizontalAlign write SetHorizontalAlign; 72 74 property VerticalAlign: TTextLayout read GetVerticalAlign write SetVerticalAlign; 75 property Visible : Boolean read GetVisible write SetVisible; 73 76 property Texture : IBGLTexture read GetTexture; 74 77 property Handle : Pointer read GetHandle; … … 86 89 FQueryDestroy: boolean; 87 90 FLayer: integer; 91 FHidden: boolean; 88 92 function GetHorizontalAlign: TAlignment; override; 89 93 function GetVerticalAlign: TTextLayout; override; … … 97 101 function GetH: Single; override; 98 102 function GetLayer: Integer; override; 103 function GetVisible: Boolean; override; 99 104 function GetW: Single; override; 100 105 function GetX: Single; override; … … 107 112 procedure SetH(AValue: Single); override; 108 113 procedure SetLayer(AValue: Integer); override; 114 procedure SetVisible(AValue: boolean); override; 109 115 procedure SetW(AValue: Single); override; 110 116 procedure SetX(AValue: Single); override; … … 342 348 end; 343 349 350 function TBGLDefaultSprite.GetVisible: Boolean; 351 begin 352 Result:= not FHidden; 353 end; 354 344 355 function TBGLDefaultSprite.GetW: Single; 345 356 begin … … 390 401 begin 391 402 FLayer:= AValue; 403 end; 404 405 procedure TBGLDefaultSprite.SetVisible(AValue: boolean); 406 begin 407 FHidden := not AValue; 392 408 end; 393 409 … … 487 503 end; 488 504 505 function TBGLCustomSprite.GetVisible: Boolean; 506 begin 507 result := true; 508 end; 509 489 510 procedure TBGLCustomSprite.SetLocation(AValue: TPointF); 490 511 begin 491 512 X := AValue.X; 492 513 Y := AValue.Y; 514 end; 515 516 procedure TBGLCustomSprite.SetVisible(AValue: boolean); 517 begin 518 raise ENotImplemented.Create('Not implemented in base class'); 493 519 end; 494 520 … … 536 562 var NumFrame: integer; 537 563 begin 538 if Texture <> nilthen564 if Visible and (Texture <> nil) then 539 565 begin 540 566 NumFrame := Trunc(Frame+0.5);
Note:
See TracChangeset
for help on using the changeset viewer.