\FML\ControlsGauge

Gauge Control (CMlGauge)

Summary

Methods
Properties
Constants
create()
__construct()
getId()
setId()
checkId()
getX()
setX()
getY()
setY()
getZ()
setZ()
setPosition()
getWidth()
setWidth()
getHeight()
setHeight()
setSize()
getHorizontalAlign()
setHAlign()
setHorizontalAlign()
getVerticalAlign()
setVAlign()
setVerticalAlign()
setAlign()
centerAlign()
resetAlign()
clearAlign()
getScale()
setScale()
getVisible()
setVisible()
getRotation()
setRotation()
getClasses()
addClass()
addClasses()
removeAllClasses()
hasDataAttribute()
getDataAttribute()
getDataAttributes()
addDataAttribute()
addDataAttributes()
setDataAttributes()
removeDataAttribute()
removeAllDataAttributes()
getScriptFeatures()
addScriptFeature()
addScriptFeatures()
removeScriptFeatures()
removeAllScriptFeatures()
addActionTriggerFeature()
addMapInfoFeature()
addPlayerProfileFeature()
addUISoundFeature()
addToggleFeature()
addTooltipFeature()
addTooltipLabelFeature()
addScriptText()
render()
__toString()
getTagName()
getManiaScriptClass()
getRatio()
setRatio()
getGrading()
setGrading()
getColor()
setColor()
getCentered()
setCentered()
getClan()
setClan()
getDrawBackground()
setDrawBg()
setDrawBackground()
getDrawBlockBackground()
setDrawBlockBackground()
getStyle()
setStyle()
No public properties found
CENTER
CENTER2
TOP
RIGHT
BOTTOM
LEFT
STYLE_BgCard
STYLE_EnergyBar
STYLE_ProgressBar
STYLE_ProgressBarSmall
No protected methods found
$controlId
$posX
$posY
$posZ
$width
$height
$horizontalAlign
$verticalAlign
$scale
$visible
$rotation
$classes
$dataAttributes
$scriptFeatures
$ratio
$grading
$color
$centered
$clan
$drawBackground
$drawBlockBackground
$style
N/A
No private methods found
No private properties found
N/A

Constants

CENTER

CENTER

CENTER2

CENTER2

TOP

TOP

RIGHT

RIGHT

BOTTOM

BOTTOM

LEFT

LEFT

STYLE_BgCard

STYLE_BgCard

STYLE_EnergyBar

STYLE_EnergyBar

STYLE_ProgressBar

STYLE_ProgressBar

STYLE_ProgressBarSmall

STYLE_ProgressBarSmall

Properties

$controlId

$controlId : string

Type

string — Control Id

$posX

$posX : float

Type

float — X position

$posY

$posY : float

Type

float — Y position

$posZ

$posZ : float

Type

float — Z position

$width

$width : float

Type

float — Width

$height

$height : float

Type

float — Height

$horizontalAlign

$horizontalAlign : string

Type

string — Horizontal alignment

$verticalAlign

$verticalAlign : string

Type

string — Vertical alignment

$scale

$scale : float

Type

float — Scale

$visible

$visible : boolean

Type

boolean — Visibility

$rotation

$rotation : float

Type

float — Rotation

$classes

$classes : array<mixed,string>

Type

array<mixed,string> — Style classes

$dataAttributes

$dataAttributes : array<mixed,mixed>

Type

array<mixed,mixed> — Data attributes

$ratio

$ratio : float

Type

float — Ratio

$grading

$grading : float

Type

float — Grading

$color

$color : string

Type

string — Color

$centered

$centered : boolean

Type

boolean — Centered

$clan

$clan : integer

Type

integer — Clan number

$drawBackground

$drawBackground : boolean

Type

boolean — Draw background

$drawBlockBackground

$drawBlockBackground : boolean

Type

boolean — Draw block background

$style

$style : string

Type

string — Style

Methods

create()

create(string  $controlId = null) : static

Create a new Control

Parameters

string $controlId

(optional) Control Id

Returns

static

__construct()

__construct(string  $controlId = null) 

Construct a new Control

Parameters

string $controlId

(optional) Control Id

getId()

getId() : string

Get the Id

Returns

string

setId()

setId(  $controlId) : static

Set the Id

Parameters

$controlId

Returns

static

checkId()

checkId() : string

Check and return the Id

Returns

string

getX()

getX() : float

Get the X position

Returns

float

setX()

setX(float  $posX) : static

Set the X position

Parameters

float $posX

Horizontal position

Returns

static

getY()

getY() : float

Get the Y position

Returns

float

setY()

setY(float  $posY) : static

Set the Y position

Parameters

float $posY

Vertical position

Returns

static

getZ()

getZ() : float

Get the Z position

Returns

float

setZ()

setZ(float  $posZ) : static

Set the Z position

