Class TCastleFlashEffect

Unit

Declaration

type TCastleFlashEffect = class(TUIControl)

Description

Fade out, flash, and similar screen effects done by blending screen with given color.

Hierarchy

Overview

Fields

Public nested const DefaultDuration = 0.5;

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
Public procedure Render; override;
Public function Rect: TRectangle; override;
Public procedure GLContextOpen; override;
Public procedure GLContextClose; override;
Public procedure Flash(const AColor: TCastleColor; const ADark: boolean);
Public procedure Reset;

Properties

Published property FullSize: boolean read FFullSize write FFullSize default true;
Published property Width: Cardinal read FWidth write FWidth default 0;
Published property Height: Cardinal read FHeight write FHeight default 0;
Published property Duration: Single read FDuration write FDuration default DefaultDuration;
Published property Image: TCastleImage read FImage write SetImage;
Published property OwnsImage: boolean read FOwnsImage write FOwnsImage default false;

Description

Fields

Public nested const DefaultDuration = 0.5;
 

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
 
Public procedure Render; override;
 
Public function Rect: TRectangle; override;
 
Public procedure GLContextOpen; override;
 
Public procedure GLContextClose; override;
 
Public procedure Flash(const AColor: TCastleColor; const ADark: boolean);
 
Public procedure Reset;
 

Properties

Published property FullSize: boolean read FFullSize write FFullSize default true;

Rectangle where the effect will be drawn.

When FullSize is True (the default), the effect always fills the whole parent (like TCastleWindow or TCastleControl, if you just placed the TCastleFlashEffect on TCastleWindowCustom.Controls or TCastleControlCustom.Controls), and the values of Left, Bottom, Width, Height are ignored.

When FullSize is False, the values of Left, Bottom, Width, Height define the size and position of the rectangle effect.

See also
Rect
Published property Width: Cardinal read FWidth write FWidth default 0;
 
Published property Height: Cardinal read FHeight write FHeight default 0;
 
Published property Duration: Single read FDuration write FDuration default DefaultDuration;
 
Published property Image: TCastleImage read FImage write SetImage;

Set this to non-nil to modulate the color with an image. The image is always stretched to cover our whole size.

Published property OwnsImage: boolean read FOwnsImage write FOwnsImage default false;

Free the Image instance automatically.


Generated by PasDoc 0.15.0.