Class TCastleTheme
Unit
CastleControls
Declaration
type TCastleTheme = class(TObject)
Description
Theme for 2D GUI controls. Should only be used through the single global instance Theme.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
BackgroundColor: TCastleColor; |
Color layer displayed between modal dialogs (CastleMessages, CastleDialogStates, TGLModeFrozenScreen) and their background (state underneath or a screenshot). Default is (0, 0, 0, 0.25), making things underneath darker, which helps dialog to stand out.
|
 |
BackgroundOpaqueColor: TCastleColorRGB; |
Color used instead of BackgroundColor when InternalForceOpaqueBackground is used. You can only customize the RGB values, alpha is always 1, so the resulting color is always opaque. It's a dark gray color (0.33, 0.33, 0.33) by default.
|
 |
LoadingBackgroundColor: TCastleColor; |
Colors used when displaying the "Loading..." text when Android application is resuming. Note that you can also customize the tiLoading image. By default, LoadingBackgroundColor is black, and LoadingTextColor is white.
|
 |
LoadingTextColor: TCastleColor; |
Colors used when displaying the "Loading..." text when Android application is resuming. Note that you can also customize the tiLoading image. By default, LoadingBackgroundColor is black, and LoadingTextColor is white.
|
 |
LoadingImageForWindowHeight: Single; |
For what window height was the Images[tiLoading] prepared. If you set Images[tiLoading], then most likely you will want to set it too. The rendered size of Images[tiLoading] is adjusted, looking at actual window height and this property.
Note that when rendering Images[tiLoading], TCastleApplication.OnInitialize is not run, so Container.UIScaling is usually not initialized yet. That's why we instead do this special scaling approach for Images[tiLoading].
By default this is 1000.
|
 |
MinimumScrollbarSliderHeight: Single; |
Minumum scrollbar height, to be comfortably visible and draggable.
|
 |
DefaultLabelWhite: Boolean deprecated 'if you want the labels to be white, adjust TCastleLabel.Color to White after creating every TCastleLabel'; |
Warning: this symbol is deprecated: if you want the labels to be white, adjust TCastleLabel.Color to White after creating every TCastleLabel |
Methods
 |
constructor Create; |
|
 |
destructor Destroy; override; |
|
 |
procedure Draw(const Rect: TFloatRectangle; const ImageType: TThemeImage; const UIScale: Single = 1.0); |
Draw the selected theme image on screen.
Parameters
- Color
- Color tint of the image. 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 TDrawableImage.Color.
- UIScale
- Used to properly scale corners, passed to TDrawableImage.ScaleCorners. This parameter does not scale the place where image is displayed, to do this just scale the given Rect parameter yourself.
|
 |
procedure DialogsLight; |
Set dialogs theme to light.
|
Properties
 |
property Images[const ImageType: TThemeImage]: TCastleImage read GetImages write SetImages; deprecated 'use ImagesPersistent[...].Image'; |
Warning: this symbol is deprecated: use ImagesPersistent[...].Image
Theme 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 TDrawableImage).
|
 |
property OwnsImages[const ImageType: TThemeImage]: boolean read GetOwnsImages write SetOwnsImages; deprecated 'use ImagesPersistent[...].OwnsImage'; |
Warning: this symbol is deprecated: use ImagesPersistent[...].OwnsImage |
 |
property Corners[const ImageType: TThemeImage]: TVector4 read GetCorners write SetCorners; deprecated 'use ImagesPersistent[...].ProtectedSides'; |
Warning: this symbol is deprecated: use ImagesPersistent[...].ProtectedSides
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 TDrawableImage.Draw3x3, it determines how the image is stretched. The corners are specified as 4D vector, order like in CSS: top, right, down, left.
|
 |
property OwnsMessageFont: boolean
read FOwnsMessageFont write FOwnsMessageFont default true; |
|
Generated by PasDoc 0.16.0.