Parameters

float $posZ

Depth

Returns

static

setPosition()

setPosition(float  $posX, float  $posY, float  $posZ = null) : static

Set the Control position

Parameters

float $posX

Horizontal position

float $posY

Vertical position

float $posZ

(optional) Depth

Returns

static

getWidth()

getWidth() : float

Get the width

Returns

float

setWidth()

setWidth(float  $width) : static

Set the width

Parameters

float $width

Control width

Returns

static

getHeight()

getHeight() : float

Get the height

Returns

float

setHeight()

setHeight(float  $height) : static

Set the height

Parameters

float $height

Control height

Returns

static

setSize()

setSize(float  $width, float  $height) : static

Set the size

Parameters

float $width

Control width

float $height

Control height

Returns

static

getHorizontalAlign()

getHorizontalAlign() : string

Get the horizontal alignment

Returns

string

setHAlign()

setHAlign(string  $horizontalAlign) : static

Set the horizontal alignment

Parameters

string $horizontalAlign

Horizontal alignment

Returns

static

setHorizontalAlign()

setHorizontalAlign(string  $horizontalAlign) : static

Set the horizontal alignment

Parameters

string $horizontalAlign

Horizontal alignment

Returns

static

getVerticalAlign()

getVerticalAlign() : string

Get the vertical alignment

Returns

string

setVAlign()

setVAlign(string  $verticalAlign) : static

Set the vertical alignment

Parameters

string $verticalAlign

Vertical alignment

Returns

static

setVerticalAlign()

setVerticalAlign(string  $verticalAlign) : static

Set the vertical alignment

Parameters

string $verticalAlign

Vertical alignment

Returns

static

setAlign()

setAlign(string  $horizontalAlign, string  $verticalAlign) : static

Set the horizontal and the vertical alignment

Parameters

string $horizontalAlign

Horizontal alignment

string $verticalAlign

Vertical alignment

Returns

static

centerAlign()

centerAlign() : static

Center the alignment

Returns

static

resetAlign()

resetAlign() : static

Reset the alignment

Returns

static

clearAlign()

clearAlign() : static

Clear the alignment

Returns

static

getScale()

getScale() : float

Get the scale

Returns

float

setScale()

setScale(float  $scale) : static

Set the scale

Parameters

float $scale

Control scale

Returns

static

getVisible()

getVisible() : boolean

Get the visibility

Returns

boolean

setVisible()

setVisible(boolean  $visible) : static

Set the visibility

Parameters

boolean $visible

If the Control should be visible

Returns

static

getRotation()

getRotation() : float

Get the rotation

Returns

float

setRotation()

setRotation(float  $rotation) : static

Set the rotation

Parameters

float $rotation

Control rotation

Returns

static

getClasses()

getClasses() : array<mixed,string>

Get style classes

Returns

array<mixed,string>

addClass()

addClass(string  $class) : static

Add a new style class

Parameters

string $class

Style class

Returns

static

addClasses()

addClasses(array<mixed,string>  $classes) : static

Add new style classes

Parameters

array<mixed,string> $classes

Style classes

Returns

static

removeAllClasses()

removeAllClasses() : static

Remove all style classes

Returns

static

hasDataAttribute()

hasDataAttribute(string  $name) : boolean

Check if a data attribute is set

Parameters

string $name

Name

Returns

boolean

getDataAttribute()

getDataAttribute(string  $name) : mixed

Get data attribute

Parameters

string $name

Name

Returns

mixed

getDataAttributes()

getDataAttributes() : array<mixed,mixed>

Get data attributes

Returns

array<mixed,mixed>

addDataAttribute()

addDataAttribute(string  $name, mixed  $value) : static

Add data attribute

Parameters

string $name

Name

mixed $value

Value

Returns

static

addDataAttributes()

addDataAttributes(array<mixed,mixed>  $dataAttributes) : static

Add multiple data attributes

Parameters

array<mixed,mixed> $dataAttributes

Data attributes

Returns

static

setDataAttributes()

setDataAttributes(array<mixed,mixed>  $dataAttributes) : static

Set data attributes (replacing all previous attributes)

Parameters

array<mixed,mixed> $dataAttributes

Data attributes

Returns

static

removeDataAttribute()

removeDataAttribute(string  $name) : static

Remove data attribute

Parameters

string $name

Name

Returns

static

removeAllDataAttributes()

removeAllDataAttributes() : static

Remove all data attributes

Returns

static

getScriptFeatures()

getScriptFeatures() : array<mixed,\FML\Script\Features\ScriptFeature>

Get the Script Features

Returns

array<mixed,\FML\Script\Features\ScriptFeature>

addScriptFeature()

addScriptFeature(\FML\Script\Features\ScriptFeature  $scriptFeature) : static

Add a new Script Feature

Parameters

