Class TCastleCrosshair
Unit
Declaration
type TCastleCrosshair = class(TCastleUserInterface)
Description
Display a simple crosshair in the middle of the parent control.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastleCrosshair
Overview
Fields
nested const DefaultSize = 16.0; |
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure Render; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property Color: TCastleColor read FColor write SetColor; |
|
property Shape: TCastleCrosshairShape read FShape write SetShape default csCross; |
|
property HorizontalAnchorSelf default hpMiddle; |
|
property HorizontalAnchorParent default hpMiddle; |
|
property VerticalAnchorSelf default vpMiddle; |
|
property VerticalAnchorParent default vpMiddle; |
|
property Width default DefaultSize; |
|
property Height default DefaultSize; |
|
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
Description
Fields
nested const DefaultSize = 16.0; |
|
This item has no description. |
Methods
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure Render; override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.Render. Render a control. Called only when Exists and render context is initialized. Do not call this method. It will be automatically called by the engine when needed. It will be called when UI is part of TCastleContainer.Controls list or rendered (e.g. for off-screen rendering) by TCastleContainer.RenderControl. You should only override this method. See https://castle-engine.io/manual_2d_ui_custom_drawn.php for examples what you can put here. You can depend on some OpenGL state being set before calling this method. You can depend on it being set, and you can carelessly change it. This state we set:
Beware that GLSL RenderContext.CurrentProgram has undefined value when this is called. You should always set it, before making direct OpenGL drawing calls (all the engine drawing routines do it already, this is only a concern if you make direct OpenGL / OpenGLES calls). |
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
This item has no description. Showing description inherited from TCastleComponent.PropertySections. Section where to show property in the editor. |
Properties
property Color: TCastleColor read FColor write SetColor; |
|
Color tint of the crosshair. This simply multiplies the crosshair RGBA image. By default this is opaque white. |
property Shape: TCastleCrosshairShape read FShape write SetShape default csCross; |
|
This item has no description. |
property HorizontalAnchorSelf default hpMiddle; |
|
By default, crosshair is centered. |
property HorizontalAnchorParent default hpMiddle; |
|
This item has no description. Showing description inherited from TCastleUserInterface.HorizontalAnchorParent. Which parent border is aligned to our HorizontalAnchorSelf border. |
property VerticalAnchorSelf default vpMiddle; |
|
This item has no description. Showing description inherited from TCastleUserInterface.VerticalAnchorSelf. Which our border to align with parent. |
property VerticalAnchorParent default vpMiddle; |
|
This item has no description. Showing description inherited from TCastleUserInterface.VerticalAnchorParent. Which parent border is aligned to our VerticalAnchorSelf border. |
property Width default DefaultSize; |
|
This item has no description. Showing description inherited from TCastleUserInterface.Width. These properties determine the control size. See the EffectiveRect documentation for details how the size is calculated.
|
property Height default DefaultSize; |
|
This item has no description. |
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
|
Color that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Color directly. See also
|
Generated by PasDoc 0.16.0-snapshot.