Class TCastleTouchControl

Unit

Declaration

type TCastleTouchControl = class(TUIControl)

Description

Touch user interface to navigate in a 3D world. Shows one "lever", that can be moved up/down/left/right, and controls the movement while Walking or Flying.

Usually, this control is created and used through the TCastleWindowTouch properties. There is no need to directly create TCastleTouchControl instance in this case.

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Public procedure Render; override;
Public function Rect: TRectangle; override;
Public function Press(const Event: TInputPressRelease): boolean; override;
Public function Release(const Event: TInputPressRelease): boolean; override;
Public function Motion(const Event: TInputMotion): boolean; override;
Public procedure SetTouchMode(const Value: TCastleTouchCtlMode);
Public procedure GetSensorRotation(var X, Y, Z, Angle: Double);
Public procedure GetSensorTranslation(var X, Y, Z, Length: Double);

Properties

Published property TouchMode: TCastleTouchCtlMode read FTouchMode write SetTouchMode default ctcmWalking;
Published property Position: TCastleTouchPosition read FPosition write SetPosition default tpManual;
Published property Scale: Single read FScale write SetScale default 1;

Description

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public procedure Render; override;
 
Public function Rect: TRectangle; override;

Size of this control, ignoring GetExists.

Public function Press(const Event: TInputPressRelease): boolean; override;
 
Public function Release(const Event: TInputPressRelease): boolean; override;
 
Public function Motion(const Event: TInputMotion): boolean; override;
 
Public procedure SetTouchMode(const Value: TCastleTouchCtlMode);
 
Public procedure GetSensorRotation(var X, Y, Z, Angle: Double);
 
Public procedure GetSensorTranslation(var X, Y, Z, Length: Double);
 

Properties

Published property TouchMode: TCastleTouchCtlMode read FTouchMode write SetTouchMode default ctcmWalking;
 
Published property Position: TCastleTouchPosition read FPosition write SetPosition default tpManual;

Set position of touch control. Right now this simply sets the anchor using TUIControl.HasHorizontalAnchor and friends. Tip: Use TUIContainer.UIScaling to have the anchors automatically scale with screen size.

The size of the control is set to be constant physical size, so it's not affected by TUIContainer.UIScaling, only by TUIContainer.Dpi.

Published property Scale: Single read FScale write SetScale default 1;
 

Generated by PasDoc 0.15.0.