From 11abd5ee6ea047425770a9f51391c75790503644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 21 Jan 2014 20:30:40 +0100 Subject: [PATCH] fml update --- application/core/FML/Controls/Audio.php | 2 +- application/core/FML/Controls/Control.php | 4 +- application/core/FML/Controls/Entry.php | 2 +- application/core/FML/Controls/FileEntry.php | 2 +- application/core/FML/Controls/Frame.php | 2 +- application/core/FML/Controls/Frame3d.php | 2 +- .../core/FML/Controls/FrameInstance.php | 2 +- application/core/FML/Controls/Gauge.php | 11 ++- application/core/FML/Controls/Label.php | 14 +++- .../core/FML/Controls/Labels/Label_Button.php | 2 +- .../core/FML/Controls/Labels/Label_Text.php | 4 +- application/core/FML/Controls/Quad.php | 12 +++- .../core/FML/Controls/Quads/Quad_321Go.php | 2 +- .../FML/Controls/Quads/Quad_BgRaceScore2.php | 2 +- .../core/FML/Controls/Quads/Quad_Bgs1.php | 2 +- .../FML/Controls/Quads/Quad_Bgs1InRace.php | 2 +- .../Quads/Quad_BgsChallengeMedals.php | 2 +- .../FML/Controls/Quads/Quad_BgsPlayerCard.php | 2 +- .../core/FML/Controls/Quads/Quad_Copilot.php | 2 +- .../core/FML/Controls/Quads/Quad_Emblems.php | 2 +- .../FML/Controls/Quads/Quad_EnergyBar.php | 2 +- .../FML/Controls/Quads/Quad_Hud3dEchelons.php | 2 +- .../Controls/Quads/Quad_Icons128x128_1.php | 2 +- .../Quads/Quad_Icons128x128_Blink.php | 2 +- .../FML/Controls/Quads/Quad_Icons128x32_1.php | 2 +- .../FML/Controls/Quads/Quad_Icons64x64_1.php | 2 +- .../FML/Controls/Quads/Quad_Icons64x64_2.php | 2 +- .../Controls/Quads/Quad_ManiaPlanetLogos.php | 2 +- .../Controls/Quads/Quad_ManiaplanetSystem.php | 2 +- .../FML/Controls/Quads/Quad_MedalsBig.php | 2 +- .../FML/Controls/Quads/Quad_TitleLogos.php | 2 +- .../Quads/Quad_UIConstruction_Buttons.php | 2 +- .../Quads/Quad_UiSMSpectatorScoreBig.php | 2 +- application/core/FML/Controls/Video.php | 2 +- application/core/FML/CustomUI.php | 2 +- application/core/FML/Elements/Dico.php | 2 +- application/core/FML/Elements/Format.php | 2 +- application/core/FML/Elements/FrameModel.php | 2 +- application/core/FML/Elements/Including.php | 2 +- application/core/FML/Elements/Music.php | 2 +- .../core/FML/Elements/SimpleScript.php | 2 +- application/core/FML/ManiaCode.php | 2 +- application/core/FML/ManiaCode/AddBuddy.php | 2 +- .../core/FML/ManiaCode/AddFavorite.php | 2 +- application/core/FML/ManiaCode/GetSkin.php | 2 +- application/core/FML/ManiaCode/Go_To.php | 2 +- application/core/FML/ManiaCode/InstallMap.php | 2 +- .../core/FML/ManiaCode/InstallPack.php | 2 +- .../core/FML/ManiaCode/InstallReplay.php | 2 +- .../core/FML/ManiaCode/InstallScript.php | 2 +- .../core/FML/ManiaCode/InstallSkin.php | 2 +- application/core/FML/ManiaCode/JoinServer.php | 2 +- application/core/FML/ManiaCode/PlayMap.php | 2 +- application/core/FML/ManiaCode/PlayReplay.php | 2 +- .../core/FML/ManiaCode/ShowMessage.php | 2 +- application/core/FML/ManiaCode/ViewReplay.php | 2 +- application/core/FML/ManiaLink.php | 15 ++-- application/core/FML/ManiaLinks.php | 2 +- application/core/FML/Script/EUISound.php | 2 +- application/core/FML/Script/Script.php | 69 +++++++++++++++++-- application/core/FML/Stylesheet/Mood.php | 2 +- application/core/FML/Stylesheet/Style3d.php | 4 +- .../core/FML/Stylesheet/Stylesheet.php | 2 +- application/core/FML/Types/Actionable.php | 25 ++++++- application/core/FML/Types/BgColorable.php | 1 + application/core/FML/Types/Linkable.php | 4 ++ application/core/FML/Types/NewLineable.php | 1 + application/core/FML/Types/Playable.php | 6 ++ application/core/FML/Types/Scriptable.php | 1 + application/core/FML/Types/Styleable.php | 1 + application/core/FML/Types/SubStyleable.php | 2 + application/core/FML/Types/TextFormatable.php | 4 ++ application/core/FML/autoload.php | 4 +- 73 files changed, 209 insertions(+), 83 deletions(-) diff --git a/application/core/FML/Controls/Audio.php b/application/core/FML/Controls/Audio.php index 63436599..6bb59051 100644 --- a/application/core/FML/Controls/Audio.php +++ b/application/core/FML/Controls/Audio.php @@ -12,7 +12,7 @@ use FML\Types\Scriptable; * @author steeffeen */ class Audio extends Control implements Playable, Scriptable { - /** + /* * Protected Properties */ protected $data = ''; diff --git a/application/core/FML/Controls/Control.php b/application/core/FML/Controls/Control.php index 3174acc1..f4afd58c 100644 --- a/application/core/FML/Controls/Control.php +++ b/application/core/FML/Controls/Control.php @@ -11,7 +11,7 @@ use FML\Types\Renderable; * @author steeffeen */ abstract class Control implements Renderable { - /** + /* * Constants */ const CENTER = 'center'; @@ -21,7 +21,7 @@ abstract class Control implements Renderable { const BOTTOM = 'bottom'; const LEFT = 'left'; - /** + /* * Protected Properties */ protected $tagName = 'control'; diff --git a/application/core/FML/Controls/Entry.php b/application/core/FML/Controls/Entry.php index ba8a0ec4..a0b7d1f8 100644 --- a/application/core/FML/Controls/Entry.php +++ b/application/core/FML/Controls/Entry.php @@ -14,7 +14,7 @@ use FML\Types\TextFormatable; * @author steeffeen */ class Entry extends Control implements NewLineable, Scriptable, Styleable, TextFormatable { - /** + /* * Protected Properties */ protected $name = ''; diff --git a/application/core/FML/Controls/FileEntry.php b/application/core/FML/Controls/FileEntry.php index b3ca3f7b..6dc2d44c 100644 --- a/application/core/FML/Controls/FileEntry.php +++ b/application/core/FML/Controls/FileEntry.php @@ -9,7 +9,7 @@ namespace FML\Controls; * @author steeffeen */ class FileEntry extends Entry { - /** + /* * Protected Properties */ protected $folder = ''; diff --git a/application/core/FML/Controls/Frame.php b/application/core/FML/Controls/Frame.php index 4642118d..06c783e8 100644 --- a/application/core/FML/Controls/Frame.php +++ b/application/core/FML/Controls/Frame.php @@ -14,7 +14,7 @@ use FML\Elements\FrameModel; * @author steeffeen */ class Frame extends Control implements Container { - /** + /* * Protected Properties */ protected $children = array(); diff --git a/application/core/FML/Controls/Frame3d.php b/application/core/FML/Controls/Frame3d.php index 67c498ec..4e1e15ab 100644 --- a/application/core/FML/Controls/Frame3d.php +++ b/application/core/FML/Controls/Frame3d.php @@ -12,7 +12,7 @@ use FML\Stylesheet\Style3d; * @author steeffeen */ class Frame3d extends Frame implements Scriptable { - /** + /* * Protected Properties */ protected $style3dId = ''; diff --git a/application/core/FML/Controls/FrameInstance.php b/application/core/FML/Controls/FrameInstance.php index ae445958..dceaf4ce 100644 --- a/application/core/FML/Controls/FrameInstance.php +++ b/application/core/FML/Controls/FrameInstance.php @@ -12,7 +12,7 @@ use FML\Types\Renderable; * @author steeffeen */ class FrameInstance extends Control { - /** + /* * Protected Properties */ protected $modelId = ''; diff --git a/application/core/FML/Controls/Gauge.php b/application/core/FML/Controls/Gauge.php index a0a2d813..309c21d4 100644 --- a/application/core/FML/Controls/Gauge.php +++ b/application/core/FML/Controls/Gauge.php @@ -10,9 +10,16 @@ use FML\Types\Styleable; * * @author steeffeen */ -// TODO: gauge styles class Gauge extends Control implements Styleable { - /** + /* + * Constants + */ + const STYLE_BgCard = 'BgCard'; + const STYLE_EnergyBar = 'EnergyBar'; + const STYLE_ProgressBar = 'ProgressBar'; + const STYLE_ProgressBarSmall = 'ProgressBarSmall'; + + /* * Protected Properties */ protected $ratio = 0.; diff --git a/application/core/FML/Controls/Label.php b/application/core/FML/Controls/Label.php index 015b5afb..3b44c918 100644 --- a/application/core/FML/Controls/Label.php +++ b/application/core/FML/Controls/Label.php @@ -16,7 +16,7 @@ use FML\Types\TextFormatable; * @author steeffeen */ class Label extends Control implements Actionable, Linkable, NewLineable, Scriptable, Styleable, TextFormatable { - /** + /* * Protected Properties */ protected $text = ''; @@ -137,6 +137,14 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script return $this; } + /** + * + * @see \FML\Types\Actionable::getAction() + */ + public function getAction() { + return $this->action; + } + /** * * @see \FML\Types\Actionable::setActionKey() @@ -263,7 +271,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script */ public function render(\DOMDocument $domDocument) { $xmlElement = parent::render($domDocument); - if ($this->text) { + if (strlen($this->text) > 0) { $xmlElement->setAttribute('text', $this->text); } if ($this->textId) { @@ -281,7 +289,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script if ($this->maxLines >= 0) { $xmlElement->setAttribute('maxlines', $this->maxLines); } - if ($this->action) { + if (strlen($this->action) > 0) { $xmlElement->setAttribute('action', $this->action); } if ($this->actionKey >= 0) { diff --git a/application/core/FML/Controls/Labels/Label_Button.php b/application/core/FML/Controls/Labels/Label_Button.php index 75739e41..da709936 100644 --- a/application/core/FML/Controls/Labels/Label_Button.php +++ b/application/core/FML/Controls/Labels/Label_Button.php @@ -10,7 +10,7 @@ use FML\Controls\Label; * @author steeffeen */ class Label_Button extends Label { - /** + /* * Constants */ const STYLE_CardButtonMedium = 'CardButtonMedium'; diff --git a/application/core/FML/Controls/Labels/Label_Text.php b/application/core/FML/Controls/Labels/Label_Text.php index 5dcb2242..4517bf02 100644 --- a/application/core/FML/Controls/Labels/Label_Text.php +++ b/application/core/FML/Controls/Labels/Label_Text.php @@ -10,7 +10,7 @@ use FML\Controls\Label; * @author steeffeen */ class Label_Text extends Label { - /** + /* * Constants */ const STYLE_AvatarButtonNormal = 'AvatarButtonNormal'; @@ -93,7 +93,7 @@ class Label_Text extends Label { * Create a new Label_Text Control * * @param string $id (optional) Control Id - * @return \FML\Controls\Labels\Label_Button + * @return \FML\Controls\Labels\Label_Text */ public static function create($id = null) { $labelText = new Label_Text($id); diff --git a/application/core/FML/Controls/Quad.php b/application/core/FML/Controls/Quad.php index e5a931cd..3114c0d8 100644 --- a/application/core/FML/Controls/Quad.php +++ b/application/core/FML/Controls/Quad.php @@ -16,7 +16,7 @@ use FML\Types\SubStyleable; * @author steeffeen */ class Quad extends Control implements Actionable, BgColorable, Linkable, Scriptable, Styleable, SubStyleable { - /** + /* * Protected Properties */ protected $image = ''; @@ -146,6 +146,14 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta return $this; } + /** + * + * @see \FML\Types\Actionable::getAction() + */ + public function getAction() { + return $this->action; + } + /** * * @see \FML\Types\Actionable::setActionKey() @@ -274,7 +282,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta if (!$this->autoScale) { $xmlElement->setAttribute('autoscale', $this->autoScale); } - if ($this->action) { + if (strlen($this->action) > 0) { $xmlElement->setAttribute('action', $this->action); } if ($this->actionKey >= 0) { diff --git a/application/core/FML/Controls/Quads/Quad_321Go.php b/application/core/FML/Controls/Quads/Quad_321Go.php index 9e640a9f..df9da295 100644 --- a/application/core/FML/Controls/Quads/Quad_321Go.php +++ b/application/core/FML/Controls/Quads/Quad_321Go.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_321Go extends Quad { - /** + /* * Constants */ const STYLE = '321Go'; diff --git a/application/core/FML/Controls/Quads/Quad_BgRaceScore2.php b/application/core/FML/Controls/Quads/Quad_BgRaceScore2.php index e2616c73..64971c0a 100644 --- a/application/core/FML/Controls/Quads/Quad_BgRaceScore2.php +++ b/application/core/FML/Controls/Quads/Quad_BgRaceScore2.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_BgRaceScore2 extends Quad { - /** + /* * Constants */ const STYLE = 'BgRaceScore2'; diff --git a/application/core/FML/Controls/Quads/Quad_Bgs1.php b/application/core/FML/Controls/Quads/Quad_Bgs1.php index ba1230c0..b0bd1d4c 100644 --- a/application/core/FML/Controls/Quads/Quad_Bgs1.php +++ b/application/core/FML/Controls/Quads/Quad_Bgs1.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Bgs1 extends Quad { - /** + /* * Constants */ const STYLE = 'Bgs1'; diff --git a/application/core/FML/Controls/Quads/Quad_Bgs1InRace.php b/application/core/FML/Controls/Quads/Quad_Bgs1InRace.php index 8568fd1a..af5ece2b 100644 --- a/application/core/FML/Controls/Quads/Quad_Bgs1InRace.php +++ b/application/core/FML/Controls/Quads/Quad_Bgs1InRace.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Bgs1InRace extends Quad { - /** + /* * Constants */ const STYLE = 'Bgs1InRace'; diff --git a/application/core/FML/Controls/Quads/Quad_BgsChallengeMedals.php b/application/core/FML/Controls/Quads/Quad_BgsChallengeMedals.php index 618b1d2c..239ae827 100644 --- a/application/core/FML/Controls/Quads/Quad_BgsChallengeMedals.php +++ b/application/core/FML/Controls/Quads/Quad_BgsChallengeMedals.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_BgsChallengeMedals extends Quad { - /** + /* * Constants */ const STYLE = 'BgsChallengeMedals'; diff --git a/application/core/FML/Controls/Quads/Quad_BgsPlayerCard.php b/application/core/FML/Controls/Quads/Quad_BgsPlayerCard.php index 9903c0b6..963aded3 100644 --- a/application/core/FML/Controls/Quads/Quad_BgsPlayerCard.php +++ b/application/core/FML/Controls/Quads/Quad_BgsPlayerCard.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_BgsPlayerCard extends Quad { - /** + /* * Constants */ const STYLE = 'BgsPlayerCard'; diff --git a/application/core/FML/Controls/Quads/Quad_Copilot.php b/application/core/FML/Controls/Quads/Quad_Copilot.php index 049673e8..cfb59aed 100644 --- a/application/core/FML/Controls/Quads/Quad_Copilot.php +++ b/application/core/FML/Controls/Quads/Quad_Copilot.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Copilot extends Quad { - /** + /* * Constants */ const STYLE = 'Copilot'; diff --git a/application/core/FML/Controls/Quads/Quad_Emblems.php b/application/core/FML/Controls/Quads/Quad_Emblems.php index 0a41f077..71cc33a4 100644 --- a/application/core/FML/Controls/Quads/Quad_Emblems.php +++ b/application/core/FML/Controls/Quads/Quad_Emblems.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Emblems extends Quad { - /** + /* * Constants */ const STYLE = 'Emblems'; diff --git a/application/core/FML/Controls/Quads/Quad_EnergyBar.php b/application/core/FML/Controls/Quads/Quad_EnergyBar.php index 3d66a196..c6308df5 100644 --- a/application/core/FML/Controls/Quads/Quad_EnergyBar.php +++ b/application/core/FML/Controls/Quads/Quad_EnergyBar.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_EnergyBar extends Quad { - /** + /* * Constants */ const STYLE = 'EnergyBar'; diff --git a/application/core/FML/Controls/Quads/Quad_Hud3dEchelons.php b/application/core/FML/Controls/Quads/Quad_Hud3dEchelons.php index 33cc67df..e03f0596 100644 --- a/application/core/FML/Controls/Quads/Quad_Hud3dEchelons.php +++ b/application/core/FML/Controls/Quads/Quad_Hud3dEchelons.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Hud3dEchelons extends Quad { - /** + /* * Constants */ const STYLE = 'Hud3dEchelons'; diff --git a/application/core/FML/Controls/Quads/Quad_Icons128x128_1.php b/application/core/FML/Controls/Quads/Quad_Icons128x128_1.php index 3086066c..33df6987 100644 --- a/application/core/FML/Controls/Quads/Quad_Icons128x128_1.php +++ b/application/core/FML/Controls/Quads/Quad_Icons128x128_1.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Icons128x128_1 extends Quad { - /** + /* * Constants */ const STYLE = 'Icons128x128_1'; diff --git a/application/core/FML/Controls/Quads/Quad_Icons128x128_Blink.php b/application/core/FML/Controls/Quads/Quad_Icons128x128_Blink.php index 23f749b7..af5167e2 100644 --- a/application/core/FML/Controls/Quads/Quad_Icons128x128_Blink.php +++ b/application/core/FML/Controls/Quads/Quad_Icons128x128_Blink.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Icons128x128_Blink extends Quad { - /** + /* * Constants */ const STYLE = 'Icons128x128_Blink'; diff --git a/application/core/FML/Controls/Quads/Quad_Icons128x32_1.php b/application/core/FML/Controls/Quads/Quad_Icons128x32_1.php index b1892255..d5b4c84d 100644 --- a/application/core/FML/Controls/Quads/Quad_Icons128x32_1.php +++ b/application/core/FML/Controls/Quads/Quad_Icons128x32_1.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Icons128x32_1 extends Quad { - /** + /* * Constants */ const STYLE = 'Icons128x32_1'; diff --git a/application/core/FML/Controls/Quads/Quad_Icons64x64_1.php b/application/core/FML/Controls/Quads/Quad_Icons64x64_1.php index 2d411257..916520f5 100644 --- a/application/core/FML/Controls/Quads/Quad_Icons64x64_1.php +++ b/application/core/FML/Controls/Quads/Quad_Icons64x64_1.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Icons64x64_1 extends Quad { - /** + /* * Constants */ const STYLE = 'Icons64x64_1'; diff --git a/application/core/FML/Controls/Quads/Quad_Icons64x64_2.php b/application/core/FML/Controls/Quads/Quad_Icons64x64_2.php index 6f931b9c..3b10dc73 100644 --- a/application/core/FML/Controls/Quads/Quad_Icons64x64_2.php +++ b/application/core/FML/Controls/Quads/Quad_Icons64x64_2.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_Icons64x64_2 extends Quad { - /** + /* * Constants */ const STYLE = 'Icons64x64_2'; diff --git a/application/core/FML/Controls/Quads/Quad_ManiaPlanetLogos.php b/application/core/FML/Controls/Quads/Quad_ManiaPlanetLogos.php index 7df4dcf2..fe9298f8 100644 --- a/application/core/FML/Controls/Quads/Quad_ManiaPlanetLogos.php +++ b/application/core/FML/Controls/Quads/Quad_ManiaPlanetLogos.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_ManiaPlanetLogos extends Quad { - /** + /* * Constants */ const STYLE = 'ManiaPlanetLogos'; diff --git a/application/core/FML/Controls/Quads/Quad_ManiaplanetSystem.php b/application/core/FML/Controls/Quads/Quad_ManiaplanetSystem.php index b6590a3c..b0d342ad 100644 --- a/application/core/FML/Controls/Quads/Quad_ManiaplanetSystem.php +++ b/application/core/FML/Controls/Quads/Quad_ManiaplanetSystem.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_ManiaplanetSystem extends Quad { - /** + /* * Constants */ const STYLE = 'ManiaplanetSystem'; diff --git a/application/core/FML/Controls/Quads/Quad_MedalsBig.php b/application/core/FML/Controls/Quads/Quad_MedalsBig.php index cd511da6..972d8158 100644 --- a/application/core/FML/Controls/Quads/Quad_MedalsBig.php +++ b/application/core/FML/Controls/Quads/Quad_MedalsBig.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_MedalsBig extends Quad { - /** + /* * Constants */ const STYLE = 'MedalsBig'; diff --git a/application/core/FML/Controls/Quads/Quad_TitleLogos.php b/application/core/FML/Controls/Quads/Quad_TitleLogos.php index c9e09c86..11528acb 100644 --- a/application/core/FML/Controls/Quads/Quad_TitleLogos.php +++ b/application/core/FML/Controls/Quads/Quad_TitleLogos.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_TitleLogos extends Quad { - /** + /* * Constants */ const STYLE = 'TitleLogos'; diff --git a/application/core/FML/Controls/Quads/Quad_UIConstruction_Buttons.php b/application/core/FML/Controls/Quads/Quad_UIConstruction_Buttons.php index 7591ae8a..09d0a1c1 100644 --- a/application/core/FML/Controls/Quads/Quad_UIConstruction_Buttons.php +++ b/application/core/FML/Controls/Quads/Quad_UIConstruction_Buttons.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_UIConstruction_Buttons extends Quad { - /** + /* * Constants */ const STYLE = 'UIConstruction_Buttons'; diff --git a/application/core/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php b/application/core/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php index c8d48b9a..24031618 100644 --- a/application/core/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php +++ b/application/core/FML/Controls/Quads/Quad_UiSMSpectatorScoreBig.php @@ -10,7 +10,7 @@ use FML\Controls\Quad; * @author steeffeen */ class Quad_UiSMSpectatorScoreBig extends Quad { - /** + /* * Constants */ const STYLE = 'UiSMSpectatorScoreBig'; diff --git a/application/core/FML/Controls/Video.php b/application/core/FML/Controls/Video.php index 5136b700..81dbae4e 100644 --- a/application/core/FML/Controls/Video.php +++ b/application/core/FML/Controls/Video.php @@ -12,7 +12,7 @@ use FML\Types\Scriptable; * @author steeffeen */ class Video extends Control implements Playable, Scriptable { - /** + /* * Protected Properties */ protected $data = ''; diff --git a/application/core/FML/CustomUI.php b/application/core/FML/CustomUI.php index 06ccc08a..379ecb1d 100644 --- a/application/core/FML/CustomUI.php +++ b/application/core/FML/CustomUI.php @@ -8,7 +8,7 @@ namespace FML; * @author steeffeen */ class CustomUI { - /** + /* * Protected Properties */ protected $encoding = 'utf-8'; diff --git a/application/core/FML/Elements/Dico.php b/application/core/FML/Elements/Dico.php index c00a11af..213f43bf 100644 --- a/application/core/FML/Elements/Dico.php +++ b/application/core/FML/Elements/Dico.php @@ -148,7 +148,7 @@ class Dico { */ const LANG_CHINESE = 'zh'; - /** + /* * Protected Properties */ protected $tagName = 'dico'; diff --git a/application/core/FML/Elements/Format.php b/application/core/FML/Elements/Format.php index 9703f27a..d98ab8d5 100644 --- a/application/core/FML/Elements/Format.php +++ b/application/core/FML/Elements/Format.php @@ -13,7 +13,7 @@ use FML\Types\TextFormatable; * @author steeffeen */ class Format implements BgColorable, Renderable, Styleable, TextFormatable { - /** + /* * Protected Properties */ protected $tagName = 'format'; diff --git a/application/core/FML/Elements/FrameModel.php b/application/core/FML/Elements/FrameModel.php index 99fff3db..256777cb 100644 --- a/application/core/FML/Elements/FrameModel.php +++ b/application/core/FML/Elements/FrameModel.php @@ -12,7 +12,7 @@ use FML\Types\Renderable; * @author steeffeen */ class FrameModel implements Container, Renderable { - /** + /* * Protected Properties */ protected $tagName = 'framemodel'; diff --git a/application/core/FML/Elements/Including.php b/application/core/FML/Elements/Including.php index c3a85784..7dc48487 100644 --- a/application/core/FML/Elements/Including.php +++ b/application/core/FML/Elements/Including.php @@ -10,7 +10,7 @@ use FML\Types\Renderable; * @author steeffeen */ class Including implements Renderable { - /** + /* * Protected Properties */ protected $tagName = 'include'; diff --git a/application/core/FML/Elements/Music.php b/application/core/FML/Elements/Music.php index 0008938c..5f40cd39 100644 --- a/application/core/FML/Elements/Music.php +++ b/application/core/FML/Elements/Music.php @@ -10,7 +10,7 @@ use FML\Types\Renderable; * @author steeffeen */ class Music implements Renderable { - /** + /* * Protected Properties */ protected $tagName = 'music'; diff --git a/application/core/FML/Elements/SimpleScript.php b/application/core/FML/Elements/SimpleScript.php index a4a3f843..be1e9d46 100644 --- a/application/core/FML/Elements/SimpleScript.php +++ b/application/core/FML/Elements/SimpleScript.php @@ -10,7 +10,7 @@ use FML\Types\Renderable; * @author steeffeen */ class SimpleScript implements Renderable { - /** + /* * Protected Properties */ protected $tagName = 'script'; diff --git a/application/core/FML/ManiaCode.php b/application/core/FML/ManiaCode.php index 2c1be431..b924f5c7 100644 --- a/application/core/FML/ManiaCode.php +++ b/application/core/FML/ManiaCode.php @@ -25,7 +25,7 @@ use FML\ManiaCode\ViewReplay; * @author steeffeen */ class ManiaCode { - /** + /* * Protected Properties */ protected $encoding = 'utf-8'; diff --git a/application/core/FML/ManiaCode/AddBuddy.php b/application/core/FML/ManiaCode/AddBuddy.php index 2fe2410c..d7ee2e5b 100644 --- a/application/core/FML/ManiaCode/AddBuddy.php +++ b/application/core/FML/ManiaCode/AddBuddy.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class AddBuddy implements Element { - /** + /* * Protected Properties */ protected $tagName = 'add_buddy'; diff --git a/application/core/FML/ManiaCode/AddFavorite.php b/application/core/FML/ManiaCode/AddFavorite.php index 64b1a274..75b1f275 100644 --- a/application/core/FML/ManiaCode/AddFavorite.php +++ b/application/core/FML/ManiaCode/AddFavorite.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class AddFavorite implements Element { - /** + /* * Protected Properties */ protected $tagName = 'add_favourite'; diff --git a/application/core/FML/ManiaCode/GetSkin.php b/application/core/FML/ManiaCode/GetSkin.php index 8155a509..7e81f018 100644 --- a/application/core/FML/ManiaCode/GetSkin.php +++ b/application/core/FML/ManiaCode/GetSkin.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class GetSkin implements Element { - /** + /* * Protected Properties */ protected $tagName = 'get_skin'; diff --git a/application/core/FML/ManiaCode/Go_To.php b/application/core/FML/ManiaCode/Go_To.php index e525e6c1..d41973df 100644 --- a/application/core/FML/ManiaCode/Go_To.php +++ b/application/core/FML/ManiaCode/Go_To.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class Go_To implements Element { - /** + /* * Protected Properties */ protected $tagName = 'goto'; diff --git a/application/core/FML/ManiaCode/InstallMap.php b/application/core/FML/ManiaCode/InstallMap.php index bbc286a6..f1524577 100644 --- a/application/core/FML/ManiaCode/InstallMap.php +++ b/application/core/FML/ManiaCode/InstallMap.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class InstallMap implements Element { - /** + /* * Protected Properties */ protected $tagName = 'install_map'; diff --git a/application/core/FML/ManiaCode/InstallPack.php b/application/core/FML/ManiaCode/InstallPack.php index 013a5b37..f08a5699 100644 --- a/application/core/FML/ManiaCode/InstallPack.php +++ b/application/core/FML/ManiaCode/InstallPack.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class InstallPack implements Element { - /** + /* * Protected Properties */ protected $tagName = 'install_pack'; diff --git a/application/core/FML/ManiaCode/InstallReplay.php b/application/core/FML/ManiaCode/InstallReplay.php index cfb38255..abd75298 100644 --- a/application/core/FML/ManiaCode/InstallReplay.php +++ b/application/core/FML/ManiaCode/InstallReplay.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class InstallReplay implements Element { - /** + /* * Protected Properties */ protected $tagName = 'install_replay'; diff --git a/application/core/FML/ManiaCode/InstallScript.php b/application/core/FML/ManiaCode/InstallScript.php index 2613c30a..dc146e8f 100644 --- a/application/core/FML/ManiaCode/InstallScript.php +++ b/application/core/FML/ManiaCode/InstallScript.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class InstallScript implements Element { - /** + /* * Protected Properties */ protected $tagName = 'install_script'; diff --git a/application/core/FML/ManiaCode/InstallSkin.php b/application/core/FML/ManiaCode/InstallSkin.php index 4cac8bbc..223bcb4e 100644 --- a/application/core/FML/ManiaCode/InstallSkin.php +++ b/application/core/FML/ManiaCode/InstallSkin.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class InstallSkin implements Element { - /** + /* * Protected Properties */ protected $tagName = 'install_skin'; diff --git a/application/core/FML/ManiaCode/JoinServer.php b/application/core/FML/ManiaCode/JoinServer.php index 4c54cada..5e1b2a4a 100644 --- a/application/core/FML/ManiaCode/JoinServer.php +++ b/application/core/FML/ManiaCode/JoinServer.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class JoinServer implements Element { - /** + /* * Protected Properties */ protected $tagName = 'join_server'; diff --git a/application/core/FML/ManiaCode/PlayMap.php b/application/core/FML/ManiaCode/PlayMap.php index 9227fd18..88c4da26 100644 --- a/application/core/FML/ManiaCode/PlayMap.php +++ b/application/core/FML/ManiaCode/PlayMap.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class PlayMap implements Element { - /** + /* * Protected Properties */ protected $tagName = 'play_map'; diff --git a/application/core/FML/ManiaCode/PlayReplay.php b/application/core/FML/ManiaCode/PlayReplay.php index a56fbd26..eaaa732b 100644 --- a/application/core/FML/ManiaCode/PlayReplay.php +++ b/application/core/FML/ManiaCode/PlayReplay.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class PlayReplay implements Element { - /** + /* * Protected Properties */ protected $tagName = 'play_replay'; diff --git a/application/core/FML/ManiaCode/ShowMessage.php b/application/core/FML/ManiaCode/ShowMessage.php index fce4b631..721b3ee5 100644 --- a/application/core/FML/ManiaCode/ShowMessage.php +++ b/application/core/FML/ManiaCode/ShowMessage.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class ShowMessage implements Element { - /** + /* * Protected Properties */ protected $tagName = 'show_message'; diff --git a/application/core/FML/ManiaCode/ViewReplay.php b/application/core/FML/ManiaCode/ViewReplay.php index 0d35ec7d..aa0da618 100644 --- a/application/core/FML/ManiaCode/ViewReplay.php +++ b/application/core/FML/ManiaCode/ViewReplay.php @@ -8,7 +8,7 @@ namespace FML\ManiaCode; * @author steeffeen */ class ViewReplay implements Element { - /** + /* * Protected Properties */ protected $tagName = 'view_replay'; diff --git a/application/core/FML/ManiaLink.php b/application/core/FML/ManiaLink.php index 0f19ac74..dd49a35b 100644 --- a/application/core/FML/ManiaLink.php +++ b/application/core/FML/ManiaLink.php @@ -2,10 +2,10 @@ namespace FML; -use FML\Types\Renderable; -use FML\Script\Script; use FML\Elements\Dico; +use FML\Script\Script; use FML\Stylesheet\Stylesheet; +use FML\Types\Renderable; /** * Class representing a ManiaLink @@ -13,7 +13,7 @@ use FML\Stylesheet\Stylesheet; * @author steeffeen */ class ManiaLink { - /** + /* * Constants */ const BACKGROUND_0 = '0'; @@ -21,7 +21,7 @@ class ManiaLink { const BACKGROUND_STATIONS = 'stations'; const BACKGROUND_TITLE = 'title'; - /** + /* * Protected Properties */ protected $encoding = 'utf-8'; @@ -224,16 +224,17 @@ class ManiaLink { if (!$isChild) { $domDocument->appendChild($maniaLink); } - if ($this->id) { + if (strlen($this->id) > 0) { $maniaLink->setAttribute('id', $this->id); } if ($this->version) { $maniaLink->setAttribute('version', $this->version); } - if ($this->background) { + if (strlen($this->background) > 0) { $maniaLink->setAttribute('background', $this->background); } - if (!$this->navigable3d) { + if ($this->navigable3d) { + // TODO: check default value $maniaLink->setAttribute('navigable3d', $this->navigable3d); } if ($this->timeout) { diff --git a/application/core/FML/ManiaLinks.php b/application/core/FML/ManiaLinks.php index 7d0251d7..0d77bdab 100644 --- a/application/core/FML/ManiaLinks.php +++ b/application/core/FML/ManiaLinks.php @@ -8,7 +8,7 @@ namespace FML; * @author steeffeen */ class ManiaLinks { - /** + /* * Protected Properties */ protected $encoding = 'utf-8'; diff --git a/application/core/FML/Script/EUISound.php b/application/core/FML/Script/EUISound.php index bfbbd33d..0e7430a3 100644 --- a/application/core/FML/Script/EUISound.php +++ b/application/core/FML/Script/EUISound.php @@ -8,7 +8,7 @@ namespace FML\Script; * @author steeffeen */ abstract class EUISound { - /** + /* * Constants */ const SOUND_Bonus = 'Bonus'; diff --git a/application/core/FML/Script/Script.php b/application/core/FML/Script/Script.php index 9a2c6de6..58a53ac7 100644 --- a/application/core/FML/Script/Script.php +++ b/application/core/FML/Script/Script.php @@ -5,6 +5,7 @@ namespace FML\Script; use FML\Controls\Control; use FML\Controls\Label; use FML\Types\Scriptable; +use FML\Types\Actionable; /** * Class representing the ManiaLink Script @@ -12,7 +13,7 @@ use FML\Types\Scriptable; * @author steeffeen */ class Script { - /** + /* * Constants */ const CLASS_TOOLTIP = 'FML_Tooltip'; @@ -26,6 +27,7 @@ class Script { const CLASS_SOUND = 'FML_Sound'; const CLASS_TOGGLE = 'FML_Toggle'; const CLASS_SPECTATE = 'FML_Spectate'; + const CLASS_PAGEACTION = 'FML_PageAction'; const OPTION_TOOLTIP_STAYONCLICK = 'FML_StayOnClick_Tooltip'; const OPTION_TOOLTIP_INVERT = 'FML_Invert_Tooltip'; const OPTION_TOOLTIP_TEXT = 'FML_Text_Tooltip'; @@ -44,7 +46,7 @@ class Script { const FUNCTION_SETTOOLTIPTEXT = 'FML_SetTooltipText'; const FUNCTION_TOGGLE = 'FML_Toggle'; - /** + /* * Protected Properties */ protected $tagName = 'script'; @@ -60,6 +62,7 @@ class Script { protected $sounds = array(); protected $toggles = false; protected $spectate = false; + protected $pageActions = false; /** * Create a new Script Object @@ -357,6 +360,33 @@ class Script { return $this; } + /** + * Trigger an Action on Control Click + * + * @param Control $actionControl The Control triggering the Action + * @param string $action (optional) The Action to trigger (if empty the Action of the Control will be triggered) + */ + public function addPageActionTrigger(Control $actionControl, $action = null) { + if (!($actionControl instanceof Scriptable)) { + trigger_error('Scriptable Control needed as ActionControl for PageActions!'); + return $this; + } + $action = (string) $action; + if (strlen($action) <= 0) { + if (!($actionControl instanceof Actionable)) { + trigger_error('Either Action or Actionable Control needed for PageActions!'); + return $this; + } + $action = $actionControl->getAction(); + } + $actionControl->setScriptEvents(true); + $actionControl->setAction(''); + $actionControl->addClass(self::CLASS_PAGEACTION); + $actionControl->addClass(self::CLASS_PAGEACTION . '-' . $action); + $this->pageActions = true; + return $this; + } + /** * Create the Script XML Tag * @@ -644,10 +674,10 @@ if (Event.Control.HasClass(\"" . self::CLASS_PAGER . "\")) { if (ClassParts[0] != \"" . self::CLASS_PAGER . "\") continue; switch (TextLib::SubText(ClassParts[1], 0, 1)) { case \"I\": { - PagesId = TextLib::SubText(ClassParts[1], 1, 99); + PagesId = TextLib::SubText(ClassParts[1], 1, TextLib::Length(ClassParts[1])); } case \"A\": { - PagingAction = TextLib::ToInteger(TextLib::SubText(ClassParts[1], 1, 99)); + PagingAction = TextLib::ToInteger(TextLib::SubText(ClassParts[1], 1, TextLib::Length(ClassParts[1]))); } } } @@ -661,7 +691,7 @@ if (Event.Control.HasClass(\"" . self::CLASS_PAGER . "\")) { if (!PageControl.HasClass(\"" . self::CLASS_PAGE . "\")) continue; foreach (ControlClass in PageControl.ControlClasses) { if (TextLib::SubText(ControlClass, 0, {$pagesNumberPrefixLength}) != \"{$pagesNumberPrefix}\") continue; - declare PageNumber = TextLib::ToInteger(TextLib::SubText(ControlClass, {$pagesNumberPrefixLength}, 99)); + declare PageNumber = TextLib::ToInteger(TextLib::SubText(ControlClass, {$pagesNumberPrefixLength}, TextLib::Length(ControlClass))); if (!FML_MinPageNumber.existskey(PagesId) || PageNumber < FML_MinPageNumber[PagesId]) { FML_MinPageNumber[PagesId] = PageNumber; } @@ -687,7 +717,7 @@ if (Event.Control.HasClass(\"" . self::CLASS_PAGER . "\")) { declare PageNumber = -1; foreach (ControlClass in PageControl.ControlClasses) { if (TextLib::SubText(ControlClass, 0, {$pagesNumberPrefixLength}) != \"{$pagesNumberPrefix}\") continue; - PageNumber = TextLib::ToInteger(TextLib::SubText(ControlClass, {$pagesNumberPrefixLength}, 99)); + PageNumber = TextLib::ToInteger(TextLib::SubText(ControlClass, {$pagesNumberPrefixLength}, TextLib::Length(ControlClass))); break; } PageControl.Visible = (PageNumber == FML_PageNumber[PagesId]); @@ -841,6 +871,33 @@ if (Event.Control.HasClass(\"" . self::CLASS_SPECTATE . "\")) { return $spectateScript; } + /** + * Get the Page Actions Labels + * + * @return string + */ + private function getPageActionLabels() { + if (!$this->pageActions) return ''; + $this->setInclude('TextLib', 'TextLib'); + $prefixLength = strlen(self::CLASS_PAGEACTION) + 1; + $pageActionScript = " +if (Event.Control.HasClass(\"" . self::CLASS_PAGEACTION . "\")) { + declare Action = \"\"; + foreach (ControlClass in Event.Control.ControlClasses) { + declare ClassParts = TextLib::Split(\"-\", ControlClass); + if (ClassParts.count < 2) continue; + if (ClassParts[0] != \"" . self::CLASS_PAGEACTION . "\") continue; + Action = TextLib::SubText(ControlClass, {$prefixLength}, TextLib::Length(ControlClass)); + break; + } + if (Action != \"\") { + TriggerPageAction(Action); + } +}"; + $pageActionScript = Builder::getLabelImplementationBlock(self::LABEL_MOUSECLICK, $pageActionScript); + return $pageActionScript; + } + /** * Get the Main Function * diff --git a/application/core/FML/Stylesheet/Mood.php b/application/core/FML/Stylesheet/Mood.php index 74d3adb5..86e47ff2 100644 --- a/application/core/FML/Stylesheet/Mood.php +++ b/application/core/FML/Stylesheet/Mood.php @@ -11,7 +11,7 @@ namespace FML\Stylesheet; * @author steeffeen */ class Mood { - /** + /* * Protected Properties */ protected $tagName = 'mood'; diff --git a/application/core/FML/Stylesheet/Style3d.php b/application/core/FML/Stylesheet/Style3d.php index 980f573a..f7028362 100644 --- a/application/core/FML/Stylesheet/Style3d.php +++ b/application/core/FML/Stylesheet/Style3d.php @@ -8,7 +8,7 @@ namespace FML\Stylesheet; * @author steeffeen */ class Style3d { - /** + /* * Constants */ const MODEL_Box = 'Box'; @@ -17,7 +17,7 @@ class Style3d { const MODEL_Title = 'Title'; const MODEL_Window = 'Window'; - /** + /* * Protected Properties */ protected $tagName = 'style3d'; diff --git a/application/core/FML/Stylesheet/Stylesheet.php b/application/core/FML/Stylesheet/Stylesheet.php index a9850775..50d46cad 100644 --- a/application/core/FML/Stylesheet/Stylesheet.php +++ b/application/core/FML/Stylesheet/Stylesheet.php @@ -8,7 +8,7 @@ namespace FML\Stylesheet; * @author steeffeen */ class Stylesheet { - /** + /* * Protected Properties */ protected $tagName = 'stylesheet'; diff --git a/application/core/FML/Types/Actionable.php b/application/core/FML/Types/Actionable.php index 2b67a06f..309666cc 100644 --- a/application/core/FML/Types/Actionable.php +++ b/application/core/FML/Types/Actionable.php @@ -8,9 +8,23 @@ namespace FML\Types; * @author steeffeen */ interface Actionable { - /** + /* * Constants */ + const ACTION_0 = '0'; + const ACTION_BACK = 'back'; + const ACTION_ENTER = 'enter'; + const ACTION_HOME = 'home'; + const ACTION_MENU_SOLO = 'menu_solo'; + const ACTION_MENU_COMPETITIONS = 'menu_competitions'; + const ACTION_MENU_LOCAL = 'menu_local'; + const ACTION_MENU_INTERNET = 'menu_internet'; + const ACTION_MENU_EDITORS = 'menu_editors'; + const ACTION_MENU_PROFILE = 'menu_profile'; + const ACTION_QUIT = 'quit'; + const ACTION_QUITSERVER = 'maniaplanet:quitserver'; + const ACTION_SAVEREPLAY = 'maniaplanet:savereplay'; + const ACTION_TOGGLESPEC = 'maniaplanet:togglespec'; const ACTIONKEY_F5 = 1; const ACTIONKEY_F6 = 2; const ACTIONKEY_F7 = 3; @@ -20,13 +34,22 @@ interface Actionable { * Set Action * * @param string $action Action Name + * @return \FML\Types\Actionable */ public function setAction($action); + /** + * Get the assigned Action + * + * @return string + */ + public function getAction(); + /** * Set Action Key * * @param int $actionKey Action Key Number + * @return \FML\Types\Actionable */ public function setActionKey($actionKey); } diff --git a/application/core/FML/Types/BgColorable.php b/application/core/FML/Types/BgColorable.php index 5ee5c539..cba68a2b 100644 --- a/application/core/FML/Types/BgColorable.php +++ b/application/core/FML/Types/BgColorable.php @@ -13,6 +13,7 @@ interface BgColorable { * Set Background Color * * @param string $bgColor Background Color + * @return \FML\Types\BgColorable */ public function setBgColor($bgColor); } diff --git a/application/core/FML/Types/Linkable.php b/application/core/FML/Types/Linkable.php index 59dd432d..9a326d1c 100644 --- a/application/core/FML/Types/Linkable.php +++ b/application/core/FML/Types/Linkable.php @@ -13,6 +13,7 @@ interface Linkable { * Set Url * * @param string $url Link Url + * @return \FML\Types\Linkable */ public function setUrl($url); @@ -20,6 +21,7 @@ interface Linkable { * Set Url Id to use from the Dico * * @param string $urlId + * @return \FML\Types\Linkable */ public function setUrlId($urlId); @@ -27,6 +29,7 @@ interface Linkable { * Set Manialink * * @param string $manialink Manialink Name + * @return \FML\Types\Linkable */ public function setManialink($manialink); @@ -34,6 +37,7 @@ interface Linkable { * Set Manialink Id to use from the Dico * * @param string $manialinkId Manialink Id + * @return \FML\Types\Linkable */ public function setManialinkId($manialinkId); } diff --git a/application/core/FML/Types/NewLineable.php b/application/core/FML/Types/NewLineable.php index 873966b9..d0765732 100644 --- a/application/core/FML/Types/NewLineable.php +++ b/application/core/FML/Types/NewLineable.php @@ -13,6 +13,7 @@ interface NewLineable { * Set Auto New Line * * @param bool $autoNewLine Whether the Control should insert New Lines automatically + * @return \FML\Types\NewLineable */ public function setAutoNewLine($autoNewLine); } diff --git a/application/core/FML/Types/Playable.php b/application/core/FML/Types/Playable.php index f8a1e573..bd008c32 100644 --- a/application/core/FML/Types/Playable.php +++ b/application/core/FML/Types/Playable.php @@ -13,6 +13,7 @@ interface Playable { * Set Data * * @param string $data Media Url + * @return \FML\Types\Playable */ public function setData($data); @@ -20,6 +21,7 @@ interface Playable { * Set Data Id to use from the Dico * * @param string $dataId + * @return \FML\Types\Playable */ public function setDataId($dataId); @@ -27,6 +29,7 @@ interface Playable { * Set Play * * @param bool $play Whether the Control should start playing automatically + * @return \FML\Types\Playable */ public function setPlay($play); @@ -34,6 +37,7 @@ interface Playable { * Set Looping * * @param bool $looping Whether the Control should play looping + * @return \FML\Types\Playable */ public function setLooping($looping); @@ -41,6 +45,7 @@ interface Playable { * Set Music * * @param bool $music Whether the Control represents Background Music + * @return \FML\Types\Playable */ public function setMusic($music); @@ -48,6 +53,7 @@ interface Playable { * Set Volume * * @param float $volume Media Volume + * @return \FML\Types\Playable */ public function setVolume($volume); } diff --git a/application/core/FML/Types/Scriptable.php b/application/core/FML/Types/Scriptable.php index 7af1a9c9..79a76f9f 100644 --- a/application/core/FML/Types/Scriptable.php +++ b/application/core/FML/Types/Scriptable.php @@ -13,6 +13,7 @@ interface Scriptable { * Set ScriptEvents * * @param bool $scriptEvents Whether Script Events should be enabled + * @return \FML\Types\Scriptable */ public function setScriptEvents($scriptEvents); } diff --git a/application/core/FML/Types/Styleable.php b/application/core/FML/Types/Styleable.php index 12894b78..c75c47b7 100644 --- a/application/core/FML/Types/Styleable.php +++ b/application/core/FML/Types/Styleable.php @@ -13,6 +13,7 @@ interface Styleable { * Set Style * * @param string $style Style Name + * @return \FML\Types\Styleable */ public function setStyle($style); } diff --git a/application/core/FML/Types/SubStyleable.php b/application/core/FML/Types/SubStyleable.php index eb1e2cce..69e57ca4 100644 --- a/application/core/FML/Types/SubStyleable.php +++ b/application/core/FML/Types/SubStyleable.php @@ -13,6 +13,7 @@ interface SubStyleable { * Set SubStyle * * @param string $subStyle SubStyle Name + * @return \FML\Types\SubStyleable */ public function setSubStyle($subStyle); @@ -21,6 +22,7 @@ interface SubStyleable { * * @param string $style Style Name * @param string $subStyle SubStyle Name + * @return \FML\Types\SubStyleable */ public function setStyles($style, $subStyle); } diff --git a/application/core/FML/Types/TextFormatable.php b/application/core/FML/Types/TextFormatable.php index 259ad07a..b9e6e201 100644 --- a/application/core/FML/Types/TextFormatable.php +++ b/application/core/FML/Types/TextFormatable.php @@ -13,6 +13,7 @@ interface TextFormatable { * Set Text Size * * @param int $textSize Text Size + * @return \FML\Types\TextFormatable */ public function setTextSize($textSize); @@ -20,6 +21,7 @@ interface TextFormatable { * Set Text Color * * @param string $textColor Text Color + * @return \FML\Types\TextFormatable */ public function setTextColor($textColor); @@ -27,6 +29,7 @@ interface TextFormatable { * Set Area Color * * @param string $areaColor Area Color + * @return \FML\Types\TextFormatable */ public function setAreaColor($areaColor); @@ -34,6 +37,7 @@ interface TextFormatable { * Set Area Focus Color * * @param string $areaFocusColor Area Focus Color + * @return \FML\Types\TextFormatable */ public function setAreaFocusColor($areaFocusColor); } diff --git a/application/core/FML/autoload.php b/application/core/FML/autoload.php index 60200348..70b25e38 100644 --- a/application/core/FML/autoload.php +++ b/application/core/FML/autoload.php @@ -13,7 +13,9 @@ if (!defined('FML_VERSION')) { define('FML_VERSION', 1.0); } -// Register Autoload Function that loads FML Class Files on Demand +/* + * Autoload Function that loads FML Class Files on Demand + */ spl_autoload_register( function ($className) { $classPath = str_replace('\\', DIRECTORY_SEPARATOR, $className);