\FML\Script\Features\ScriptFeature $scriptFeature

Script Feature

Returns

static

addScriptFeatures()

addScriptFeatures(array<mixed,\FML\Script\Features\ScriptFeature>  $scriptFeatures) : static

Add new Script Features

Parameters

array<mixed,\FML\Script\Features\ScriptFeature> $scriptFeatures

Script Features

Returns

static

removeScriptFeatures()

removeScriptFeatures() : static

Remove all Script Features

Returns

static

removeAllScriptFeatures()

removeAllScriptFeatures() : static

Remove all Script Features

Returns

static

addActionTriggerFeature()

addActionTriggerFeature(string  $actionName, string  $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static

Add a dynamic Action Trigger

Parameters

string $actionName

Action to trigger

string $eventLabel

(optional) Event on which the action is triggered

Returns

static

addMapInfoFeature()

addMapInfoFeature(string  $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static

Add a dynamic Feature opening the current map info

Parameters

string $eventLabel

(optional) Event on which the map info will be opened

Returns

static

addPlayerProfileFeature()

addPlayerProfileFeature(string  $login, string  $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static

Add a dynamic Feature to open a specific player profile

Parameters

string $login

Login of the player

string $eventLabel

(optional) Event on which the player profile will be opened

Returns

static

addUISoundFeature()

addUISoundFeature(string  $soundName, integer  $variant, string  $eventLabel = \FML\Script\ScriptLabel::MOUSECLICK) : static

Add a dynamic Feature playing a UISound

Parameters

string $soundName

UISound name

integer $variant

(optional) Sound variant

string $eventLabel

(optional) Event on which the sound will be played

Returns

static

addToggleFeature()

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

Parameters

\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

Returns

static

addTooltipFeature()

addTooltipFeature(\FML\Controls\Control  $tooltipControl, boolean  $stayOnClick = false, boolean  $invert = false) : static

Add a dynamic Feature showing a Tooltip on hovering

Parameters

\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

Returns

static

addTooltipLabelFeature()

addTooltipLabelFeature(\FML\Controls\Label  $tooltipLabel, string  $text, boolean  $stayOnClick = false, boolean  $invert = false) : static

Add a dynamic Feature showing a Tooltip on hovering

Parameters

\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

Returns

static

addScriptText()

addScriptText(string  $scriptText, string  $label = \FML\Script\ScriptLabel::MOUSECLICK) : static

Add a custom Control Script text part

Parameters

string $scriptText

Script text

string $label

(optional) Script label name

Returns

static

render()

render(\DOMDocument  $domDocument) : \DOMElement

Render the XML element

Parameters

\DOMDocument $domDocument

DOMDocument for which the XML element should be rendered

Returns

\DOMElement

__toString()

__toString() : string

Get the string representation

Returns

string

getTagName()

getTagName() : string

Get the tag name of the Control

Returns

string

getManiaScriptClass()

getManiaScriptClass() : string

Get the ManiaScript class of the Control

Returns

string

getRatio()

getRatio() : float

Get the ratio

Returns

float

setRatio()

setRatio(float  $ratio) : static

Set the ratio

Parameters

float $ratio

Ratio value

Returns

static

getGrading()

getGrading() : float

Get the grading

Returns

float

setGrading()

setGrading(float  $grading) : static

Set the grading

Parameters

float $grading

Grading value

Returns

static

getColor()

getColor() : string

Get the color

Returns

string

setColor()

setColor(string  $color) : static

Set the color

Parameters

string $color

Color

Returns

static

getCentered()

getCentered() : boolean

Get centered

Returns

boolean

setCentered()

setCentered(boolean  $centered) : static

Set centered

Parameters

boolean $centered

If the Gauge should be centered

Returns

static

getClan()

getClan() : integer

Get the clan

Returns

integer

setClan()

setClan(integer  $clan) : static

Set the clan

Parameters

integer $clan

Clan number

Returns

static

getDrawBackground()

getDrawBackground() : boolean

Get draw background

Returns

boolean

setDrawBg()

setDrawBg(boolean  $drawBackground) : static

Set draw background

Parameters

boolean $drawBackground

If the Gauge background should be drawn

Returns

static

setDrawBackground()

setDrawBackground(boolean  $drawBackground) : static

Set draw background

Parameters

boolean $drawBackground

If the Gauge background should be drawn

Returns

static

getDrawBlockBackground()

getDrawBlockBackground() : boolean

Get draw block background

Returns

boolean

setDrawBlockBackground()

setDrawBlockBackground(boolean  $drawBlockBackground) : static

Set draw block background

Parameters

boolean $drawBlockBackground

If the Gauge block background should be drawn

Returns

static

getStyle()

getStyle() : string

Get the style

Returns

string

setStyle()

setStyle(string  $style) : static

Set the style

Parameters

string $style

Style name

Returns

static