Class TCastleWindowTouch

Unit

Declaration

type TCastleWindowTouch = class(TCastleWindow)

Description

Full-featured window for rendering (see TCastleWindow) with optional touch controls, to provide a 3D navigation comfortable on touch devices (phones, tablets and such).

In addition to all the goodies of the TCastleWindow functionality, this class can additionally manage one or two TCastleTouchControl instances. They will be automatically positioned in the bottom-left and bottom-right corners of the screen, and will allow the user to navigate using the default SceneManager.Camera. In the simplest case, just set AutomaticTouchInterface to True, and the touch controls will automatically adjust to the current navigation type of the camera (examine, walk, fly...).

Hierarchy

Overview

Fields

Public internal const DefaultAutomaticWalkTouchCtl = tiCtlWalkDragRotate;

Methods

Public constructor Create(AOwner: TComponent); override;
Protected procedure NavigationInfoChanged; override;
Protected procedure DoUpdate; override;

Properties

Public property TouchInterface: TTouchInterface read FTouchInterface write SetTouchInterface;
Published property AutomaticTouchInterface: boolean read FAutomaticTouchInterface write SetAutomaticTouchInterface default false;
Published property AutomaticWalkTouchCtl: TTouchInterface read FAutomaticWalkTouchCtl write SetAutomaticWalkTouchCtl default DefaultAutomaticWalkTouchCtl;

Description

Fields

Public internal const DefaultAutomaticWalkTouchCtl = tiCtlWalkDragRotate;
 

Methods

Public constructor Create(AOwner: TComponent); override;
 
Protected procedure NavigationInfoChanged; override;
 
Protected procedure DoUpdate; override;
 

Properties

Public property TouchInterface: TTouchInterface read FTouchInterface write SetTouchInterface;

Configure touch controls to be displayed on the window. This automatically manages under the hood 0, 1 or 2 TCastleTouchControl instances, placing them at suitable positions and handling their operations.

Note that you can set AutomaticTouchInterface = True to have this property automatically adjusted. (In which case you should not set this directly.)

Published property AutomaticTouchInterface: boolean read FAutomaticTouchInterface write SetAutomaticTouchInterface default false;

Automatically adjust TouchInterface (showing / hiding proper touch controls) based on the current navigation type. The navigation type is obtained from the camera of the default viewport, see TCastleWindow.NavigationType.

Published property AutomaticWalkTouchCtl: TTouchInterface read FAutomaticWalkTouchCtl write SetAutomaticWalkTouchCtl default DefaultAutomaticWalkTouchCtl;

When using AutomaticTouchInterface = True, which touch interface should be used when walking (since there are multiple sensible choices). Select between tiCtlWalkCtlRotate or tiCtlWalkDragRotate (default).


Generated by PasDoc 0.15.0.