FML Update

This commit is contained in:
Steffen Schröder
2014-04-13 18:21:40 +02:00
parent 8ee564d4b7
commit 5ad45d3b6f
80 changed files with 341 additions and 11 deletions

View File

@ -10,6 +10,8 @@ use FML\Types\Scriptable;
* (CMlMediaPlayer)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Audio extends Control implements Playable, Scriptable {
/*

View File

@ -9,6 +9,8 @@ use FML\Types\Renderable;
* (CMlControl)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
abstract class Control implements Renderable {
/*
@ -21,6 +23,11 @@ abstract class Control implements Renderable {
const BOTTOM = 'bottom';
const LEFT = 'left';
/*
* Static Properties
*/
protected static $currentIndex = 0;
/*
* Protected Properties
*/
@ -69,13 +76,14 @@ abstract class Control implements Renderable {
}
/**
* Check Id for dangerous Characters and assign an unique Id if necessary
* Check Id for dangerous Characters and assign a unique Id if necessary
*
* @return \FML\Controls\Control
*/
public function checkId() {
if (!$this->getId()) {
$this->setId(uniqid());
$this->setId('FML_ID_' . self::$currentIndex);
self::$currentIndex++;
return $this;
}
$dangerousCharacters = array(' ', ' ', '.', '|', '-', PHP_EOL);

View File

@ -12,6 +12,8 @@ use FML\Types\TextFormatable;
* (CMlEntry)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Entry extends Control implements NewLineable, Scriptable, Styleable, TextFormatable {
/*

View File

@ -7,6 +7,8 @@ namespace FML\Controls;
* (CMlFileEntry)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class FileEntry extends Entry {
/*

View File

@ -12,6 +12,8 @@ use FML\Elements\FrameModel;
* (CMlFrame)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Frame extends Control implements Container {
/*
@ -79,7 +81,7 @@ class Frame extends Control implements Container {
*/
public function getFormat($createIfEmpty = true) {
if (!$this->format && $createIfEmpty) {
$this->format = new Format();
$this->setFormat(new Format());
}
return $this->format;
}

View File

@ -10,6 +10,8 @@ use FML\Stylesheet\Style3d;
* (CMlFrame)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Frame3d extends Frame implements Scriptable {
/*

View File

@ -10,6 +10,8 @@ use FML\Types\Renderable;
* (CMlFrame)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class FrameInstance extends Control {
/*

View File

@ -9,6 +9,8 @@ use FML\Types\Styleable;
* (CMlGauge)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Gauge extends Control implements Styleable {
/*

View File

@ -14,6 +14,8 @@ use FML\Types\TextFormatable;
* (CMlLabel)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Label extends Control implements Actionable, Linkable, NewLineable, Scriptable, Styleable, TextFormatable {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Label;
* Label Class for Button Styles
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Label_Button extends Label {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Label;
* Label Class for Text Styles
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Label_Text extends Label {
/*
@ -35,6 +37,7 @@ class Label_Text extends Label {
const STYLE_TextCardInfoSmall = 'TextCardInfoSmall';
const STYLE_TextCardInfoVerySmall = 'TextCardInfoVerySmall';
const STYLE_TextCardMedium = 'TextCardMedium';
const STYLE_TextCardMediumWhite = 'TextCardMediumWhite';
const STYLE_TextCardRaceRank = 'TextCardRaceRank';
const STYLE_TextCardScores2 = 'TextCardScores2';
const STYLE_TextCardSmall = 'TextCardSmall';
@ -77,8 +80,11 @@ class Label_Text extends Label {
const STYLE_TextTitle3 = 'TextTitle3';
const STYLE_TextTitle3Header = 'TextTitle3Header';
const STYLE_TextTitleError = 'TextTitleError';
const STYLE_TextToolTipAM = 'TextToolTipAM';
const STYLE_TextToolTipAMBig = 'TextToolTipAMBig';
const STYLE_TextValueBig = 'TextValueBig';
const STYLE_TextValueMedium = 'TextValueMedium';
const STYLE_TextValueMediumSm = 'TextValueMediumSm';
const STYLE_TextValueSmall = 'TextValueSmall';
const STYLE_TextValueSmallSm = 'TextValueSmallSm';
const STYLE_TrackerText = 'TrackerText';

View File

@ -14,6 +14,8 @@ use FML\Types\SubStyleable;
* (CMlQuad)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad extends Control implements Actionable, BgColorable, Linkable, Scriptable, Styleable, SubStyleable {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for '321Go' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_321Go extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'BgRaceScore2' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_BgRaceScore2 extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Bgs1' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Bgs1 extends Quad {
/*
@ -36,6 +38,7 @@ class Quad_Bgs1 extends Quad {
const SUBSTYLE_BgCardList = 'BgCardList';
const SUBSTYLE_BgCardOnline = 'BgCardOnline';
const SUBSTYLE_BgCardPlayer = 'BgCardPlayer';
const SUBSTYLE_BgCardProperty = 'BgCardProperty';
const SUBSTYLE_BgCardSystem = 'BgCardSystem';
const SUBSTYLE_BgCardZone = 'BgCardZone';
const SUBSTYLE_BgColorContour = 'BgColorContour';
@ -68,6 +71,7 @@ class Quad_Bgs1 extends Quad {
const SUBSTYLE_BgWindow1 = 'BgWindow1';
const SUBSTYLE_BgWindow2 = 'BgWindow2';
const SUBSTYLE_BgWindow3 = 'BgWindow3';
const SUBSTYLE_BgWindow4 = 'BgWindow4';
const SUBSTYLE_EnergyBar = 'EnergyBar';
const SUBSTYLE_EnergyTeam2 = 'EnergyTeam2';
const SUBSTYLE_Glow = 'Glow';

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Bgs1InRace' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Bgs1InRace extends Quad {
/*
@ -36,6 +38,7 @@ class Quad_Bgs1InRace extends Quad {
const SUBSTYLE_BgCardList = 'BgCardList';
const SUBSTYLE_BgCardOnline = 'BgCardOnline';
const SUBSTYLE_BgCardPlayer = 'BgCardPlayer';
const SUBSTYLE_BgCardProperty = 'BgCardProperty';
const SUBSTYLE_BgCardSystem = 'BgCardSystem';
const SUBSTYLE_BgCardZone = 'BgCardZone';
const SUBSTYLE_BgColorContour = 'BgColorContour';
@ -68,6 +71,7 @@ class Quad_Bgs1InRace extends Quad {
const SUBSTYLE_BgWindow1 = 'BgWindow1';
const SUBSTYLE_BgWindow2 = 'BgWindow2';
const SUBSTYLE_BgWindow3 = 'BgWindow3';
const SUBSTYLE_BgWindow4 = 'BgWindow4';
const SUBSTYLE_EnergyBar = 'EnergyBar';
const SUBSTYLE_EnergyTeam2 = 'EnergyTeam2';
const SUBSTYLE_Glow = 'Glow';

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'BgsChallengeMedals' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_BgsChallengeMedals extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'BgsPlayerCard' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_BgsPlayerCard extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Copilot' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Copilot extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Emblems' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Emblems extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'EnergyBar' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_EnergyBar extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Hud3dEchelons' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Hud3dEchelons extends Quad {
/*

View File

@ -0,0 +1,48 @@
<?php
namespace FML\Controls\Quads;
use FML\Controls\Quad;
/**
* Quad Class for 'Hud3dIcons' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Hud3dIcons extends Quad {
/*
* Constants
*/
const STYLE = 'Hud3dIcons';
const SUBSTYLE_Cross = 'Cross';
const SUBSTYLE_CrossTargeted = 'CrossTargeted';
const SUBSTYLE_Player1 = 'Player1';
const SUBSTYLE_Player2 = 'Player2';
const SUBSTYLE_Player3 = 'Player3';
const SUBSTYLE_PointA = 'PointA';
const SUBSTYLE_PointB = 'PointB';
const SUBSTYLE_PointC = 'PointC';
/**
* Create a new Quad_Hud3dIcons Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_Hud3dIcons
*/
public static function create($id = null) {
$quadHud3dIcons = new Quad_Hud3dIcons($id);
return $quadHud3dIcons;
}
/**
* Construct a new Quad_Hud3dIcons Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
$this->setStyle(self::STYLE);
}
}

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Icons128x128_1' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Icons128x128_1 extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Icons128x128_Blink' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Icons128x128_Blink extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Icons128x32_1' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Icons128x32_1 extends Quad {
/*
@ -18,6 +20,7 @@ class Quad_Icons128x32_1 extends Quad {
const SUBSTYLE_ManiaLinkHome = 'ManiaLinkHome';
const SUBSTYLE_ManiaLinkSwitch = 'ManiaLinkSwitch';
const SUBSTYLE_ManiaPlanet = 'ManiaPlanet';
const SUBSTYLE_Minimize = 'Minimize';
const SUBSTYLE_Music = 'Music';
const SUBSTYLE_PainterBrush = 'PainterBrush';
const SUBSTYLE_PainterFill = 'PainterFill';

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Icons64x64_1' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Icons64x64_1 extends Quad {
/*
@ -79,6 +81,7 @@ class Quad_Icons64x64_1 extends Quad {
const SUBSTYLE_ShowRight2 = 'ShowRight2';
const SUBSTYLE_ShowUp = 'ShowUp';
const SUBSTYLE_ShowUp2 = 'ShowUp2';
const SUBSTYLE_ShowUpChanging = 'ShowUpChanging';
const SUBSTYLE_SliderCursor = 'SliderCursor';
const SUBSTYLE_SliderCursor2 = 'SliderCursor2';
const SUBSTYLE_StateFavourite = 'StateFavourite';

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'Icons64x64_2' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_Icons64x64_2 extends Quad {
/*
@ -25,6 +27,7 @@ class Quad_Icons64x64_2 extends Quad {
const SUBSTYLE_RocketElimination = 'RocketElimination';
const SUBSTYLE_RocketHit = 'RocketHit';
const SUBSTYLE_ServerNotice = 'ServerNotice';
const SUBSTYLE_SortBy = 'SortBy';
const SUBSTYLE_UnknownElimination = 'UnknownElimination';
const SUBSTYLE_UnknownHit = 'UnknownHit';

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'ManiaPlanetLogos' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_ManiaPlanetLogos extends Quad {
/*

View File

@ -0,0 +1,51 @@
<?php
namespace FML\Controls\Quads;
use FML\Controls\Quad;
/**
* Quad Class for 'ManiaPlanetMainMenu' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_ManiaPlanetMainMenu extends Quad {
/*
* Constants
*/
const STYLE = 'ManiaPlanetMainMenu';
const SUBSTYLE_BottomBar = 'BottomBar';
const SUBSTYLE_Highlight = 'Highlight';
const SUBSTYLE_IconAdd = 'IconAdd';
const SUBSTYLE_IconHome = 'IconHome';
const SUBSTYLE_IconPlay = 'IconPlay';
const SUBSTYLE_IconQuit = 'IconQuit';
const SUBSTYLE_IconSettings = 'IconSettings';
const SUBSTYLE_IconStore = 'IconStore';
const SUBSTYLE_MainBg = 'MainBg';
const SUBSTYLE_TitleBg = 'TitleBg';
const SUBSTYLE_TopBar = 'TopBar';
/**
* Create a new Quad_ManiaPlanetMainMenu Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_ManiaPlanetMainMenu
*/
public static function create($id = null) {
$quadManiaPlanetMainMenu = new Quad_ManiaPlanetMainMenu($id);
return $quadManiaPlanetMainMenu;
}
/**
* Construct a new Quad_ManiaPlanetMainMenu Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
$this->setStyle(self::STYLE);
}
}

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'ManiaplanetSystem' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_ManiaplanetSystem extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'MedalsBig' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_MedalsBig extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'TitleLogos' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_TitleLogos extends Quad {
/*

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'UIConstruction_Buttons' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_UIConstruction_Buttons extends Quad {
/*
@ -16,6 +18,7 @@ class Quad_UIConstruction_Buttons extends Quad {
const STYLE = 'UIConstruction_Buttons';
const SUBSTYLE_ActionMaker = 'ActionMaker';
const SUBSTYLE_Add = 'Add';
const SUBSTYLE_AirMapping = 'AirMapping';
const SUBSTYLE_Author = 'Author';
const SUBSTYLE_AuthorTime = 'AuthorTime';
const SUBSTYLE_BgEditors = 'BgEditors';
@ -32,6 +35,7 @@ class Quad_UIConstruction_Buttons extends Quad {
const SUBSTYLE_Down = 'Down';
const SUBSTYLE_Drive = 'Drive';
const SUBSTYLE_Erase = 'Erase';
const SUBSTYLE_GhostBlocks = 'GhostBlocks';
const SUBSTYLE_Help = 'Help';
const SUBSTYLE_Item = 'Item';
const SUBSTYLE_Left = 'Left';

View File

@ -0,0 +1,52 @@
<?php
namespace FML\Controls\Quads;
use FML\Controls\Quad;
/**
* Quad Class for 'UIConstruction_Buttons2' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_UIConstruction_Buttons2 extends Quad {
/*
* Constants
*/
const STYLE = 'UIConstruction_Buttons2';
const SUBSTYLE_AirMapping = 'AirMapping';
const SUBSTYLE_BlockEditor = 'BlockEditor';
const SUBSTYLE_Copy = 'Copy';
const SUBSTYLE_Cut = 'Cut';
const SUBSTYLE_GhostBlocks = 'GhostBlocks';
const SUBSTYLE_KeysAdd = 'KeysAdd';
const SUBSTYLE_KeysCopy = 'KeysCopy';
const SUBSTYLE_KeysDelete = 'KeysDelete';
const SUBSTYLE_KeysPaste = 'KeysPaste';
const SUBSTYLE_New = 'New';
const SUBSTYLE_Open = 'Open';
const SUBSTYLE_Symmetry = 'Symmetry';
/**
* Create a new Quad_UIConstruction_Buttons2 Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Quads\Quad_UIConstruction_Buttons2
*/
public static function create($id = null) {
$quadUIConstructionButtons2 = new Quad_UIConstruction_Buttons2($id);
return $quadUIConstructionButtons2;
}
/**
* Construct a new Quad_UIConstruction_Buttons2 Control
*
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
$this->setStyle(self::STYLE);
}
}

View File

@ -8,6 +8,8 @@ use FML\Controls\Quad;
* Quad Class for 'UiSMSpectatorScoreBig' Style
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Quad_UiSMSpectatorScoreBig extends Quad {
/*

View File

@ -10,6 +10,8 @@ use FML\Types\Scriptable;
* (CMlMediaPlayer)
*
* @author steeffeen
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class Video extends Control implements Playable, Scriptable {
/*