Unit CastleUIControls
Description
User interface basic classes: TCastleUserInterface, TCastleContainer.
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Description
Functions and Procedures
function Theme: TCastleTheme; |
Theme that you can customize, used by default by all UI controls.
|
function FallbackTheme: TCastleTheme; |
Fallback (do not change this, ever) theme. Default state of Theme.
|
function OnGLContextOpen: TGLContextEventList; deprecated 'use ApplicationProperties.OnGLContextOpen'; |
Warning: this symbol is deprecated: use ApplicationProperties.OnGLContextOpen
Copyright 2010-2021 Michalis Kamburelis.
This file is part of "Castle Game Engine".
"Castle Game Engine" is free software; see the file COPYING.txt, included in this distribution, for details about the copyright.
"Castle Game Engine" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
—————————————————————————-
|
function OnGLContextClose: TGLContextEventList; deprecated 'use ApplicationProperties.OnGLContextClose'; |
Warning: this symbol is deprecated: use ApplicationProperties.OnGLContextClose |
function IsGLContextOpen: boolean; deprecated 'use ApplicationProperties.IsGLContextOpen'; |
Warning: this symbol is deprecated: use ApplicationProperties.IsGLContextOpen |
Types
TUiUpdateEvent = procedure (const Sender: TCastleUserInterface; const SecondsPassed: Single; var HandleInput: Boolean) of object; |
|
TCastleUserInterfaceChange = (...); |
Things that can cause TCastleUserInterface.VisibleChange notification.
Values
-
chRender: The look of this control changed. This concerns all the things that affect what TCastleUserInterface.Render does.
Note that changing chRectangle implies that the look changed too. So when chRectangle is in Changes, you should always behave like chRender is also in Changes, regardless if it's there or not.
-
chRectangle: The rectangle (size or position) of the control changed. This concerns all the things that affect size or our position inside parent (anchors).
Note that this is not (necessarily) called when the screen position changed just because the parent screen position changed. We only notify when the size or position changed with respect to the parent.
Note that changing chRectangle implies that the look changed too. So when chRectangle is in Changes, you should always behave like chRender is also in Changes, regardless if it's there or not.
-
chCursor
-
chExists
-
chChildren: A (direct) child control was added or removed.
-
chChildrenExists: A (direct) child control TCastleUserInterface.Exists value changed.
|
TPositionRelative = (...) deprecated; |
Warning: this symbol is deprecated.
Position for relative layout of one control in respect to another. Deprecated, rather use cleaner THorizontalPosition and TVerticalPosition.
Values
|
TUIControlPos = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIRectangularControl = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIControl = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIControlSizeable = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
Warning: this symbol is deprecated: use TCastleUserInterface |
TCastleUserInterfaceRect = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
Warning: this symbol is deprecated: use TCastleUserInterface |
TInputListener = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIControlChange = TCastleUserInterfaceChange deprecated 'use TCastleUserInterfaceChange'; |
Warning: this symbol is deprecated: use TCastleUserInterfaceChange |
TUIControlChanges = TCastleUserInterfaceChanges deprecated 'use TCastleUserInterfaceChanges'; |
Warning: this symbol is deprecated: use TCastleUserInterfaceChanges |
TUIControlList = TCastleUserInterfaceList deprecated 'use TCastleUserInterfaceList'; |
Warning: this symbol is deprecated: use TCastleUserInterfaceList |
TUIControlChangeEvent = TCastleUserInterfaceChangeEvent deprecated 'use TCastleUserInterfaceChangeEvent'; |
Warning: this symbol is deprecated: use TCastleUserInterfaceChangeEvent |
TUIContainer = TCastleContainer deprecated 'use TCastleContainer'; |
Warning: this symbol is deprecated: use TCastleContainer |
TThemeImage = (...); |
Type of theme image, use of TCastleTheme.ImagesPersistent.
Values
-
tiPanel
-
tiPanelSeparator
-
tiProgressBar
-
tiProgressFill
-
tiButtonPressed
-
tiButtonDisabled
-
tiButtonFocused
-
tiButtonNormal
-
tiWindow
-
tiScrollbarFrame
-
tiScrollbarSlider
-
tiSlider
-
tiSliderPosition
-
tiLabel
-
tiGroup
-
tiActiveFrame
-
tiTooltip
-
tiTouchCtlInner
-
tiTouchCtlOuter
-
tiTouchCtlFlyInner
-
tiTouchCtlFlyOuter
-
tiCrosshair1
-
tiCrosshair2
-
tiCheckmark
-
tiSquareEmpty
-
tiSquareChecked
-
tiSquarePressedBackground
-
tiDisclosure
-
tiSwitchControl
-
tiSwitchControlFill
-
tiLoading: Image displayed when the application is initializing, during Application.OnInitialize and Window.OnOpen. And TCastleUserInterface.GLContextOpen for all initially present UI controls. This "loading image" is loaded and displayed first, so that user does not see a black screen while the resources are prepared.
It is especially useful on Android, where we can lose the OpenGL context at any moment, as user may switch applications in the middle of the game. When getting back to the application, we need to initiailize some resources, and during this process we also show this image. So this serves as a universal "please wait, we're loading" screen.
You can customize this image, by setting Theme.ImagesPersistent[tiLoading].Image, LoadingBackgroundColor, LoadingTextColor. See https://castle-engine.io/manual_2d_user_interface.php#section_theme for a sample code that sets a theme image.
Note that the customization of this image should be done before Application.OnInitialize has started, so it has to be usually done from the "initialization" section of some unit. And in the "initialization" section of a unit, you cannot load files (doing LoadImage at this point may fail on some Android devices, as we cannot load assets before activity is started). So you can only assign images already available in code — use image-to-pascal tool to convert any image to a Pascal code for this purpose.
-
tiEdit: TCastleEdit frame.
|
Constants
DefaultDpi = 96.0; |
Default value for container's Dpi, as is usually set on desktops.
|
DefaultTooltipDelay = 1.0; |
|
DefaultTooltipDistance = 10; |
|
prLeft = prLow deprecated; |
Warning: this symbol is deprecated. |
prRight = prHigh deprecated; |
Warning: this symbol is deprecated. |
prBottom = prLow deprecated; |
Warning: this symbol is deprecated. |
prTop = prHigh deprecated; |
Warning: this symbol is deprecated. |
Generated by PasDoc 0.16.0.