Class TCastleDesign
Unit
Declaration
type TCastleDesign = class(TCastleUserInterface)
Description
Contents of this user-interface control are loaded from an indicated file (by the URL property).
The file should be in the format created by Castle Game Engine Editor (serialized by CastleComponentSerialize routines) with .castle-user-interface extension.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastleDesign
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property URL: String read FURL write SetURL; |
|
property Stretch: Boolean read GetStretch write SetStretch default true; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
Properties
property URL: String read FURL write SetURL; |
|
Load file with the user interface design. The file should be in the format created by Castle Game Engine Editor (see CastleComponentSerialize unit) with .castle-user-interface extension. Setting this property automatically unloads the previous design, and loads a new one (if the value is <> ''). After loading a design, you can use FindComponent or TComponentHelper.FindRequiredComponent to find the components inside. The owner of the design is this TCastleDesign instance. So e.g. this works: var MyDesign: TCastleDesign; MyButton: TCastleButton; begin MyDesign := TCastleDesign.Create(...); MyDesign.URL := 'castle-data:/my_user_interface.castle-user-interface'; MyButton := MyDesign.FindRequiredComponent('MyButton') as TCastleButton; MyButton.OnClick := ...; end; |
property Stretch: Boolean read GetStretch write SetStretch default true; |
|
Whether the loaded component (from URL) fills the rectangle of this TCastleDesign instance. By default this is You can set this to |
Generated by PasDoc 0.16.0.