diff --git a/application/FML/Controls/Audio.php b/application/FML/Controls/Audio.php new file mode 100644 index 00000000..6a89a488 --- /dev/null +++ b/application/FML/Controls/Audio.php @@ -0,0 +1,32 @@ +tagName = 'audio'; + } + + /** + * + * @see \FML\Control::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Control.php b/application/FML/Controls/Control.php new file mode 100644 index 00000000..14872f75 --- /dev/null +++ b/application/FML/Controls/Control.php @@ -0,0 +1,262 @@ +setId($id); + } + } + + /** + * Get control id + * + * @return string + */ + public function getId() { + return $this->id; + } + + /** + * Set control id + * + * @param string $id + * @return \FML\Controls\Control + */ + public function setId($id) { + $this->id = $id; + return $this; + } + + /** + * Assign an unique id if necessary + * + * @return \FML\Controls\Control + */ + public function assignId() { + if ($this->getId()) { + return $this; + } + $this->setId(uniqid()); + return $this; + } + + /** + * Set x position + * + * @param real $x + * @return \FML\Controls\Control + */ + public function setX($x) { + $this->x = $x; + return $this; + } + + /** + * Set y position + * + * @param real $y + * @return \FML\Controls\Control + */ + public function setY($y) { + $this->y = $y; + return $this; + } + + /** + * Set z position + * + * @param real $z + * @return \FML\Controls\Control + */ + public function setZ($z) { + $this->z = $z; + return $this; + } + + /** + * Set position + * + * @param real $x + * @param real $y + * @param real $z + * @return \FML\Controls\Control + */ + public function setPosition($x = null, $y = null, $z = null) { + if ($x !== null) { + $this->setX($x); + } + if ($y !== null) { + $this->setY($y); + } + if ($z !== null) { + $this->setZ($z); + } + return $this; + } + + /** + * Set size + * + * @param real $width + * @param real $height + * @return \FML\Controls\Control + */ + public function setSize($width = null, $height = null) { + if ($width !== null) { + $this->width = $width; + } + if ($height !== null) { + $this->height = $height; + } + return $this; + } + + /** + * Set horizontal alignment + * + * @param string $hAlign + * @return \FML\Controls\Control + */ + public function setHAlign($hAlign) { + $this->hAlign = $hAlign; + return $this; + } + + /** + * Set vertical alignment + * + * @param string $vAlign + * @return \FML\Controls\Control + */ + public function setVAlign($vAlign) { + $this->vAlign = $vAlign; + return $this; + } + + /** + * Set horizontal and vertical alignment + * + * @param string $halign + * @param string $vAlign + * @return \FML\Controls\Control + */ + public function setAlign($halign, $vAlign) { + $this->setHAlign($hAlign); + $this->setVAlign($vAlign); + return $this; + } + + /** + * Set scale + * + * @param real $scale + * @return \FML\Controls\Control + */ + public function setScale($scale) { + $this->scale = $scale; + return $this; + } + + /** + * Set visible + * + * @param bool $visible + * @return \FML\Controls\Control + */ + public function setVisible($visible) { + $this->hidden = ($visible ? 0 : 1); + return $this; + } + + /** + * Add class name + * + * @param string $class + * @return \FML\Controls\Control + */ + public function addClass($class) { + array_push($this->classes, $class); + return $this; + } + + /** + * + * @see \FML\Types\Renderable::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = $domDocument->createElement($this->tagName); + if ($this->id) { + $xml->setAttribute('id', $this->id); + } + if ($this->x !== 0. || $this->y !== 0. || $this->z !== 0.) { + $xml->setAttribute('posn', "{$this->x} {$this->y} {$this->z}"); + } + if ($this->width >= 0. || $this->height >= 0.) { + $xml->setAttribute('sizen', "{$this->width} {$this->height}"); + } + if (get_class($this) !== Frame::getClass()) { + if ($this->hAlign) { + $xml->setAttribute('halign', $this->hAlign); + } + if ($this->vAlign) { + $xml->setAttribute('valign', $this->vAlign); + } + } + if ($this->scale !== 1.) { + $xml->setAttribute('scale', $this->scale); + } + if ($this->hidden) { + $xml->setAttribute('hidden', $this->hidden); + } + $classes = ''; + foreach ($this->classes as $class) { + $classes .= $class . ' '; + } + if ($classes) { + $xml->setAttribute('class', $classes); + } + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Entry.php b/application/FML/Controls/Entry.php new file mode 100644 index 00000000..d71f027a --- /dev/null +++ b/application/FML/Controls/Entry.php @@ -0,0 +1,65 @@ +tagName = 'entry'; + } + + /** + * Set name + * + * @param string $name + * @return \FML\Controls\Entry + */ + public function setName($name) { + $this->name = $name; + return $this; + } + + /** + * Set default + * + * @param string $default + * @return \FML\Controls\Entry + */ + public function setDefault($default) { + $this->default = $default; + return $this; + } + + /** + * + * @see \FML\Control::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + if ($this->name) { + $xml->setAttribute('name', $this->name); + } + if ($this->default !== null) { + $xml->setAttribute('default', $this->default); + } + return $xml; + } +} + +?> diff --git a/application/FML/Controls/FileEntry.php b/application/FML/Controls/FileEntry.php new file mode 100644 index 00000000..6f59964a --- /dev/null +++ b/application/FML/Controls/FileEntry.php @@ -0,0 +1,48 @@ +tagName = 'fileentry'; + } + + /** + * Set folder + * + * @param string $folder + * @return \FML\Controls\FileEntry + */ + public function setFolder($folder) { + $this->folder = $folder; + return $this; + } + + /** + * + * @see \FML\Entry::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + $xml->setAttribute('folder', $this->folder); + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Frame.php b/application/FML/Controls/Frame.php new file mode 100644 index 00000000..64cfbdcf --- /dev/null +++ b/application/FML/Controls/Frame.php @@ -0,0 +1,72 @@ +tagName = 'frame'; + } + + /** + * + * @see \FML\Types\Container::add() + * @return \FML\Controls\Frame + */ + public function add(Renderable $child) { + array_push($this->children, $child); + return $this; + } + + /** + * + * @see \FML\Types\Container::removeChildren() + * @return \FML\Controls\Frame + */ + public function removeChildren() { + $this->children = array(); + return $this; + } + + /** + * + * @see \FML\Renderable::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + foreach ($this->children as $child) { + $childXml = $child->render($domDocument); + $xml->appendChild($childXml); + } + return $xml; + } + + /** + * Return class name + * + * @return string + */ + public static function getClass() { + return __CLASS__; + } +} + +?> diff --git a/application/FML/Controls/Frame3d.php b/application/FML/Controls/Frame3d.php new file mode 100644 index 00000000..7cbdfa35 --- /dev/null +++ b/application/FML/Controls/Frame3d.php @@ -0,0 +1,66 @@ +tagName = 'frame3d'; + } + + /** + * Set style3d + * + * @param string $style3d + * @return \FML\Controls\Frame3d + */ + public function setStyle3d($style3d) { + $this->style3d = $style3d; + return $this; + } + + /** + * + * @see \FML\Types\Scriptable::setScriptEvents() + * @return \FML\Controls\Frame3d + */ + public function setScriptEvents($scriptEvents) { + $this->scriptEvents = ($scriptEvents ? 1 : 0); + return $this; + } + + /** + * + * @see \FML\Controls\Frame::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + if ($this->style3d) { + $xml->setAttribute('style3d', $this->style3d); + } + if ($this->scriptEvents) { + $xml->setAttribute('scriptevents', $this->scriptEvents); + } + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Gauge.php b/application/FML/Controls/Gauge.php new file mode 100644 index 00000000..df32a267 --- /dev/null +++ b/application/FML/Controls/Gauge.php @@ -0,0 +1,112 @@ +name = 'gauge'; + } + + /** + * Set ratio + * + * @param real $ratio + */ + public function setRatio($ratio) { + $this->ratio = $ratio; + } + + /** + * Set grading + * + * @param real $grading + */ + public function setGrading($grading) { + $this->grading = $grading; + } + + /** + * Set rotation + * + * @param real $rotation + */ + public function setRotation($rotation) { + $this->rotation = $rotation; + } + + /** + * Set centered + * + * @param bool $centered + */ + public function setCentered($centered) { + $this->centered = ($centered ? 1 : 0); + } + + /** + * Set clan + * + * @param int $clan + */ + public function setClan($clan) { + $this->clan = $clan; + } + + /** + * Set draw background + * + * @param bool $drawBg + */ + public function setDrawBg($drawBg) { + $this->drawBg = ($drawBg ? 1 : 0); + } + + /** + * Set draw block background + * + * @param bool $drawBlockBg + */ + public function setDrawBlockBg($drawBlockBg) { + $this->drawBlockBg = ($drawBlockBg ? 1 : 0); + } + + /** + * + * @see \FML\Control::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + $xml->setAttribute('ratio', $this->ratio); + $xml->setAttribute('grading', $this->grading); + $xml->setAttribute('rotation', $this->rotation); + $xml->setAttribute('centered', $this->centered); + $xml->setAttribute('clan', $this->clan); + $xml->setAttribute('drawbg', $this->drawBg); + $xml->setAttribute('drawblockbg', $this->drawBlockBg); + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Label.php b/application/FML/Controls/Label.php new file mode 100644 index 00000000..1159a193 --- /dev/null +++ b/application/FML/Controls/Label.php @@ -0,0 +1,228 @@ +tagName = 'label'; + $this->setZ(1); + } + + /** + * Set text + * + * @param string $text + * @return \FML\Controls\Label + */ + public function setText($text) { + $this->text = $text; + return $this; + } + + /** + * Set text prefix + * + * @param string $textPrefix + * @return \FML\Controls\Label + */ + public function setTextPrefix($textPrefix) { + $this->textPrefix = $textPrefix; + return $this; + } + + /** + * Set text emboss + * + * @param bool $textEmboss + * @return \FML\Controls\Label + */ + public function setTextEmboss($textEmboss) { + $this->textEmboss = ($textEmboss ? 1 : 0); + return $this; + } + + /** + * Set max lines + * + * @param int $maxLines + * @return \FML\Controls\Label + */ + public function setMaxLines($maxLines) { + $this->maxLines = $maxLines; + return $this; + } + + /** + * + * @see \FML\Types\Linkable::setUrl() + * @return \FML\Controls\Label + */ + public function setUrl($url) { + $this->url = $url; + return $this; + } + + /** + * + * @see \FML\Types\Linkable::setManialink() + * @return \FML\Controls\Label + */ + public function setManialink($manialink) { + $this->manialink = $manialink; + return $this; + } + + /** + * + * @see \FML\Types\NewLineable::setAutoNewLine() + * @return \FML\Controls\Label + */ + public function setAutoNewLine($autoNewLine) { + $this->autoNewLine = ($autoNewLine ? 1 : 0); + return $this; + } + + /** + * + * @see \FML\Types\Scriptable::setScriptEvents() + * @return \FML\Controls\Label + */ + public function setScriptEvents($scriptEvents) { + $this->scriptEvents = ($scriptEvents ? 1 : 0); + return $this; + } + + /** + * + * @see \FML\Types\Styleable::setStyle() + * @return \FML\Controls\Label + */ + public function setStyle($style) { + $this->style = $style; + return $this; + } + + /** + * + * @see \FML\Types\TextFormatable::setTextSize() + * @return \FML\Controls\Label + */ + public function setTextSize($textSize) { + $this->textSize = $textSize; + return $this; + } + + /** + * + * @see \FML\Types\TextFormatable::setTextColor() + * @return \FML\Controls\Label + */ + public function setTextColor($textColor) { + $this->textColor = $textColor; + return $this; + } + + /** + * + * @see \FML\Types\TextFormatable::setAreaColor() + * @return \FML\Controls\Label + */ + public function setAreaColor($areaColor) { + $this->areaColor = $areaColor; + return $this; + } + + /** + * + * @see \FML\Types\TextFormatable::setAreaFocusColor() + * @return \FML\Controls\Label + */ + public function setAreaFocusColor($areaFocusColor) { + $this->areaFocusColor = $areaFocusColor; + return $this; + } + + /** + * + * @see \FML\Control::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + if ($this->text) { + $xml->setAttribute('text', $this->text); + } + if ($this->textPrefix) { + $xml->setAttribute('textprefix', $this->textPrefix); + } + if ($this->textEmboss) { + $xml->setAttribute('textemboss', $this->textEmboss); + } + if ($this->maxLines) { + $xml->setAttribute('maxlines', $this->maxLines); + } + if ($this->url) { + $xml->setAttribute('url', $this->url); + } + if ($this->manialink) { + $xml->setAttribute('manialink', $this->manialink); + } + if ($this->autoNewLine) { + $xml->setAttribute('autonewline', $this->autoNewLine); + } + if ($this->scriptEvents) { + $xml->setAttribute('scriptevents', $this->scriptEvents); + } + if ($this->style) { + $xml->setAttribute('style', $this->style); + } + if ($this->textSize >= 0) { + $xml->setAttribute('textsize', $this->textSize); + } + if ($this->textColor) { + $xml->setAttribute('textcolor', $this->textColor); + } + if ($this->areaColor) { + $xml->setAttribute('areacolor', $this->areaColor); + } + if ($this->areaFocusColor) { + $xml->setAttribute('areafocuscolor', $this->areaFocusColor); + } + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Labels/Label_Button.php b/application/FML/Controls/Labels/Label_Button.php new file mode 100644 index 00000000..385f21b2 --- /dev/null +++ b/application/FML/Controls/Labels/Label_Button.php @@ -0,0 +1,37 @@ + diff --git a/application/FML/Controls/Labels/Label_Text.php b/application/FML/Controls/Labels/Label_Text.php new file mode 100644 index 00000000..1b30be36 --- /dev/null +++ b/application/FML/Controls/Labels/Label_Text.php @@ -0,0 +1,93 @@ + diff --git a/application/FML/Controls/Quad.php b/application/FML/Controls/Quad.php new file mode 100644 index 00000000..7348c70f --- /dev/null +++ b/application/FML/Controls/Quad.php @@ -0,0 +1,197 @@ +tagName = 'quad'; + $this->setZ(-1); + } + + /** + * Set image + * + * @param string $image + * @return \FML\Controls\Quad + */ + public function setImage($image) { + $this->image = $image; + return $this; + } + + /** + * Set focus image + * + * @param string $imageFocus + * @return \FML\Controls\Quad + */ + public function setImageFocus($imageFocus) { + $this->imageFocus = $imageFocus; + return $this; + } + + /** + * Set colorize + * + * @param string $colorize + * @return \FML\Controls\Quad + */ + public function setColorize($colorize) { + $this->colorize = $colorize; + return $this; + } + + /** + * Set modulize color + * + * @param string $modulizeColor + * @return \FML\Controls\Quad + */ + public function setModulizeColor($modulizeColor) { + $this->modulizeColor = $modulizeColor; + return $this; + } + + /** + * + * @see \FML\Types\BgColorable::setBgColor() + * @return \FML\Controls\Quad + */ + public function setBgColor($bgColor) { + $this->bgColor = $bgColor; + return $this; + } + + /** + * + * @see \FML\Types\Linkable::setUrl() + * @return \FML\Controls\Quad + */ + public function setUrl($url) { + $this->url = $url; + return $this; + } + + /** + * + * @see \FML\Types\Linkable::setManialink() + * @return \FML\Controls\Quad + */ + public function setManialink($manialink) { + $this->manialink = $manialink; + return $this; + } + + /** + * + * @see \FML\Types\Scriptable::setScriptEvents() + * @return \FML\Controls\Quad + */ + public function setScriptEvents($scriptEvents) { + $this->scriptEvents = ($scriptEvents ? 1 : 0); + return $this; + } + + /** + * + * @see \FML\Types\Styleable::setStyle() + * @return \FML\Controls\Quad + */ + public function setStyle($style) { + $this->style = $style; + return $this; + } + + /** + * + * @see \FML\Types\SubStyleable::setSubStyle() + * @return \FML\Controls\Quad + */ + public function setSubStyle($subStyle) { + $this->subStyle = $subStyle; + return $this; + } + + /** + * + * @see \FML\Types\SubStyleable::setStyles() + * @return \FML\Controls\Quad + */ + public function setStyles($style, $subStyle) { + $this->setStyle($style); + $this->setSubStyle($subStyle); + return $this; + } + + /** + * + * @see \FML\Control::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + if ($this->image) { + $xml->setAttribute('image', $this->image); + } + if ($this->imageFocus) { + $xml->setAttribute('imagefocus', $this->imageFocus); + } + if ($this->colorize) { + $xml->setAttribute('colorize', $this->colorize); + } + if ($this->modulizeColor) { + $xml->setAttribute('modulizecolor', $this->modulizeColor); + } + if ($this->bgColor) { + $xml->setAttribute('bgcolor', $this->bgColor); + } + if ($this->url) { + $xml->setAttribute('url', $this->url); + } + if ($this->manialink) { + $xml->setAttribute('manialink', $this->manialink); + } + if ($this->scriptEvents) { + $xml->setAttribute('scriptevents', $this->scriptEvents); + } + if ($this->style) { + $xml->setAttribute('style', $this->style); + } + if ($this->subStyle) { + $xml->setAttribute('substyle', $this->subStyle); + } + return $xml; + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_321Go.php b/application/FML/Controls/Quads/Quad_321Go.php new file mode 100644 index 00000000..5407803c --- /dev/null +++ b/application/FML/Controls/Quads/Quad_321Go.php @@ -0,0 +1,31 @@ +setStyle(self::STYLE); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_BgRaceScore2.php b/application/FML/Controls/Quads/Quad_BgRaceScore2.php new file mode 100644 index 00000000..073017d3 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_BgRaceScore2.php @@ -0,0 +1,54 @@ +setStyle(self::STYLE); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Bgs1.php b/application/FML/Controls/Quads/Quad_Bgs1.php new file mode 100644 index 00000000..17c3438c --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Bgs1.php @@ -0,0 +1,35 @@ +setStyle(self::STYLE); + array("ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "BgButton", "BgButtonBig", "BgButtonGlow", "BgButtonGrayed", + "BgButtonOff", "BgButtonShadow", "BgButtonSmall", "BgCard", "BgCard1", "BgCard2", "BgCard3", "BgCardBuddy", + "BgCardChallenge", "BgCardFolder", "BgCardInventoryItem", "BgCardList", "BgCardOnline", "BgCardPlayer", "BgCardSystem", + "BgCardZone", "BgColorContour", "BgDialogBlur", "BgEmpty", "BgGradBottom", "BgGradLeft", "BgGradRight", "BgGradTop", + "BgGradV", "BgHealthBar", "BgIconBorder", "BgList", "BgListLine", "BgPager", "BgProgressBar", "BgShadow", "BgSlider", + "BgSystemBar", "BgTitle2", "BgTitle3", "BgTitle3_1", "BgTitle3_2", "BgTitle3_3", "BgTitle3_4", "BgTitle3_5", "BgTitleGlow", + "BgTitlePage", "BgTitleShadow", "BgWindow1", "BgWindow2", "BgWindow3", "EnergyBar", "EnergyTeam2", "Glow", "HealthBar", + "NavButton", "NavButtonBlink", "NavButtonQuit", "ProgressBar", "ProgressBarSmall", "Shadow"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Bgs1InRace.php b/application/FML/Controls/Quads/Quad_Bgs1InRace.php new file mode 100644 index 00000000..c3634f41 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Bgs1InRace.php @@ -0,0 +1,35 @@ +setStyle(self::STYLE); + array("ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "BgButton", "BgButtonBig", "BgButtonGlow", "BgButtonGrayed", + "BgButtonOff", "BgButtonShadow", "BgButtonSmall", "BgCard", "BgCard1", "BgCard2", "BgCard3", "BgCardBuddy", + "BgCardChallenge", "BgCardFolder", "BgCardInventoryItem", "BgCardList", "BgCardOnline", "BgCardPlayer", "BgCardSystem", + "BgCardZone", "BgColorContour", "BgDialogBlur", "BgEmpty", "BgGradBottom", "BgGradLeft", "BgGradRight", "BgGradTop", + "BgGradV", "BgHealthBar", "BgIconBorder", "BgList", "BgListLine", "BgPager", "BgProgressBar", "BgShadow", "BgSlider", + "BgSystemBar", "BgTitle2", "BgTitle3", "BgTitle3_1", "BgTitle3_2", "BgTitle3_3", "BgTitle3_4", "BgTitle3_5", "BgTitleGlow", + "BgTitlePage", "BgTitleShadow", "BgWindow1", "BgWindow2", "BgWindow3", "EnergyBar", "EnergyTeam2", "Glow", "HealthBar", + "NavButton", "NavButtonBlink", "NavButtonQuit", "ProgressBar", "ProgressBarSmall", "Shadow"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_BgsChallengeMedals.php b/application/FML/Controls/Quads/Quad_BgsChallengeMedals.php new file mode 100644 index 00000000..037949e4 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_BgsChallengeMedals.php @@ -0,0 +1,28 @@ +setStyle(self::STYLE); + array("BgBronze", "BgGold", "BgNadeo", "BgNotPlayed", "BgPlayed", "BgSilver"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_BgsPlayerCard.php b/application/FML/Controls/Quads/Quad_BgsPlayerCard.php new file mode 100644 index 00000000..9edbd56d --- /dev/null +++ b/application/FML/Controls/Quads/Quad_BgsPlayerCard.php @@ -0,0 +1,30 @@ +setStyle(self::STYLE); + array("BgActivePlayerCard", "BgActivePlayerName", "BgActivePlayerScore", "BgCard", "BgCardSystem", "BgMediaTracker", + "BgPlayerCard", "BgPlayerCardBig", "BgPlayerCardSmall", "BgPlayerName", "BgPlayerScore", "BgRacePlayerLine", + "BgRacePlayerName", "ProgressBar"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Copilot.php b/application/FML/Controls/Quads/Quad_Copilot.php new file mode 100644 index 00000000..6a058819 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Copilot.php @@ -0,0 +1,29 @@ +setStyle(self::STYLE); + array("Down", "DownGood", "DownWrong", "Left", "LeftGood", "LeftWrong", "Right", "RightGood", "RightWrong", "Up", "UpGood", + "UpWrong"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Emblems.php b/application/FML/Controls/Quads/Quad_Emblems.php new file mode 100644 index 00000000..1ee6b98c --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Emblems.php @@ -0,0 +1,30 @@ +setStyle(self::STYLE); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_EnergyBar.php b/application/FML/Controls/Quads/Quad_EnergyBar.php new file mode 100644 index 00000000..978f13c7 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_EnergyBar.php @@ -0,0 +1,28 @@ +setStyle(self::STYLE); + array("BgText", "EnergyBar", "EnergyBar_0.25", "EnergyBar_Thin", "HeaderGaugeLeft", "HeaderGaugeRight"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Hud3dEchelons.php b/application/FML/Controls/Quads/Quad_Hud3dEchelons.php new file mode 100644 index 00000000..bd73dc08 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Hud3dEchelons.php @@ -0,0 +1,29 @@ +setStyle(self::STYLE); + array("EchelonBronze1", "EchelonBronze2", "EchelonBronze3", "EchelonGold1", "EchelonGold2", "EchelonGold3", "EchelonSilver1", + "EchelonSilver2", "EchelonSilver3"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Icons128x128_1.php b/application/FML/Controls/Quads/Quad_Icons128x128_1.php new file mode 100644 index 00000000..9b5dbc8c --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Icons128x128_1.php @@ -0,0 +1,34 @@ +setStyle(self::STYLE); + array("Advanced", "Back", "BackFocusable", "Beginner", "Browse", "Buddies", "Challenge", "ChallengeAuthor", "Coppers", + "Create", "Credits", "Custom", "CustomStars", "Default", "Download", "Easy", "Editor", "Event", "Extreme", "Forever", + "GhostEditor", "Hard", "Hotseat", "Inputs", "Invite", "LadderPoints", "Lan", "Launch", "Load", "LoadTrack", "Manialink", + "ManiaZones", "MedalCount", "MediaTracker", "Medium", "Multiplayer", "Nations", "NewTrack", "Options", "Padlock", "Paint", + "Platform", "PlayerPage", "Profile", "ProfileAdvanced", "ProfileVehicle", "Puzzle", "Quit", "Race", "Rankings", "Replay", + "Save", "ServersAll", "ServersFavorites", "ServersSuggested", "Share", "ShareBlink", "SkillPoints", "Solo", "Statistics", + "Stunts", "United", "Upload", "Vehicles"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Icons128x128_Blink.php b/application/FML/Controls/Quads/Quad_Icons128x128_Blink.php new file mode 100644 index 00000000..0bbe1f74 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Icons128x128_Blink.php @@ -0,0 +1,34 @@ +setStyle(self::STYLE); + array("Advanced", "Back", "BackFocusable", "Beginner", "Browse", "Buddies", "Challenge", "ChallengeAuthor", "Coppers", + "Create", "Credits", "Custom", "CustomStars", "Default", "Download", "Easy", "Editor", "Event", "Extreme", "Forever", + "GhostEditor", "Hard", "Hotseat", "Inputs", "Invite", "LadderPoints", "Lan", "Launch", "Load", "LoadTrack", "Manialink", + "ManiaZones", "MedalCount", "MediaTracker", "Medium", "Multiplayer", "Nations", "NewTrack", "Options", "Padlock", "Paint", + "Platform", "PlayerPage", "Profile", "ProfileAdvanced", "ProfileVehicle", "Puzzle", "Quit", "Race", "Rankings", "Replay", + "Save", "ServersAll", "ServersFavorites", "ServersSuggested", "Share", "ShareBlink", "SkillPoints", "Solo", "Statistics", + "Stunts", "United", "Upload", "Vehicles"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Icons128x32_1.php b/application/FML/Controls/Quads/Quad_Icons128x32_1.php new file mode 100644 index 00000000..cef567c4 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Icons128x32_1.php @@ -0,0 +1,30 @@ +setStyle(self::STYLE); + array("Empty", "ManiaLinkHome", "ManiaLinkSwitch", "ManiaPlanet", "Music", "PainterBrush", "PainterFill", "PainterLayer", + "PainterMirror", "PainterSticker", "PainterTeam", "RT_Cup", "RT_Laps", "RT_Rounds", "RT_Script", "RT_Team", "RT_TimeAttack", + "RT_Stunts", "Settings", "SliderBar", "SliderBar2", "SliderCursor", "Sound", "UrlBg", "Windowed"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Icons64x64_1.php b/application/FML/Controls/Quads/Quad_Icons64x64_1.php new file mode 100644 index 00000000..343c50ed --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Icons64x64_1.php @@ -0,0 +1,37 @@ +setStyle(self::STYLE); + array("3DStereo", "Add", "ArrowBlue", "ArrowDisabled", "ArrowDown", "ArrowFastNext", "ArrowFastPrev", "ArrowFirst", + "ArrowGreen", "ArrowLast", "ArrowNext", "ArrowPrev", "ArrowRed", "ArrowUp", "Browser", "Buddy", "ButtonLeagues", "Camera", + "CameraLocal", "Check", "ClipPause", "ClipPlay", "ClipRewind", "Close", "Empty", "Finish", "FinishGrey", "First", + "GenericButton", "Green", "IconLeaguesLadder", "IconPlayers", "IconPlayersLadder", "IconServers", "Inbox", "LvlGreen", + "LvlRed", "LvlYellow", "ManiaLinkNext", "ManiaLinkPrev", "Maximize", "MediaAudioDownloading", "MediaPlay", "MediaStop", + "MediaVideoDownloading", "NewMessage", "NotBuddy", "OfficialRace", "Opponents", "Outbox", "QuitRace", "RedHigh", "RedLow", + "Refresh", "RestartRace", "Save", "Second", "ShowDown", "ShowDown2", "ShowLeft", "ShowLeft2", "ShowRight", "ShowRight2", + "ShowUp", "ShowUp2", "SliderCursor", "SliderCursor2", "StateFavourite", "StatePrivate", "StateSuggested", "Sub", + "TagTypeBronze", "TagTypeGold", "TagTypeNadeo", "TagTypeNone", "TagTypeSilver", "Third", "ToolLeague1", "ToolRoot", + "ToolTree", "ToolUp", "TrackInfo", "TV", "YellowHigh", "YellowLow"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_Icons64x64_2.php b/application/FML/Controls/Quads/Quad_Icons64x64_2.php new file mode 100644 index 00000000..051c3985 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_Icons64x64_2.php @@ -0,0 +1,29 @@ +setStyle(self::STYLE); + array("ArrowElimination", "ArrowHit", "Disconnected", "DisconnectedLight", "LaserElimination", "LaserHit", + "NucleusElimination", "NucleusHit", "RocketElimination", "RocketHit", "ServerNotice", "UnknownElimination", "UnknownHit"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_ManiaPlanetLogos.php b/application/FML/Controls/Quads/Quad_ManiaPlanetLogos.php new file mode 100644 index 00000000..6982cde5 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_ManiaPlanetLogos.php @@ -0,0 +1,34 @@ +setStyle(self::STYLE); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_ManiaplanetSystem.php b/application/FML/Controls/Quads/Quad_ManiaplanetSystem.php new file mode 100644 index 00000000..5670fe69 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_ManiaplanetSystem.php @@ -0,0 +1,33 @@ +setStyle(self::STYLE); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_MedalsBig.php b/application/FML/Controls/Quads/Quad_MedalsBig.php new file mode 100644 index 00000000..fff68487 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_MedalsBig.php @@ -0,0 +1,28 @@ +setStyle(self::STYLE); + array("MedalBronze", "MedalGold", "MedalGoldPerspective", "MedalNadeo", "MedalNadeoPerspective", "MedalSilver", "MedalSlot"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_TitleLogos.php b/application/FML/Controls/Quads/Quad_TitleLogos.php new file mode 100644 index 00000000..5f12be01 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_TitleLogos.php @@ -0,0 +1,28 @@ +setStyle(self::STYLE); + array("Author", "Collection", "Icon", "Title"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_UIConstruction_Buttons.php b/application/FML/Controls/Quads/Quad_UIConstruction_Buttons.php new file mode 100644 index 00000000..50619432 --- /dev/null +++ b/application/FML/Controls/Quads/Quad_UIConstruction_Buttons.php @@ -0,0 +1,33 @@ +setStyle(self::STYLE); + array("ActionMaker", "Add", "Author", "AuthorTime", "BgEditors", "BgIcons", "BgMain", "BgTools", "BlockEditor", "Camera", + "Challenge", "CopyPaste", "DecalEditor", "Delete", "Directory", "Down", "Drive", "Erase", "Help", "Item", "Left", + "MacroBlockEditor", "MediaTracker", "ObjectEditor", "OffZone", "Options", "Paint", "Pick", "Plugins", "Quit", "Redo", + "Reload", "Right", "Save", "SaveAs", "ScriptEditor", "SpotModelClearUnused", "SpotModelDuplicate", "SpotModelNew", + "SpotModelRename", "Square", "Stats", "Sub", "TerrainEditor", "TestSm", "Text", "Tools", "Underground", "Undo", "Up", + "Validate", "Validate_Step1", "Validate_Step2", "Validate_Step3"); + } +} + +?> diff --git a/application/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php b/application/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php new file mode 100644 index 00000000..473c2a5f --- /dev/null +++ b/application/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php @@ -0,0 +1,48 @@ +setStyle(self::STYLE); + } +} + +?> diff --git a/application/FML/Controls/Video.php b/application/FML/Controls/Video.php new file mode 100644 index 00000000..9ab9b1b6 --- /dev/null +++ b/application/FML/Controls/Video.php @@ -0,0 +1,30 @@ +tagName = 'video'; + } + + /** + * + * @see \FML\Control::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = parent::render($domDocument); + return $xml; + } +} + +?> diff --git a/application/FML/Elements/Format.php b/application/FML/Elements/Format.php new file mode 100644 index 00000000..902d6b5b --- /dev/null +++ b/application/FML/Elements/Format.php @@ -0,0 +1,26 @@ +createElement($this->tagName); + return $xml; + } +} + +?> diff --git a/application/FML/Elements/Including.php b/application/FML/Elements/Including.php new file mode 100644 index 00000000..80d1af5b --- /dev/null +++ b/application/FML/Elements/Including.php @@ -0,0 +1,37 @@ +url = $url; + } + + /** + * + * @see \FML\Renderable::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = $domDocument->createElement($this->tagName); + $xml->setAttribute('url', $this->url); + return $xml; + } +} + +?> diff --git a/application/FML/Elements/Music.php b/application/FML/Elements/Music.php new file mode 100644 index 00000000..d39057f9 --- /dev/null +++ b/application/FML/Elements/Music.php @@ -0,0 +1,41 @@ +data = $data; + return $this; + } + + /** + * + * @see \FML\Renderable::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = $domDocument->createElement($this->tagName); + if ($this->data) { + $xml->setAttribute('data', $this->data); + } + return $xml; + } +} + +?> diff --git a/application/FML/Elements/SimpleScript.php b/application/FML/Elements/SimpleScript.php new file mode 100644 index 00000000..4b4abe57 --- /dev/null +++ b/application/FML/Elements/SimpleScript.php @@ -0,0 +1,42 @@ +text = $text; + return $this; + } + + /** + * + * @see \FML\Types\Renderable::render() + */ + public function render(\DOMDocument $domDocument) { + $xml = $domDocument->createElement($this->tagName); + $scriptComment = $domDocument->createComment($this->text); + $xml->appendChild($scriptComment); + return $xml; + } +} + +?> diff --git a/application/FML/ManiaLink.php b/application/FML/ManiaLink.php new file mode 100644 index 00000000..80ab9881 --- /dev/null +++ b/application/FML/ManiaLink.php @@ -0,0 +1,168 @@ +setId($id); + } + } + + /** + * Set xml encoding + * + * @param string $encoding + * @return \FML\ManiaLink + */ + public function setXmlEncoding($encoding) { + $this->encoding = $encoding; + return $this; + } + + /** + * Set id + * + * @param string $id + * @return \FML\ManiaLink + */ + public function setId($id) { + $this->id = $id; + return $this; + } + + /** + * Set background + * + * @param string $background + * @return \FML\ManiaLink + */ + public function setBackground($background) { + $this->background = $background; + return $this; + } + + /** + * Set navigable3d + * + * @param bool $navigable3d + * @return \FML\ManiaLink + */ + public function setNavigable3d($navigable3d) { + $this->navigable3d = ($navigable3d ? 1 : 0); + return $this; + } + + /** + * Set timeout + * + * @param int $timeout + * @return \FML\ManiaLink + */ + public function setTimeout($timeout) { + $this->timeout = $timeout; + return $this; + } + + /** + * + * @see \FML\Types\Container::add() + * @return \FML\ManiaLink + */ + public function add(Renderable $child) { + array_push($this->children, $child); + return $this; + } + + /** + * + * @see \FML\Types\Container::removeChildren() + * @return \FML\ManiaLink + */ + public function removeChildren() { + $this->children = array(); + return $this; + } + + /** + * Set the script object of the manalink + * + * @param Script $script + * @return \FML\ManiaLink + */ + public function setScript(Script $script) { + $this->script = $script; + return $this; + } + + /** + * Render the xml document + * + * @param bool $echo + * If the xml should be echoed and the content-type header should be set + * @return \DOMDocument + */ + public function render($echo = false) { + $domDocument = new \DOMDocument('1.0', $this->encoding); + $manialink = $domDocument->createElement($this->tagName); + $domDocument->appendChild($manialink); + if ($this->id) { + $manialink->setAttribute('id', $this->id); + } + if ($this->version) { + $manialink->setAttribute('version', $this->version); + } + if ($this->background) { + $manialink->setAttribute('background', $this->background); + } + if ($this->navigable3d) { + $manialink->setAttribute('navigable3d', $this->navigable3d); + } + if ($this->timeout) { + $timeoutXml = $domDocument->createElement('timeout', $this->timeout); + $manialink->appendChild($timeoutXml); + } + foreach ($this->children as $child) { + $childXml = $child->render($domDocument); + $manialink->appendChild($childXml); + } + if ($this->script) { + $scriptXml = $this->script->render($domDocument); + $manialink->appendChild($scriptXml); + } + if ($echo) { + header('Content-Type: application/xml'); + echo $domDocument->saveXML(); + } + return $domDocument; + } +} + +?> diff --git a/application/FML/Script/Script.php b/application/FML/Script/Script.php new file mode 100644 index 00000000..9f73b29d --- /dev/null +++ b/application/FML/Script/Script.php @@ -0,0 +1,206 @@ +features, $scriptFeature); + return $this; + } + + /** + * Remove all script features + * + * @return \FML\Script\Script + */ + public function removeFeatures() { + $this->features = array(); + return $this; + } + + /** + * Create the script xml tag + * + * @param \DOMDocument $domDocument + * @return DOMElement + */ + public function render(\DOMDocument $domDocument) { + $scriptXml = $domDocument->createElement('script'); + $scriptText = $this->buildScriptText(); + $scriptComment = $domDocument->createComment($scriptText); + $scriptXml->appendChild($scriptComment); + return $scriptXml; + } + + /** + * Build the complete script text based on all script items + * + * @return string + */ + private function buildScriptText() { + $scriptText = ""; + $scriptText = $this->addIncludesPart($scriptText); + $scriptText = $this->addConstantsPart($scriptText); + $scriptText = $this->addLabelsPart($scriptText); + $scriptText = $this->addFunctionsPart($scriptText); + $scriptText = $this->addMainPart($scriptText); + return $scriptText; + } + + /** + * Add the includes to the script + * + * @param string $scriptText + * @return string + */ + private function addIncludesPart($scriptText) { + $includes = array(); + foreach ($this->features as $feature) { + if (!($feature instanceof Includes)) { + continue; + } + $featureIncludes = $feature->getIncludes(); + foreach ($featureIncludes as $namespace => $fileName) { + $includes[$namespace] = $fileName; + } + } + $includesPart = PHP_EOL; + foreach ($includes as $namespace => $fileName) { + $includesPart .= "#Include \"{$fileName}\" as {$namespace}" . PHP_EOL; + } + return $scriptText . $includesPart; + } + + /** + * Add the declared constants to the script + * + * @param string $scriptText + * @return string + */ + private function addConstantsPart($scriptText) { + $constants = array(); + foreach ($this->features as $feature) { + if (!($feature instanceof Constants)) { + continue; + } + $featureConstants = $feature->getConstants(); + foreach ($featureConstants as $name => $value) { + $constants[$name] = $value; + } + } + $constantsPart = PHP_EOL; + foreach ($constants as $name => $value) { + $constantsPart .= "#Const {$name} {$value}" . PHP_EOL; + } + return $scriptText . $constantsPart; + } + + /** + * Add the declared global variables to the script + * + * @param string $scriptText + * @return string + */ + private function addGlobalsPart($scriptText) { + $globals = array(); + foreach ($this->features as $feature) { + if (!($feature instanceof Globals)) { + continue; + } + $featureGlobals = $feature->getGlobals(); + foreach ($featureGlobals as $name => $type) { + $globals[$name] = $type; + } + } + $globalsPart = PHP_EOL; + foreach ($globals as $name => $type) { + $globalsPart .= "declare {$type} {$name};" . PHP_EOL; + } + return $scriptText . $globalsPart; + } + + /** + * Add the implemented labels to the script + * + * @param string $scriptText + * @return string + */ + private function addLabelsPart($scriptText) { + $labels = array(); + foreach ($this->features as $feature) { + if (!($feature instanceof Labels)) { + continue; + } + $featureLabels = $feature->getLabels(); + foreach ($featureLabels as $name => $implementation) { + $label = array($name, $implementation); + array_push($labels, $label); + } + } + $labelsPart = PHP_EOL; + foreach ($labels as $label) { + $labelsPart .= '***' . $label[0] . '***' . PHP_EOL . '***' . PHP_EOL . $label[1] . PHP_EOL . '***' . PHP_EOL; + } + return $scriptText . $labelsPart; + } + + /** + * Add the declared functions to the script + * + * @param string $scriptText + * @return string + */ + private function addFunctionsPart($scriptText) { + $functions = array(); + foreach ($this->features as $feature) { + if (!($feature instanceof Functions)) { + continue; + } + $featureFunctions = $feature->getFunctions(); + foreach ($featureFunctions as $signature => $implementation) { + $functions[$signature] = $implementation; + } + } + $functionsPart = PHP_EOL; + foreach ($functions as $signature => $implementation) { + $functionsPart .= $signature . '{' . PHP_EOL . $implementation . PHP_EOL . '}' . PHP_EOL; + } + return $scriptText . $functionsPart; + } + + /** + * Add the main function to the script + * + * @param string $scriptText + * @return string + */ + private function addMainPart($scriptText) { + $mainPart = file_get_contents(__DIR__ . '/Templates/Main.txt'); + return $scriptText . $mainPart; + } +} + +?> diff --git a/application/FML/Script/ScriptFeature.php b/application/FML/Script/ScriptFeature.php new file mode 100644 index 00000000..553cad5f --- /dev/null +++ b/application/FML/Script/ScriptFeature.php @@ -0,0 +1,13 @@ + diff --git a/application/FML/Script/Sections/Constants.php b/application/FML/Script/Sections/Constants.php new file mode 100644 index 00000000..806a3b1d --- /dev/null +++ b/application/FML/Script/Sections/Constants.php @@ -0,0 +1,18 @@ + diff --git a/application/FML/Script/Sections/Functions.php b/application/FML/Script/Sections/Functions.php new file mode 100644 index 00000000..2082d4c9 --- /dev/null +++ b/application/FML/Script/Sections/Functions.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Script/Sections/Globals.php b/application/FML/Script/Sections/Globals.php new file mode 100644 index 00000000..a8fff706 --- /dev/null +++ b/application/FML/Script/Sections/Globals.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Script/Sections/Includes.php b/application/FML/Script/Sections/Includes.php new file mode 100644 index 00000000..a3897ae8 --- /dev/null +++ b/application/FML/Script/Sections/Includes.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Script/Sections/Labels.php b/application/FML/Script/Sections/Labels.php new file mode 100644 index 00000000..e897b5da --- /dev/null +++ b/application/FML/Script/Sections/Labels.php @@ -0,0 +1,30 @@ + diff --git a/application/FML/Script/Templates/Main.txt b/application/FML/Script/Templates/Main.txt new file mode 100644 index 00000000..c2b85121 --- /dev/null +++ b/application/FML/Script/Templates/Main.txt @@ -0,0 +1,27 @@ + +main() { + +++OnInit+++ + while (True) { + yield; + foreach (Event in PendingEvents) { + switch (Event.Type) { + case CMlEvent::Type::EntrySubmit: { + +++EntrySubmit+++ + } + case CMlEvent::Type::KeyPress: { + +++KeyPress+++ + } + case CMlEvent::Type::MouseClick: { + +++MouseClick+++ + } + case CMlEvent::Type::MouseOut: { + +++MouseOut+++ + } + case CMlEvent::Type::MouseOver: { + +++MouseOver+++ + } + } + } + +++Loop+++ + } +} diff --git a/application/FML/Script/Templates/TooltipMouseOut.txt b/application/FML/Script/Templates/TooltipMouseOut.txt new file mode 100644 index 00000000..e41629aa --- /dev/null +++ b/application/FML/Script/Templates/TooltipMouseOut.txt @@ -0,0 +1,6 @@ +if (C_FML_TooltipIds.existskey(Event.ControlId)) { + declare TooltipControl <=> Page.GetFirstChild(C_FML_TooltipIds[Event.ControlId]); + if (TooltipControl != Null) { + TooltipControl.Hide(); + } +} \ No newline at end of file diff --git a/application/FML/Script/Templates/TooltipMouseOver.txt b/application/FML/Script/Templates/TooltipMouseOver.txt new file mode 100644 index 00000000..c9c369de --- /dev/null +++ b/application/FML/Script/Templates/TooltipMouseOver.txt @@ -0,0 +1,6 @@ +if (C_FML_TooltipIds.existskey(Event.ControlId)) { + declare TooltipControl <=> Page.GetFirstChild(C_FML_TooltipIds[Event.ControlId]); + if (TooltipControl != Null) { + TooltipControl.Show(); + } +} \ No newline at end of file diff --git a/application/FML/Script/Tooltips.php b/application/FML/Script/Tooltips.php new file mode 100644 index 00000000..67e350fe --- /dev/null +++ b/application/FML/Script/Tooltips.php @@ -0,0 +1,71 @@ +assignId(); + $tooltipControl->assignId(); + $this->tooltips[$hoverControl->getId()] = $tooltipControl->getId(); + return $this; + } + + /** + * + * @see \FML\Script\Sections\Constants::getConstants() + */ + public function getConstants() { + $constant = '['; + foreach ($this->tooltips as $hoverId => $tooltipId) { + $constant .= '"' . $hoverId . '" => "' . $tooltipId . '"'; + if ($index < count($this->tooltips) - 1) { + $constant .= ','; + } + } + $constant .= ']'; + $constants = array(); + $constants[self::C_TOOLTIPIDS] = $constant; + return $constants; + } + + /** + * + * @see \FML\Script\Sections\Labels::getLabels() + */ + public function getLabels() { + $labels = array(); + $labelMouseOut = file_get_contents(__DIR__ . '/Templates/TooltipMouseOut.txt'); + $labels[Labels::MOUSEOUT] = $labelMouseOut; + $labelMouseOver = file_get_contents(__DIR__ . '/Templates/TooltipMouseOver.txt'); + $labels[Labels::MOUSEOVER] = $labelMouseOver; + return $labels; + } +} + +?> diff --git a/application/FML/Types/BgColorable.php b/application/FML/Types/BgColorable.php new file mode 100644 index 00000000..98f2bc85 --- /dev/null +++ b/application/FML/Types/BgColorable.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Types/Container.php b/application/FML/Types/Container.php new file mode 100644 index 00000000..22f3fbea --- /dev/null +++ b/application/FML/Types/Container.php @@ -0,0 +1,25 @@ + diff --git a/application/FML/Types/Linkable.php b/application/FML/Types/Linkable.php new file mode 100644 index 00000000..f233b1f2 --- /dev/null +++ b/application/FML/Types/Linkable.php @@ -0,0 +1,27 @@ + diff --git a/application/FML/Types/NewLineable.php b/application/FML/Types/NewLineable.php new file mode 100644 index 00000000..96876c56 --- /dev/null +++ b/application/FML/Types/NewLineable.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Types/Playable.php b/application/FML/Types/Playable.php new file mode 100644 index 00000000..d1651168 --- /dev/null +++ b/application/FML/Types/Playable.php @@ -0,0 +1,56 @@ + diff --git a/application/FML/Types/Renderable.php b/application/FML/Types/Renderable.php new file mode 100644 index 00000000..3a2de248 --- /dev/null +++ b/application/FML/Types/Renderable.php @@ -0,0 +1,21 @@ + diff --git a/application/FML/Types/Scriptable.php b/application/FML/Types/Scriptable.php new file mode 100644 index 00000000..43071d00 --- /dev/null +++ b/application/FML/Types/Scriptable.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Types/Styleable.php b/application/FML/Types/Styleable.php new file mode 100644 index 00000000..68036f4c --- /dev/null +++ b/application/FML/Types/Styleable.php @@ -0,0 +1,20 @@ + diff --git a/application/FML/Types/SubStyleable.php b/application/FML/Types/SubStyleable.php new file mode 100644 index 00000000..d00adb62 --- /dev/null +++ b/application/FML/Types/SubStyleable.php @@ -0,0 +1,28 @@ + diff --git a/application/FML/Types/TextFormatable.php b/application/FML/Types/TextFormatable.php new file mode 100644 index 00000000..5cc8ec20 --- /dev/null +++ b/application/FML/Types/TextFormatable.php @@ -0,0 +1,41 @@ + diff --git a/application/FML/autoload.php b/application/FML/autoload.php new file mode 100644 index 00000000..29de3999 --- /dev/null +++ b/application/FML/autoload.php @@ -0,0 +1,22 @@ + diff --git a/application/core/Manialinks/ManialinkUtil.php b/application/core/Manialinks/ManialinkUtil.php index 6feb1732..60ceb938 100644 --- a/application/core/Manialinks/ManialinkUtil.php +++ b/application/core/Manialinks/ManialinkUtil.php @@ -2,6 +2,8 @@ namespace ManiaControl\Manialinks; +require_once __DIR__ . '/../../FML/autoload.php'; + /** * Manialink utility class * diff --git a/application/plugins/testPlugin.php b/application/plugins/testPlugin.php deleted file mode 100644 index d0db4962..00000000 --- a/application/plugins/testPlugin.php +++ /dev/null @@ -1,22 +0,0 @@ -maniaControl = $maniaControl; - - $this->author = 'steeffeen'; - $this->name = 'Test Plugin'; - $this->version = '1.0'; - $this->description = 'Dummy plugin for testing plugin handling'; - } -} - -?>