Castle Game Engine: CastleControls: Class TCastleTheme

# Class TCastleTheme
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleControls ## Declaration `type TCastleTheme = class(TObject)` ## Description Theme for 2D GUI controls. Should only be used through the single global instance Theme. ## Hierarchy TObject TCastleTheme ## Overview ### Fields
| `TooltipTextColor: TCastleColor;`
| `TextColor: TCastleColor;`
| `MessageTextColor: TCastleColor;`
| `MessageInputTextColor: TCastleColor;`
| `BarEmptyColor: TVector3Byte;`
| `BarFilledColor: TVector3Byte;`
| `BackgroundTint: TCastleColor;`
### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure Draw(const Rect: TRectangle; const ImageType: TThemeImage);`
| `procedure Draw(const Rect: TRectangle; const ImageType: TThemeImage; const Color: TCastleColor);`
### Properties
| `property Images[constImageType:TThemeImage]: TCastleImage read GetImages write SetImages;`
| `property OwnsImages[constImageType:TThemeImage]: boolean read GetOwnsImages write SetOwnsImages;`
| `property Corners[constImageType:TThemeImage]: TVector4Integer read GetCorners write SetCorners;`
| `property MessageFont: TCastleFont read FMessageFont write SetMessageFont;`
| `property OwnsMessageFont: boolean read FOwnsMessageFont write FOwnsMessageFont default true;`
## Description ### Fields
| `TooltipTextColor: TCastleColor;`
| `TextColor: TCastleColor;`
| `MessageTextColor: TCastleColor;`
| `MessageInputTextColor: TCastleColor;`
| `BarEmptyColor: TVector3Byte;`
| `BarFilledColor: TVector3Byte;`
| `BackgroundTint: TCastleColor;`
Tint of background image under TCastleDialog. Default is (0.25, 0.25, 0.25, 1), which makes background darker, which helps dialog to stand out.
### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure Draw(const Rect: TRectangle; const ImageType: TThemeImage);`
Draw the selected theme image on screen. If you do not specify a color, white will be used, so image will be displayed as-is. Specifying a color means that image will be multiplied by it, just like for TGLImage.Color.
| `procedure Draw(const Rect: TRectangle; const ImageType: TThemeImage; const Color: TCastleColor);`
### Properties
| `property Images[constImageType:TThemeImage]: TCastleImage read GetImages write SetImages;`
2D GUI images, represented as TCastleImage. Although they all have sensible defaults, you can also change them at any time. Simply create TCastleImage instance (e.g. by LoadImage function) and assign it here. Be sure to adjust also OwnsImages if you want the theme to automatically free the image when it's no longer used. The alpha channel of the image, if any, is automatically correctly used (for alpha test or alpha blending, see TGLImage).
| `property OwnsImages[constImageType:TThemeImage]: boolean read GetOwnsImages write SetOwnsImages;`
| `property Corners[constImageType:TThemeImage]: TVector4Integer read GetCorners write SetCorners;`
`Corners` that determine how image on Images is stretched when drawing by TCastleTheme.Draw method. Together with assigning Images, adjust also this property. It is used for images rendered using TGLImage.Draw3x3, it determines how the image is stretched. The `corners` are specified as 4D vector, order like in CSS: top, right, down, left.
| `property MessageFont: TCastleFont read FMessageFont write SetMessageFont;`
Font used by dialogs. Leave `Nil` to use UIFont.
| `property OwnsMessageFont: boolean read FOwnsMessageFont write FOwnsMessageFont default true;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:09