FMX.Gui3d Sample
From RAD Studio XE2 Code Examples
(Redirected from Gui3d Sample)
This sample illustrates how to create a basic graphical user interface (GUI) using a FireMonkey 3D animation.
Contents |
Location
You can find the gui3d sample project at:
- Start > Programs > Embarcadero RAD Studio XE2 > Samples and then navigate to FireMonkey\gui3d
- Subversion Repository for Delphi: http://radstudiodemos.svn.sourceforge.net/viewvc/radstudiodemos/branches/RadStudio_XE2/FireMonkey/gui3d/
Description
This application uses a button, a panel, and an animation indicator on a TLayer3D and animates it to create a 3D effect.
How to Use the Sample
- Navigate to Start > Programs > Embarcadero RAD Studio XE2 > Samples and open gui3d.dproj.
- Press F9 or choose Run > Run. To make the TLayer3D rotate around an axis, press the Flip button.
Classes
FireMonkey 3D Gui represents the main window of the sample. It contains the following components:
- A TLayer3D
- A TButton
- A TAniIndicator
- A TPanel containing a TLabel
- A TStyleBook
- A TRectAnimation
Implementation
- The TAniIndicator, the TButton, and the TPanel are subordinated to the TLayer3D. The TPanel contains a TLabel holding technical information about the implementation.
- Additional to the TLayer3D, the main form contains a TStyleBook object and a TRectAnimation.
- When the user presses the Flip button, the layer rotates, creating a 3D effect. The rotation axis is established as being the greater of the vertical or the horizontal axis of the form.
Uses
- FMX.Layers3D.TLayer3D
- FMX.Controls.TButton
- FMX.Controls.TAniIndicator
- FMX.Controls.TPanel
- FMX.Controls.TLabel
- FMX.Types.TStyleBook
- FMX.Ani.TRectAnimation