CRM64Pro GDK v0.19.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
CRM64Pro::Position

Absolute coordinate or helper-relative position used by layout APIs. More...

Detailed Description

Absolute coordinate or helper-relative position used by layout APIs.

Public Member Functions

 Position (float f=0.0f)
 Construct an absolute position.
 Position (ePositionHelper ph, float offset=0.0f)
 Construct a helper-relative position.
 Position (ePositionHelper ph, Sint32 offset)
 Construct a helper-relative position with an integer offset.
bool isAbsolute () const
 Check whether this is an absolute position.
bool isRelative () const
 Check whether this position uses a layout helper.

Public Attributes

float fValue = 0.0f
 Absolute coordinate or offset applied to the selected helper.
ePositionHelper eHelper = PH_NONE
 Position helper, or ::PH_NONE for absolute positioning.

Constructor & Destructor Documentation

◆ Position() [1/3]

CRM64Pro::Position::Position ( float f = 0.0f)
inline

Construct an absolute position.

Parameters
fAbsolute coordinate value.

◆ Position() [2/3]

CRM64Pro::Position::Position ( ePositionHelper ph,
float offset = 0.0f )
inline

Construct a helper-relative position.

Parameters
phLayout helper used to resolve the position.
offsetOffset applied to the resolved helper position.

◆ Position() [3/3]

CRM64Pro::Position::Position ( ePositionHelper ph,
Sint32 offset )
inline

Construct a helper-relative position with an integer offset.

Parameters
phLayout helper used to resolve the position.
offsetInteger offset converted to a floating-point value.

Member Function Documentation

◆ isAbsolute()

bool CRM64Pro::Position::isAbsolute ( ) const
inline

Check whether this is an absolute position.

Returns
true when eHelper is ::PH_NONE, or false otherwise.

◆ isRelative()

bool CRM64Pro::Position::isRelative ( ) const
inline

Check whether this position uses a layout helper.

Returns
true when eHelper is not ::PH_NONE, or false otherwise.