Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Unit CastleOnScreenMenu
Description
On-screen menu displayed in OpenGL (TCastleOnScreenMenu).
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Variables
Description
Functions and Procedures
function Rectangle(const X0, Y0, Width, Height: Integer): TRectangle; |
|
Types
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
Generated by PasDoc 0.12.1 on 2013-02-04 20:26:51
|