Methods summary
final public static
integer
|
#
getAlignedPosX( integer $posX, integer $sizeX, string $halign, string $newAlign )
Returns the X position of an element in relation to another element and
according to their respective alignments
Returns the X position of an element in relation to another element and
according to their respective alignments
Parameters
- $posX
integer X position of the parent element
- $sizeX
integer Width of the parent element
- $halign
string Horizontal alignement of the parent element
- $newAlign
string Horizontal alignement of the element you want to place
Returns
integer Calculated X position of the element you want to place
|
final public static
integer
|
#
getAlignedPosY( integer $posY, integer $sizeY, string $valign, string $newAlign )
Returns the Y position of an element in relation to another element and
according to their respective alignments
Returns the Y position of an element in relation to another element and
according to their respective alignments
Parameters
- $posY
integer Y position of the parent element
- $sizeY
integer Height of the parent element
- $valign
string Vertical alignement of the parent element
- $newAlign
string Vertical alignement of the element you want to place
Returns
integer Calculated Y position of the element you want to place
|
final public static
array
|
#
getAlignedPos( ManiaLib\Gui\Element $object, string $newHalign, string $newValign )
Returns the position of an element in relation to another element and
according to their respective alignments
Returns the position of an element in relation to another element and
according to their respective alignments
Parameters
- $object
ManiaLib\Gui\Element
Parent element
- $newHalign
string Horizontal alignement of the element you want to place
- $newValign
string Vertical alignement of the element you want to place
Returns
array Calculated position of the element you want to place. The array contains 2
elements with "x" and "y" indexes
|