huge fml update

This commit is contained in:
Steffen Schröder
2014-01-19 19:30:21 +01:00
parent 9654b26f2b
commit 771409b8eb
66 changed files with 2303 additions and 134 deletions

View File

@ -6,7 +6,7 @@ use FML\Types\Playable;
use FML\Types\Scriptable;
/**
* Audio Element
* Audio Control
* (CMlMediaPlayer)
*
* @author steeffeen
@ -16,12 +16,24 @@ class Audio extends Control implements Playable, Scriptable {
* Protected Properties
*/
protected $data = '';
protected $dataId = '';
protected $play = 0;
protected $looping = 0;
protected $music = 0;
protected $volume = 1.;
protected $scriptEvents = 0;
/**
* Create a new Audio Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Audio
*/
public static function create($id = null) {
$audio = new Audio($id);
return $audio;
}
/**
* Construct a new Audio Control
*
@ -42,6 +54,16 @@ class Audio extends Control implements Playable, Scriptable {
return $this;
}
/**
*
* @see \FML\Types\Playable::setDataId()
* @return \FML\Controls\Audio
*/
public function setDataId($dataId) {
$this->dataId = (string) $dataId;
return $this;
}
/**
*
* @see \FML\Types\Playable::setPlay()
@ -104,7 +126,7 @@ class Audio extends Control implements Playable, Scriptable {
if ($this->play) {
$xmlElement->setAttribute('play', $this->play);
}
if ($this->looping) {
if (!$this->looping) {
$xmlElement->setAttribute('looping', $this->looping);
}
if ($this->music) {

View File

@ -5,7 +5,7 @@ namespace FML\Controls;
use FML\Types\Renderable;
/**
* Base Control Element
* Base Control
* (CMlControl)
*
* @author steeffeen
@ -43,7 +43,9 @@ abstract class Control implements Renderable {
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
$this->setId($id);
if ($id !== null) {
$this->setId($id);
}
}
/**

View File

@ -8,7 +8,7 @@ use FML\Types\Styleable;
use FML\Types\TextFormatable;
/**
* Entry Element
* Entry Control
* (CMlEntry)
*
* @author steeffeen
@ -24,8 +24,19 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
protected $style = '';
protected $textColor = '';
protected $textSize = -1;
protected $areaColor = '';
protected $areaFocusColor = '';
protected $focusAreaColor1 = '';
protected $focusAreaColor2 = '';
/**
* Create a new Entry Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Entry
*/
public static function create($id = null) {
$entry = new Entry($id);
return $entry;
}
/**
* Construct a new Entry Control
@ -115,7 +126,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
* @return \FML\Controls\Entry
*/
public function setAreaColor($areaColor) {
$this->areaColor = (string) $areaColor;
$this->focusAreaColor1 = (string) $areaColor;
return $this;
}
@ -125,7 +136,7 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
* @return \FML\Controls\Entry
*/
public function setAreaFocusColor($areaFocusColor) {
$this->areaFocusColor = (string) $areaFocusColor;
$this->focusAreaColor2 = (string) $areaFocusColor;
return $this;
}
@ -156,11 +167,11 @@ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextF
if ($this->textSize >= 0.) {
$xmlElement->setAttribute('textsize', $this->textSize);
}
if ($this->areaColor) {
$xmlElement->setAttribute('areacolor', $this->areaColor);
if ($this->focusAreaColor1) {
$xmlElement->setAttribute('focusareacolor1', $this->focusAreaColor1);
}
if ($this->areaFocusColor) {
$xmlElement->setAttribute('areafocuscolor', $this->areaFocusColor);
if ($this->focusAreaColor2) {
$xmlElement->setAttribute('focusareacolor2', $this->focusAreaColor2);
}
return $xmlElement;
}

View File

@ -3,7 +3,8 @@
namespace FML\Controls;
/**
* Class representing CMlFileEntry
* FileEntry Control
* (CMlFileEntry)
*
* @author steeffeen
*/
@ -13,6 +14,17 @@ class FileEntry extends Entry {
*/
protected $folder = '';
/**
* Create a new FileEntry Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\FileEntry
*/
public static function create($id = null) {
$fileEntry = new FileEntry($id);
return $fileEntry;
}
/**
* Construct a new FileEntry Control
*

View File

@ -4,9 +4,11 @@ namespace FML\Controls;
use FML\Types\Container;
use FML\Types\Renderable;
use FML\Elements\Format;
use FML\Elements\FrameModel;
/**
* Frame Element
* Frame Control
* (CMlFrame)
*
* @author steeffeen
@ -16,6 +18,18 @@ class Frame extends Control implements Container {
* Protected Properties
*/
protected $children = array();
protected $format = null;
/**
* Create a new Frame Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Frame
*/
public static function create($id = null) {
$frame = new Frame($id);
return $frame;
}
/**
* Construct a new Frame Control
@ -32,7 +46,7 @@ class Frame extends Control implements Container {
* @see \FML\Types\Container::add()
* @return \FML\Controls\Frame
*/
public function add(Renderable $child) {
public function add(Control $child) {
if (!in_array($child, $this->children, true)) {
array_push($this->children, $child);
}
@ -49,12 +63,37 @@ class Frame extends Control implements Container {
return $this;
}
/**
*
* @see \FML\Types\Container::setFormat()
* @return \FML\Controls\Frame
*/
public function setFormat(Format $format) {
$this->format = $format;
return $this;
}
/**
*
* @see \FML\Types\Container::getFormat()
*/
public function getFormat($createIfEmpty = true) {
if (!$this->format && $createIfEmpty) {
$this->format = new Format();
}
return $this->format;
}
/**
*
* @see \FML\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
if ($this->format) {
$formatXml = $this->format->render($domDocument);
$xmlElement->appendChild($formatXml);
}
foreach ($this->children as $child) {
$childXmlElement = $child->render($domDocument);
$xmlElement->appendChild($childXmlElement);

View File

@ -3,9 +3,10 @@
namespace FML\Controls;
use FML\Types\Scriptable;
use FML\Stylesheet\Style3d;
/**
* Frame3d Element
* Frame3d Control
* (CMlFrame)
*
* @author steeffeen
@ -14,9 +15,21 @@ class Frame3d extends Frame implements Scriptable {
/**
* Protected Properties
*/
protected $style3d = '';
protected $style3dId = '';
protected $style3d = null;
protected $scriptEvents = 0;
/**
* Create a new Frame3d Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Frame3d
*/
public static function create($id = null) {
$frame3d = new Frame3d($id);
return $frame3d;
}
/**
* Construct a new Frame3d Control
*
@ -28,13 +41,26 @@ class Frame3d extends Frame implements Scriptable {
}
/**
* Set style3d
* Set Style3d Id
*
* @param string $style3d 3D Style
* @param string $style3dId Style3d Id
* @return \FML\Controls\Frame3d
*/
public function setStyle3d($style3d) {
$this->style3d = (string) $style3d;
public function setStyle3dId($style3dId) {
$this->style3dId = (string) $style3dId;
$this->style3d = null;
return $this;
}
/**
* Set Style3d
*
* @param Style3d $style3d Style3d Object
* @return \FML\Controls\Frame3d
*/
public function setStyle3d(Style3d $style3d) {
$this->style3d = $style3d;
$this->style = '';
return $this;
}
@ -55,7 +81,11 @@ class Frame3d extends Frame implements Scriptable {
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
if ($this->style3d) {
$xmlElement->setAttribute('style3d', $this->style3d);
$this->style3d->checkId();
$xmlElement->setAttribute('style3d', $this->style3d->getId());
}
else if ($this->style3dId) {
$xmlElement->setAttribute('style3d', $this->style3dId);
}
if ($this->scriptEvents) {
$xmlElement->setAttribute('scriptevents', $this->scriptEvents);

View File

@ -0,0 +1,86 @@
<?php
namespace FML\Controls;
use FML\Elements\FrameModel;
use FML\Types\Renderable;
/**
* Class representing an Instance of a Frame Model
* (CMlFrame)
*
* @author steeffeen
*/
class FrameInstance extends Control {
/**
* Protected Properties
*/
protected $modelId = '';
protected $model = null;
/**
* Create a new Frame Instance
*
* @param string $modelId (optional) Frame Model Id
* @param string $controlId (optional) Control Id
* @return \FML\Controls\Frame
*/
public static function create($modelId = null, $controlId = null) {
$frameInstance = new FrameInstance($modelId, $controlId);
return $frameInstance;
}
/**
* Construct a new Frame Instance
*
* @param string $modelId (optional) Frame Model Id
* @param string $controlId (optional) Control Id
*/
public function __construct($modelId = null, $controlId = null) {
parent::__construct($controlId);
$this->tagName = 'frameinstance';
if ($modelId !== null) {
$this->setModelId($modelId);
}
}
/**
* Set Model Id
*
* @param string $modelId Model Id
* @return \FML\Controls\FrameInstance
*/
public function setModelId($modelId) {
$this->modelId = (string) $modelId;
$this->model = null;
return $this;
}
/**
* Set Frame Model to use
*
* @param FrameModel $frameModel Frame Model
* @return \FML\Controls\FrameInstance
*/
public function setModel(FrameModel $frameModel) {
$this->model = $frameModel;
$this->modelId = '';
return $this;
}
/**
*
* @see \FML\Renderable::render()
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
if ($this->model) {
$this->model->checkId();
$xmlElement->setAttribute('modelid', $this->model->getId());
}
else if ($this->modelId) {
$xmlElement->setAttribute('modelid', $this->modelId);
}
return $xmlElement;
}
}

View File

@ -5,17 +5,17 @@ namespace FML\Controls;
use FML\Types\Styleable;
/**
* Gauge Element
* Gauge Control
* (CMlGauge)
*
* @author steeffeen
*/
// TODO: gauge styles
class Gauge extends Control implements Styleable {
/**
* Protected Properties
*/
protected $ratio = 1.;
// TODO: validate grading
protected $ratio = 0.;
protected $grading = 1.;
protected $color = '';
protected $rotation = 0.;
@ -25,6 +25,17 @@ class Gauge extends Control implements Styleable {
protected $drawBlockBg = 1;
protected $style = '';
/**
* Create a new Gauge Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Gauge
*/
public static function create($id = null) {
$gauge = new Gauge($id);
return $gauge;
}
/**
* Construct a new Gauge Control
*
@ -139,9 +150,12 @@ class Gauge extends Control implements Styleable {
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
// TODO: validate default values
$xmlElement->setAttribute('ratio', $this->ratio);
$xmlElement->setAttribute('grading', $this->grading);
if ($this->ratio) {
$xmlElement->setAttribute('ratio', $this->ratio);
}
if ($this->grading != 1.) {
$xmlElement->setAttribute('grading', $this->grading);
}
if ($this->color) {
$xmlElement->setAttribute('color', $this->color);
}
@ -154,8 +168,12 @@ class Gauge extends Control implements Styleable {
if ($this->clan) {
$xmlElement->setAttribute('clan', $this->clan);
}
$xmlElement->setAttribute('drawbg', $this->drawBg);
$xmlElement->setAttribute('drawblockbg', $this->drawBlockBg);
if (!$this->drawBg) {
$xmlElement->setAttribute('drawbg', $this->drawBg);
}
if (!$this->drawBlockBg) {
$xmlElement->setAttribute('drawblockbg', $this->drawBlockBg);
}
if ($this->style) {
$xmlElement->setAttribute('style', $this->style);
}

View File

@ -10,7 +10,7 @@ use FML\Types\Styleable;
use FML\Types\TextFormatable;
/**
* Label Element
* Label Control
* (CMlLabel)
*
* @author steeffeen
@ -20,6 +20,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* Protected Properties
*/
protected $text = '';
protected $textId = '';
protected $textPrefix = '';
protected $textEmboss = 0;
protected $translate = 0;
@ -27,14 +28,27 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
protected $action = '';
protected $actionKey = -1;
protected $url = '';
protected $urlId = '';
protected $manialink = '';
protected $manialinkId = '';
protected $autoNewLine = 0;
protected $scriptEvents = 0;
protected $style = '';
protected $textSize = -1;
protected $textColor = '';
protected $areaColor = '';
protected $areaFocusColor = '';
protected $focusAreaColor1 = '';
protected $focusAreaColor2 = '';
/**
* Create a new Label Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Label
*/
public static function create($id = null) {
$label = new Label($id);
return $label;
}
/**
* Construct a new Label Control
@ -58,6 +72,17 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
return $this;
}
/**
* Set Text Id to use from the Dico
*
* @param string $textId Text Id
* @return \FML\Controls\Label
*/
public function setTextId($textId) {
$this->textId = (string) $textId;
return $this;
}
/**
* Set Text Prefix
*
@ -132,6 +157,16 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
return $this;
}
/**
*
* @see \FML\Types\Linkable::setUrlId()
* @return \FML\Controls\Label
*/
public function setUrlId($urlId) {
$this->urlId = (string) $urlId;
return $this;
}
/**
*
* @see \FML\Types\Linkable::setManialink()
@ -142,6 +177,16 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
return $this;
}
/**
*
* @see \FML\Types\Linkable::setManialinkId()
* @return \FML\Controls\Label
*/
public function setManialinkId($manialinkId) {
$this->manialinkId = (string) $manialinkId;
return $this;
}
/**
*
* @see \FML\Types\NewLineable::setAutoNewLine()
@ -198,7 +243,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* @return \FML\Controls\Label
*/
public function setAreaColor($areaColor) {
$this->areaColor = (string) $areaColor;
$this->focusAreaColor1 = (string) $areaColor;
return $this;
}
@ -208,7 +253,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
* @return \FML\Controls\Label
*/
public function setAreaFocusColor($areaFocusColor) {
$this->areaFocusColor = (string) $areaFocusColor;
$this->focusAreaColor2 = (string) $areaFocusColor;
return $this;
}
@ -221,6 +266,9 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
if ($this->text) {
$xmlElement->setAttribute('text', $this->text);
}
if ($this->textId) {
$xmlElement->setAttribute('textid', $this->textId);
}
if ($this->textPrefix) {
$xmlElement->setAttribute('textprefix', $this->textPrefix);
}
@ -260,11 +308,11 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
if ($this->textColor) {
$xmlElement->setAttribute('textcolor', $this->textColor);
}
if ($this->areaColor) {
$xmlElement->setAttribute('areacolor', $this->areaColor);
if ($this->focusAreaColor1) {
$xmlElement->setAttribute('focusareacolor1', $this->focusAreaColor1);
}
if ($this->areaFocusColor) {
$xmlElement->setAttribute('areafocuscolor', $this->areaFocusColor);
if ($this->focusAreaColor2) {
$xmlElement->setAttribute('focusareacolor2', $this->focusAreaColor2);
}
return $xmlElement;
}

View File

@ -31,4 +31,24 @@ class Label_Button extends Label {
const STYLE_CardButtonSmallXXXL = 'CardButtonSmallXXXL';
const STYLE_CardMain_Quit = 'CardMain_Quit';
const STYLE_CardMain_Tool = 'CardMain_Tool';
/**
* Create a new Label_Button Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Labels\Label_Button
*/
public static function create($id = null) {
$labelButton = new Label_Button($id);
return $labelButton;
}
/**
* Construct a new Label_Button Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
}
}

View File

@ -88,4 +88,24 @@ class Label_Text extends Label {
const STYLE_UiDriving_BgBottom = 'UiDriving_BgBottom';
const STYLE_UiDriving_BgCard = 'UiDriving_BgCard';
const STYLE_UiDriving_BgCenter = 'UiDriving_BgCenter';
/**
* Create a new Label_Text Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Labels\Label_Button
*/
public static function create($id = null) {
$labelText = new Label_Text($id);
return $labelText;
}
/**
* Construct a new Label_Text Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
}
}

View File

@ -10,7 +10,7 @@ use FML\Types\Styleable;
use FML\Types\SubStyleable;
/**
* Quad Element
* Quad Control
* (CMlQuad)
*
* @author steeffeen
@ -20,7 +20,9 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Protected Properties
*/
protected $image = '';
protected $imageId = '';
protected $imageFocus = '';
protected $imageFocusId = '';
protected $colorize = '';
protected $modulizeColor = '';
protected $autoScale = 1;
@ -28,11 +30,24 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
protected $actionKey = -1;
protected $bgColor = '';
protected $url = '';
protected $urlId = '';
protected $manialink = '';
protected $manialinkId = '';
protected $scriptEvents = 0;
protected $style = '';
protected $subStyle = '';
/**
* Create a new Quad Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Quad
*/
public static function create($id = null) {
$quad = new Quad($id);
return $quad;
}
/**
* Construct a new Quad Control
*
@ -55,6 +70,17 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
* Set Image Id to use from the Dico
*
* @param string $imageId Image Id
* @return \FML\Controls\Quad
*/
public function setImageId($imageId) {
$this->imageId = (string) $imageId;
return $this;
}
/**
* Set Focus Image Url
*
@ -66,6 +92,17 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
* Set Focus Image Id to use from the Dico
*
* @param string $imageFocusId Focus Image Id
* @return \FML\Controls\Quad
*/
public function setImageFocusId($imageFocusId) {
$this->imageFocusId = (string) $imageFocusId;
return $this;
}
/**
* Set Colorization
*
@ -139,6 +176,16 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
*
* @see \FML\Types\Linkable::setUrlId()
* @return \FML\Controls\Quad
*/
public function setUrlId($urlId) {
$this->urlId = (string) $urlId;
return $this;
}
/**
*
* @see \FML\Types\Linkable::setManialink()
@ -149,6 +196,16 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
*
* @see \FML\Types\Linkable::setManialinkId()
* @return \FML\Controls\Quad
*/
public function setManialinkId($manialinkId) {
$this->manialinkId = (string) $manialinkId;
return $this;
}
/**
*
* @see \FML\Types\Scriptable::setScriptEvents()
@ -199,9 +256,15 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
if ($this->image) {
$xmlElement->setAttribute('image', $this->image);
}
if ($this->imageId) {
$xmlElement->setAttribute('imageid', $this->imageId);
}
if ($this->imageFocus) {
$xmlElement->setAttribute('imagefocus', $this->imageFocus);
}
if ($this->imageFocusId) {
$xmlElement->setAttribute('imagefocusid', $this->imageFocusId);
}
if ($this->colorize) {
$xmlElement->setAttribute('colorize', $this->colorize);
}

View File

@ -20,8 +20,20 @@ class Quad_321Go extends Quad {
const SUBSTYLE_Go = 'Go!';
/**
* Create a new Quad_321Go Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_321Go
*/
public static function create($id = null) {
$quad321Go = new Quad_321Go($id);
return $quad321Go;
}
/**
* Construct a new Quad_321Go Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -43,8 +43,20 @@ class Quad_BgRaceScore2 extends Quad {
const SUBSTYLE_Warmup = 'Warmup';
/**
* Create a new Quad_BgRaceScore2 Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_BgRaceScore2
*/
public static function create($id = null) {
$quadBgRaceScore2 = new Quad_BgRaceScore2($id);
return $quadBgRaceScore2;
}
/**
* Construct a new Quad_BgRaceScore2 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -80,8 +80,20 @@ class Quad_Bgs1 extends Quad {
const SUBSTYLE_Shadow = 'Shadow';
/**
* Create a new Quad_Bgs1 Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Bgs1
*/
public static function create($id = null) {
$quadBgs1 = new Quad_Bgs1($id);
return $quadBgs1;
}
/**
* Construct a new Quad_Bgs1 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -80,8 +80,20 @@ class Quad_Bgs1InRace extends Quad {
const SUBSTYLE_Shadow = 'Shadow';
/**
* Create a new Quad_Bgs1InRace Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Bgs1InRace
*/
public static function create($id = null) {
$quadBgs1InRace = new Quad_Bgs1InRace($id);
return $quadBgs1InRace;
}
/**
* Construct a new Quad_Bgs1InRace Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -22,8 +22,20 @@ class Quad_BgsChallengeMedals extends Quad {
const SUBSTYLE_BgSilver = 'BgSilver';
/**
* Create a new Quad_BgsChallengeMedals Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_BgsChallengeMedals
*/
public static function create($id = null) {
$quadBgsChallengeMedals = new Quad_BgsChallengeMedals($id);
return $quadBgsChallengeMedals;
}
/**
* Construct a new Quad_BgsChallengeMedals Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -30,8 +30,20 @@ class Quad_BgsPlayerCard extends Quad {
const SUBSTYLE_ProgressBar = 'ProgressBar';
/**
* Create a new Quad_BgsPlayerCard Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_BgsPlayerCard
*/
public static function create($id = null) {
$quadBgsPlayerCard = new Quad_BgsPlayerCard($id);
return $quadBgsPlayerCard;
}
/**
* Construct a new Quad_BgsPlayerCard Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -28,8 +28,20 @@ class Quad_Copilot extends Quad {
const SUBSTYLE_UpWrong = 'UpWrong';
/**
* Create a new Quad_Copilot Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Copilot
*/
public static function create($id = null) {
$quadCopilot = new Quad_Copilot($id);
return $quadCopilot;
}
/**
* Construct a new Quad_Copilot Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -19,8 +19,20 @@ class Quad_Emblems extends Quad {
const SUBSTYLE_2 = '#2';
/**
* Create a new Quad_Emblems Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Emblems
*/
public static function create($id = null) {
$quadEmblems = new Quad_Emblems($id);
return $quadEmblems;
}
/**
* Construct a new Quad_Emblems Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -22,8 +22,20 @@ class Quad_EnergyBar extends Quad {
const SUBSTYLE_HeaderGaugeRight = 'HeaderGaugeRight';
/**
* Create a new Quad_EnergyBar Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_EnergyBar
*/
public static function create($id = null) {
$quadEnergybar = new Quad_EnergyBar($id);
return $quadEnergybar;
}
/**
* Construct a new Quad_EnergyBar Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -25,8 +25,20 @@ class Quad_Hud3dEchelons extends Quad {
const SUBSTYLE_EchelonSilver3 = 'EchelonSilver3';
/**
* Create a new Quad_Hud3dEchelons Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Hud3dEchelons
*/
public static function create($id = null) {
$quadHud3dEchelons = new Quad_Hud3dEchelons($id);
return $quadHud3dEchelons;
}
/**
* Construct a new Quad_Hud3dEchelons Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -80,7 +80,20 @@ class Quad_Icons128x128_1 extends Quad {
const SUBSTYLE_Vehicles = 'Vehicles';
/**
* Construct Icons128x128_1 quad
* Create a new Quad_Icons128x128_1 Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Icons128x128_1
*/
public static function create($id = null) {
$quadIcons128x128_1 = new Quad_Icons128x128_1($id);
return $quadIcons128x128_1;
}
/**
* Construct a new Quad_Icons128x128_1 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -80,8 +80,20 @@ class Quad_Icons128x128_Blink extends Quad {
const SUBSTYLE_Vehicles = 'Vehicles';
/**
* Create a new Quad_Icons128x128_Blink Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Icons128x128_Blink
*/
public static function create($id = null) {
$quadIcons128x128_Blink = new Quad_Icons128x128_Blink($id);
return $quadIcons128x128_Blink;
}
/**
* Construct a new Quad_Icons128x128_Blink Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -41,8 +41,20 @@ class Quad_Icons128x32_1 extends Quad {
const SUBSTYLE_Windowed = 'Windowed';
/**
* Create a new Quad_Icons128x32_1 Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Icons128x32_1
*/
public static function create($id = null) {
$quadIcons128x32_1 = new Quad_Icons128x32_1($id);
return $quadIcons128x32_1;
}
/**
* Construct a new Quad_Icons128x32_1 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -101,8 +101,20 @@ class Quad_Icons64x64_1 extends Quad {
const SUBSTYLE_YellowLow = 'YellowLow';
/**
* Create a new Quad_Icons64x64_1 Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Icons64x64_1
*/
public static function create($id = null) {
$quadIcons64x64_1 = new Quad_Icons64x64_1($id);
return $quadIcons64x64_1;
}
/**
* Construct a new Quad_Icons64x64_1 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -29,8 +29,20 @@ class Quad_Icons64x64_2 extends Quad {
const SUBSTYLE_UnknownHit = 'UnknownHit';
/**
* Create a new Quad_Icons64x64_2 Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Icons64x64_2
*/
public static function create($id = null) {
$quadIcons64x64_2 = new Quad_Icons64x64_2($id);
return $quadIcons64x64_2;
}
/**
* Construct a new Quad_Icons64x64_2 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -23,8 +23,20 @@ class Quad_ManiaPlanetLogos extends Quad {
const SUBSTYLE_ManiaPlanetLogoWhiteSmall = 'ManiaPlanetLogoWhiteSmall';
/**
* Create a new Quad_ManiaPlanetLogos Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_ManiaPlanetLogos
*/
public static function create($id = null) {
$quadManiaPlanetLogos = new Quad_ManiaPlanetLogos($id);
return $quadManiaPlanetLogos;
}
/**
* Construct a new Quad_ManiaPlanetLogos Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -22,8 +22,20 @@ class Quad_ManiaplanetSystem extends Quad {
const SUBSTYLE_Statistics = 'Statistics';
/**
* Create a new Quad_ManiaplanetSystem Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_ManiaplanetSystem
*/
public static function create($id = null) {
$quadManiaplanetSystem = new Quad_ManiaplanetSystem($id);
return $quadManiaplanetSystem;
}
/**
* Construct a new Quad_ManiaplanetSystem Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -23,8 +23,20 @@ class Quad_MedalsBig extends Quad {
const SUBSTYLE_MedalSlot = 'MedalSlot';
/**
* Create a new Quad_MedalsBig Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_MedalsBig
*/
public static function create($id = null) {
$quadMedalsBig = new Quad_MedalsBig($id);
return $quadMedalsBig;
}
/**
* Construct a new Quad_MedalsBig Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -20,8 +20,20 @@ class Quad_TitleLogos extends Quad {
const SUBSTYLE_Title = 'Title';
/**
* Create a new Quad_TitleLogos Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_TitleLogos
*/
public static function create($id = null) {
$quadTitleLogos = new Quad_TitleLogos($id);
return $quadTitleLogos;
}
/**
* Construct a new Quad_TitleLogos Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -70,8 +70,20 @@ class Quad_UIConstruction_Buttons extends Quad {
const SUBSTYLE_Validate_Step3 = 'Validate_Step3';
/**
* Create a new Quad_UIConstruction_Buttons Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_UIConstruction_Buttons
*/
public static function create($id = null) {
$quadUIConstructionButtons = new Quad_UIConstruction_Buttons($id);
return $quadUIConstructionButtons;
}
/**
* Construct a new Quad_UIConstruction_Buttons Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -37,8 +37,20 @@ class Quad_UiSMSpectatorScoreBig extends Quad {
CONST SUBSTYLE_UIRange2Bg = 'UIRange2Bg';
/**
* Create a new Quad_UiSMSpectatorScoreBig Control
*
* @see \FML\Controls\Quad
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_UiSMSpectatorScoreBig
*/
public static function create($id = null) {
$quadUiSMSpectatorScoreBig = new Quad_UiSMSpectatorScoreBig($id);
return $quadUiSMSpectatorScoreBig;
}
/**
* Construct a new Quad_UiSMSpectatorScoreBig Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);

View File

@ -6,7 +6,7 @@ use FML\Types\Playable;
use FML\Types\Scriptable;
/**
* Video Element
* Video Control
* (CMlMediaPlayer)
*
* @author steeffeen
@ -16,12 +16,24 @@ class Video extends Control implements Playable, Scriptable {
* Protected Properties
*/
protected $data = '';
protected $dataId = '';
protected $play = 0;
protected $looping = 0;
protected $music = 0;
protected $volume = 1.;
protected $scriptEvents = 0;
/**
* Create a new Video Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Video
*/
public static function create($id = null) {
$video = new Video($id);
return $video;
}
/**
* Construct a new Video Control
*
@ -42,6 +54,16 @@ class Video extends Control implements Playable, Scriptable {
return $this;
}
/**
*
* @see \FML\Types\Playable::setDataId()
* @return \FML\Controls\Video
*/
public function setDataId($dataId) {
$this->dataId = (string) $dataId;
return $this;
}
/**
*
* @see \FML\Types\Playable::setPlay()
@ -104,7 +126,7 @@ class Video extends Control implements Playable, Scriptable {
if ($this->play) {
$xmlElement->setAttribute('play', $this->play);
}
if ($this->looping) {
if (!$this->looping) {
$xmlElement->setAttribute('looping', $this->looping);
}
if ($this->music) {