CENTER
CENTER
Frame Control (CMlFrame)
$scriptFeatures : array<mixed,\FML\Script\Features\ScriptFeature>
$children : array<mixed,\FML\Types\Renderable>
$format : \FML\Elements\Format
create(string $controlId = null) : static
Create a new Control
string | $controlId | (optional) Control Id |
api |
---|
__construct(string $controlId = null)
Construct a new Control
string | $controlId | (optional) Control Id |
api |
---|
None found |
None found |
None found |
api |
---|
setX(float $posX) : static
Set the X position
float | $posX | Horizontal position |
api |
---|
api |
---|
setY(float $posY) : static
Set the Y position
float | $posY | Vertical position |
api |
---|
api |
---|
api |
---|
setPosition(float $posX, float $posY, float $posZ = null) : static
Set the Control position
float | $posX | Horizontal position |
float | $posY | Vertical position |
float | $posZ | (optional) Depth |
api |
---|
api |
---|
setWidth(float $width) : static
Set the width
float | $width | Control width |
api |
---|
api |
---|
setHeight(float $height) : static
Set the height
float | $height | Control height |
api |
---|
setSize(float $width, float $height) : static
Set the size
float | $width | Control width |
float | $height | Control height |
api |
---|
api |
---|
setHAlign(string $horizontalAlign) : static
Set the horizontal alignment
string | $horizontalAlign | Horizontal alignment |
api |
---|
setHorizontalAlign(string $horizontalAlign) : static
Set the horizontal alignment
string | $horizontalAlign | Horizontal alignment |
api |
---|
api |
---|
setVAlign(string $verticalAlign) : static
Set the vertical alignment
string | $verticalAlign | Vertical alignment |
api |
---|
setVerticalAlign(string $verticalAlign) : static
Set the vertical alignment
string | $verticalAlign | Vertical alignment |
api |
---|
setAlign(string $horizontalAlign, string $verticalAlign) : static
Set the horizontal and the vertical alignment
string | $horizontalAlign | Horizontal alignment |
string | $verticalAlign | Vertical alignment |
api |
---|
api |
---|
api |
---|
api |
---|
api |
---|
setScale(float $scale) : static
Set the scale
float | $scale | Control scale |
api |
---|
api |
---|
setVisible(boolean $visible) : static
Set the visibility
boolean | $visible | If the Control should be visible |
api |
---|
api |
---|
setRotation(float $rotation) : static
Set the rotation
float | $rotation | Control rotation |
api |
---|
api |
---|
addClass(string $class) : static
Add a new style class
string | $class | Style class |
api |
---|
addClasses(array<mixed,string> $classes) : static
Add new style classes
array<mixed,string> | $classes | Style classes |
api |
---|
api |
---|
hasDataAttribute(string $name) : boolean
Check if a data attribute is set
string | $name | Name |
api |
---|
getDataAttribute(string $name) : mixed
Get data attribute
string | $name | Name |
api |
---|
getDataAttributes() : array<mixed,mixed>
Get data attributes
api |
---|
addDataAttribute(string $name, mixed $value) : static
Add data attribute
string | $name | Name |
mixed | $value | Value |
api |
---|
addDataAttributes(array<mixed,mixed> $dataAttributes) : static
Add multiple data attributes
array<mixed,mixed> | $dataAttributes | Data attributes |
api |
---|
setDataAttributes(array<mixed,mixed> $dataAttributes) : static
Set data attributes (replacing all previous attributes)
array<mixed,mixed> | $dataAttributes | Data attributes |
api |
---|
removeDataAttribute(string $name) : static
Remove data attribute
string | $name | Name |
api |
---|
removeAllDataAttributes() : static
Remove all data attributes
api |
---|
getScriptFeatures() : array<mixed,\FML\Script\Features\ScriptFeature>
Get the Script Features
None found |
addScriptFeature(\FML\Script\Features\ScriptFeature $scriptFeature) : static
Add a new Script Feature
\FML\Script\Features\ScriptFeature | $scriptFeature | Script Feature |
api |
---|
addScriptFeatures(array<mixed,\FML\Script\Features\ScriptFeature> $scriptFeatures) : static
Add new Script Features
array<mixed,\FML\Script\Features\ScriptFeature> | $scriptFeatures | Script Features |
api |
---|
api |
---|
removeAllScriptFeatures() : static
Remove all Script Features
api |
---|
addActionTriggerFeature(string $actionName, string $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static
Add a dynamic Action Trigger
string | $actionName | Action to trigger |
string | $eventLabel | (optional) Event on which the action is triggered |
api |
---|
addMapInfoFeature(string $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static
Add a dynamic Feature opening the current map info
string | $eventLabel | (optional) Event on which the map info will be opened |
api |
---|
addPlayerProfileFeature(string $login, string $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static
Add a dynamic Feature to open a specific player profile
string | $login | Login of the player |
string | $eventLabel | (optional) Event on which the player profile will be opened |
api |
---|
addUISoundFeature(string $soundName, integer $variant, string $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static
Add a dynamic Feature playing a UISound
string | $soundName | UISound name |
integer | $variant | (optional) Sound variant |
string | $eventLabel | (optional) Event on which the sound will be played |
api |
---|
addToggleFeature(\FML\Controls\Control $toggledControl, string $labelName = \FML\Script\ScriptLabel::MOUSECLICK, boolean $onlyShow = false, boolean $onlyHide = false) : static
Add a dynamic Feature toggling another Control
\FML\Controls\Control | $toggledControl | Toggled Control |
string | $labelName | (optional) Script label name |
boolean | $onlyShow | (optional) If it should only show the Control but not toggle |
boolean | $onlyHide | (optional) If it should only hide the Control but not toggle |
api |
---|
addTooltipFeature(\FML\Controls\Control $tooltipControl, boolean $stayOnClick = false, boolean $invert = false) : static
Add a dynamic Feature showing a Tooltip on hovering
\FML\Controls\Control | $tooltipControl | Tooltip Control |
boolean | $stayOnClick | (optional) Whether the Tooltip should stay on click |
boolean | $invert | (optional) Whether the visibility toggling should be inverted |
api |
---|
addTooltipLabelFeature(\FML\Controls\Label $tooltipLabel, string $text, boolean $stayOnClick = false, boolean $invert = false) : static
Add a dynamic Feature showing a Tooltip on hovering
\FML\Controls\Label | $tooltipLabel | Tooltip Label |
string | $text | Text to display on the Tooltip Label |
boolean | $stayOnClick | (optional) Whether the Tooltip should stay on click |
boolean | $invert | (optional) Whether the visibility toggling should be inverted |
api |
---|
addScriptText(string $scriptText, string $label = \FML\Script\ScriptLabel::MOUSECLICK) : static
Add a custom Control Script text part
string | $scriptText | Script text |
string | $label | (optional) Script label name |
api |
---|
render(\DOMDocument $domDocument) : \DOMElement
Render the XML element
\DOMDocument | $domDocument | DOMDocument for which the XML element should be rendered |
None found |
None found |
None found |
getManiaScriptClass() : string
Get the ManiaScript class of the Control
None found |
getChildren() : array<mixed,\FML\Types\Renderable>
Get the children
None found |
add(\FML\Types\Renderable $child) : static
Add a new child
\FML\Types\Renderable | $child | Child Control to add |
None found |
addChild(\FML\Types\Renderable $child) : static
Add a new child
\FML\Types\Renderable | $child | Child Control to add |
None found |
addChildren(array $children) : static
Add new children
array | $children | Child Controls to add |
None found |
None found |
None found |
getFormat(boolean $createIfEmpty = true) : \FML\Elements\Format
Get the Format
boolean | $createIfEmpty | If the format should be created if it doesn't exist yet |
None found |
setFormat(\FML\Elements\Format $format = null) : static
Set the Format
\FML\Elements\Format | $format | New Format |
None found |