Castle Game Engine: CastleOnScreenMenu

# Unit CastleOnScreenMenu
Description | Uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables
## Description On-screen menu displayed in OpenGL (TCastleOnScreenMenu). ## Uses Classes CastleVectors CastleGLBitmapFonts CastleControls GL CastleGLUtils CastleUIControls CastleKeysMouse CastleColors CastleGenericLists ## Overview ### Classes, Interfaces, Objects and Records
Name | Description
--- | ---
Object `TRectangle` | 2D rectangle.
Class `TRectangleList` |
Class `TMenuAccessory` | Attachment to a specific menu item of TCastleOnScreenMenu, for example may store a value associated with given menu option, and allow to change it by a slider.
Class `TMenuArgument` | This is TMenuAccessory that will just display additional text (using some different color than Menu.CurrentItemColor) after the menu item.
Class `TMenuBooleanArgument` | This is like TMenuArgument that displays boolean value (as "Yes" or "No").
Class `TMenuSlider` |
Class `TMenuFloatSlider` |
Class `TMenuIntegerSlider` |
Class `TCastleOnScreenMenu` | On-screen menu displayed in OpenGL.
### Functions and Procedures
`procedure Register;`
`function Rectangle(const X0, Y0, Width, Height: Integer): TRectangle;`
### Types
`PRectangle = ˆTRectangle;`
`TPositionRelative = (...);`
### Variables
`property MenuFont: TGLBitmapFontAbstract read GetUIFont write SetUIFont;`
`property SliderFont: TGLBitmapFontAbstract read GetUIFontSmall write SetUIFontSmall;`
## Description ### Functions and Procedures
`procedure Register;`
`function Rectangle(const X0, Y0, Width, Height: Integer): TRectangle;`
### Types
`PRectangle = ˆTRectangle;`
`TPositionRelative = (...);`
How TCastleOnScreenMenu.Position will be interpreted. This type is used for two cases: PositionRelativeMenu: specifies (for X or Y) what point of menu rectangle is affected by Position value. In this case, prLowerBorder means that we want to align left (or bottom) border of the menu rectangle, prMiddle means that we want to align middle of the menu rectangle, prHigherBorder means that we want to align right (or top) border of the menu rectangle. PositionRelativeScreen: somewhat analogous. But specifies relative to which screen edge we align. So prLowerBorder means that we want to align relative to left (or bottom) border of the screen, prMiddle means that we want to align relative to the middle of the screen, prHigherBorder means that we want to align relative to the right (or top) border of the screen. This may sound complicated, but it gives you complete control over the menu position, so that it will look good on all window sizes. In most common examples, both PositionRelativeMenu and PositionRelativeScreen are equal, so If both are prLowerBorder, then Position specifies position of left/lower menu border relative to left/lower screen border. Position should always be >= 0 is such cases, otherwise there is no way for the menu to be completely visible. If both are prMiddle, then the Position (most often just 0, 0 in this case) specifies the shift between screen middle to menu rectangle middle. If Position is zero, then menu is just in the middle of the screen. If both are prHigherBorder, then Position specifies position of right/top menu border relative to right/top screen border. Position should always be <= 0 is such cases, otherwise there is no way for the menu to be completely visible. In TCastleOnScreenMenu.DesignerMode you can see a line connecting the appropriate screen position (from PositionRelativeScreen) to the appropriate menu position (from PositionRelativeMenu) and you can experiment with these settings. ###### Values prLowerBorder: prMiddle: prHigherBorder:
### Variables
`property MenuFont: TGLBitmapFontAbstract read GetUIFont write SetUIFont;`
Warning: this symbol is deprecated. Deprecated names for UIFont and UIFontSmall in CastleControls unit.
`property SliderFont: TGLBitmapFontAbstract read GetUIFontSmall write SetUIFontSmall;`
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13