- Moved FML into core folder
- Endurance plugin - map class nbCheckpoints - added script callbacks registration
This commit is contained in:
		
							
								
								
									
										32
									
								
								application/core/FML/Controls/Audio.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								application/core/FML/Controls/Audio.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing audio (CMlMediaPlayer)
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Audio extends Control implements Playable, Scriptable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new audio control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->tagName = 'audio';
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 *
 | 
			
		||||
	 * @see \FML\Control::render()
 | 
			
		||||
	 */
 | 
			
		||||
	public function render(\DOMDocument $domDocument) {
 | 
			
		||||
		$xml = parent::render($domDocument);
 | 
			
		||||
		return $xml;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										262
									
								
								application/core/FML/Controls/Control.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										262
									
								
								application/core/FML/Controls/Control.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,262 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
use FML\Types\Renderable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlControl
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
abstract class Control implements Renderable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const CENTER = 'center';
 | 
			
		||||
	const CENTER2 = 'center2';
 | 
			
		||||
	const TOP = 'top';
 | 
			
		||||
	const RIGHT = 'right';
 | 
			
		||||
	const BOTTOM = 'bottom';
 | 
			
		||||
	const LEFT = 'left';
 | 
			
		||||
	
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $tagName = 'control';
 | 
			
		||||
	protected $id = '';
 | 
			
		||||
	protected $x = 0.;
 | 
			
		||||
	protected $y = 0.;
 | 
			
		||||
	protected $z = 0.;
 | 
			
		||||
	protected $width = -1.;
 | 
			
		||||
	protected $height = -1.;
 | 
			
		||||
	protected $hAlign = self::CENTER;
 | 
			
		||||
	protected $vAlign = self::CENTER2;
 | 
			
		||||
	protected $scale = 1.;
 | 
			
		||||
	protected $hidden = 0;
 | 
			
		||||
	protected $classes = array();
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		if ($id !== null) {
 | 
			
		||||
			$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										65
									
								
								application/core/FML/Controls/Entry.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								application/core/FML/Controls/Entry.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,65 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlEntry
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Entry extends Control implements NewLineable, Scriptable, Styleable, TextFormatable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $name = '';
 | 
			
		||||
	protected $default = null;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new entry control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										48
									
								
								application/core/FML/Controls/FileEntry.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								application/core/FML/Controls/FileEntry.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,48 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlFileEntry
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class FileEntry extends Entry {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $folder = '';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new fileentry control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										72
									
								
								application/core/FML/Controls/Frame.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								application/core/FML/Controls/Frame.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
use FML\Types\Container;
 | 
			
		||||
use FML\Types\Renderable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlFrame
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Frame extends Control implements Container {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $children = array();
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new frame control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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__;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										66
									
								
								application/core/FML/Controls/Frame3d.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								application/core/FML/Controls/Frame3d.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,66 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
use FML\Types\Scriptable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing frame3d elements (CMlFrame)
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Frame3d extends Frame implements Scriptable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $style3d = '';
 | 
			
		||||
	protected $scriptEvents = 0;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new frame3d control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										112
									
								
								application/core/FML/Controls/Gauge.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								application/core/FML/Controls/Gauge.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlGauge
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Gauge extends Control implements Styleable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $ratio = 1.;
 | 
			
		||||
	protected $grading = 1.;
 | 
			
		||||
	protected $rotation = 0.;
 | 
			
		||||
	protected $centered = 0;
 | 
			
		||||
	protected $clan = 0;
 | 
			
		||||
	protected $drawBg = 1;
 | 
			
		||||
	protected $drawBlockBg = 1;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new gauge control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										228
									
								
								application/core/FML/Controls/Label.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										228
									
								
								application/core/FML/Controls/Label.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,228 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
use FML\Types\Linkable;
 | 
			
		||||
use FML\Types\NewLineable;
 | 
			
		||||
use FML\Types\Scriptable;
 | 
			
		||||
use FML\Types\Styleable;
 | 
			
		||||
use FML\Types\TextFormatable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlLabel
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Label extends Control implements Linkable, NewLineable, Scriptable, Styleable, TextFormatable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $text = '';
 | 
			
		||||
	protected $textPrefix = '';
 | 
			
		||||
	protected $textEmboss = 0;
 | 
			
		||||
	protected $maxLines = 0;
 | 
			
		||||
	protected $url = '';
 | 
			
		||||
	protected $manialink = '';
 | 
			
		||||
	protected $autoNewLine = 0;
 | 
			
		||||
	protected $scriptEvents = 0;
 | 
			
		||||
	protected $style = '';
 | 
			
		||||
	protected $textSize = -1;
 | 
			
		||||
	protected $textColor = '';
 | 
			
		||||
	protected $areaColor = '';
 | 
			
		||||
	protected $areaFocusColor = '';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct label control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										37
									
								
								application/core/FML/Controls/Labels/Label_Button.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								application/core/FML/Controls/Labels/Label_Button.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Labels;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Label;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Label class for button styles
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Label_Button extends Label {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE_CardButtonMedium = 'CardButtonMedium';
 | 
			
		||||
	const STYLE_CardButtonMediumL = 'CardButtonMediumL';
 | 
			
		||||
	const STYLE_CardButtonMediumS = 'CardButtonMediumS';
 | 
			
		||||
	const STYLE_CardButtonMediumWide = 'CardButtonMediumWide';
 | 
			
		||||
	const STYLE_CardButtonMediumXL = 'CardButtonMediumXL';
 | 
			
		||||
	const STYLE_CardButtonMediumXS = 'CardButtonMediumXS';
 | 
			
		||||
	const STYLE_CardButtonMediumXXL = 'CardButtonMediumXXL';
 | 
			
		||||
	const STYLE_CardButtonMediumXXXL = 'CardButtonMediumXXXL';
 | 
			
		||||
	const STYLE_CardButtonSmall = 'CardButtonSmall';
 | 
			
		||||
	const STYLE_CardButtonSmallL = 'CardButtonSmallL';
 | 
			
		||||
	const STYLE_CardButtonSmallS = 'CardButtonSmallS';
 | 
			
		||||
	const STYLE_CardButtonSmallS = 'CardButtonSmallS';
 | 
			
		||||
	const STYLE_CardButtonSmallWide = 'CardButtonSmallWide';
 | 
			
		||||
	const STYLE_CardButtonSmallXL = 'CardButtonSmallXL';
 | 
			
		||||
	const STYLE_CardButtonSmallXS = 'CardButtonSmallXS';
 | 
			
		||||
	const STYLE_CardButtonSmallXXL = 'CardButtonSmallXXL';
 | 
			
		||||
	const STYLE_CardButtonSmallXXXL = 'CardButtonSmallXXXL';
 | 
			
		||||
	const STYLE_CardMain_Quit = 'CardMain_Quit';
 | 
			
		||||
	const STYLE_CardMain_Tool = 'CardMain_Tool';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										93
									
								
								application/core/FML/Controls/Labels/Label_Text.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								application/core/FML/Controls/Labels/Label_Text.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,93 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Labels;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Label;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Label class for text styles
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Label_Text extends Label {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE_AvatarButtonNormal = 'AvatarButtonNormal';
 | 
			
		||||
	const STYLE_BgMainMenuTitleHeader = 'BgMainMenuTitleHeader';
 | 
			
		||||
	const STYLE_Default = 'Default';
 | 
			
		||||
	const STYLE_FrameTransitionFromLeft = 'FrameTransitionFromLeft';
 | 
			
		||||
	const STYLE_FrameTransitionsFromRight = 'FrameTransitionsFromRight';
 | 
			
		||||
	const STYLE_ListItemMedal = 'ListItemMedal';
 | 
			
		||||
	const STYLE_Manialink_Body = 'Manialink_Body';
 | 
			
		||||
	const STYLE_ProgressBar = 'ProgressBar';
 | 
			
		||||
	const STYLE_ProgressBarSmall = 'ProgressBarSmall';
 | 
			
		||||
	const STYLE_SliderSmall = 'SliderSmall';
 | 
			
		||||
	const STYLE_SliderVolume = 'SliderVolume';
 | 
			
		||||
	const STYLE_StyleTextScriptEditor = 'StyleTextScriptEditor';
 | 
			
		||||
	const STYLE_StyleValueYellowSmall = 'StyleValueYellowSmall';
 | 
			
		||||
	const STYLE_TextActionMaker = 'TextActionMaker';
 | 
			
		||||
	const STYLE_TextButtonBig = 'TextButtonBig';
 | 
			
		||||
	const STYLE_TextButtonMedium = 'TextButtonMedium';
 | 
			
		||||
	const STYLE_TextButtonNav = 'TextButtonNav';
 | 
			
		||||
	const STYLE_TextButtonNavBack = 'TextButtonNavBack';
 | 
			
		||||
	const STYLE_TextButtonSmall = 'TextButtonSmall';
 | 
			
		||||
	const STYLE_TextCardInfoSmall = 'TextCardInfoSmall';
 | 
			
		||||
	const STYLE_TextCardInfoVerySmall = 'TextCardInfoVerySmall';
 | 
			
		||||
	const STYLE_TextCardMedium = 'TextCardMedium';
 | 
			
		||||
	const STYLE_TextCardRaceRank = 'TextCardRaceRank';
 | 
			
		||||
	const STYLE_TextCardScores2 = 'TextCardScores2';
 | 
			
		||||
	const STYLE_TextCardSmall = 'TextCardSmall';
 | 
			
		||||
	const STYLE_TextCardSmallScores2 = 'TextCardSmallScores2';
 | 
			
		||||
	const STYLE_TextCardSmallScores2Rank = 'TextCardSmallScores2Rank';
 | 
			
		||||
	const STYLE_TextChallengeNameMedal = 'TextChallengeNameMedal';
 | 
			
		||||
	const STYLE_TextChallengeNameMedalNone = 'TextChallengeNameMedalNone';
 | 
			
		||||
	const STYLE_TextChallengeNameMedium = 'TextChallengeNameMedium';
 | 
			
		||||
	const STYLE_TextChallengeNameSmall = 'TextChallengeNameSmall';
 | 
			
		||||
	const STYLE_TextCongratsBig = 'TextCongratsBig';
 | 
			
		||||
	const STYLE_TextCredits = 'TextCredits';
 | 
			
		||||
	const STYLE_TextCreditsTitle = 'TextCreditsTitle';
 | 
			
		||||
	const STYLE_TextEditorArticle = 'TextEditorArticle';
 | 
			
		||||
	const STYLE_TextInfoMedium = 'TextInfoMedium';
 | 
			
		||||
	const STYLE_TextInfoSmall = 'TextInfoSmall';
 | 
			
		||||
	const STYLE_TextPlayerCardName = 'TextPlayerCardName';
 | 
			
		||||
	const STYLE_TextPlayerCardScore = 'TextPlayerCardScore';
 | 
			
		||||
	const STYLE_TextRaceChat = 'TextRaceChat';
 | 
			
		||||
	const STYLE_TextRaceChrono = 'TextRaceChrono';
 | 
			
		||||
	const STYLE_TextRaceChronoError = 'TextRaceChronoError';
 | 
			
		||||
	const STYLE_TextRaceChronoOfficial = 'TextRaceChronoOfficial';
 | 
			
		||||
	const STYLE_TextRaceChronoWarning = 'TextRaceChronoWarning';
 | 
			
		||||
	const STYLE_TextRaceMessage = 'TextRaceMessage';
 | 
			
		||||
	const STYLE_TextRaceMessageBig = 'TextRaceMessageBig';
 | 
			
		||||
	const STYLE_TextRaceStaticSmall = 'TextRaceStaticSmall';
 | 
			
		||||
	const STYLE_TextRaceValueSmall = 'TextRaceValueSmall';
 | 
			
		||||
	const STYLE_TextRankingsBig = 'TextRankingsBig';
 | 
			
		||||
	const STYLE_TextSPScoreBig = 'TextSPScoreBig';
 | 
			
		||||
	const STYLE_TextSPScoreMedium = 'TextSPScoreMedium';
 | 
			
		||||
	const STYLE_TextSPScoreSmall = 'TextSPScoreSmall';
 | 
			
		||||
	const STYLE_TextStaticMedium = 'TextStaticMedium';
 | 
			
		||||
	const STYLE_TextStaticSmall = 'TextStaticSmall';
 | 
			
		||||
	const STYLE_TextStaticVerySmall = 'TextStaticVerySmall';
 | 
			
		||||
	const STYLE_TextSubTitle1 = 'TextSubTitle1';
 | 
			
		||||
	const STYLE_TextSubTitle2 = 'TextSubTitle2';
 | 
			
		||||
	const STYLE_TextTips = 'TextTips';
 | 
			
		||||
	const STYLE_TextTitle1 = 'TextTitle1';
 | 
			
		||||
	const STYLE_TextTitle2 = 'TextTitle2';
 | 
			
		||||
	const STYLE_TextTitle2Blink = 'TextTitle2Blink';
 | 
			
		||||
	const STYLE_TextTitle3 = 'TextTitle3';
 | 
			
		||||
	const STYLE_TextTitle3Header = 'TextTitle3Header';
 | 
			
		||||
	const STYLE_TextTitleError = 'TextTitleError';
 | 
			
		||||
	const STYLE_TextValueBig = 'TextValueBig';
 | 
			
		||||
	const STYLE_TextValueMedium = 'TextValueMedium';
 | 
			
		||||
	const STYLE_TextValueSmall = 'TextValueSmall';
 | 
			
		||||
	const STYLE_TextValueSmallSm = 'TextValueSmallSm';
 | 
			
		||||
	const STYLE_TrackerText = 'TrackerText';
 | 
			
		||||
	const STYLE_TrackerTextBig = 'TrackerTextBig';
 | 
			
		||||
	const STYLE_TrackListItem = 'TrackListItem';
 | 
			
		||||
	const STYLE_TrackListLine = 'TrackListLine';
 | 
			
		||||
	const STYLE_UiDriving_BgBottom = 'UiDriving_BgBottom';
 | 
			
		||||
	const STYLE_UiDriving_BgCard = 'UiDriving_BgCard';
 | 
			
		||||
	const STYLE_UiDriving_BgCenter = 'UiDriving_BgCenter';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										197
									
								
								application/core/FML/Controls/Quad.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										197
									
								
								application/core/FML/Controls/Quad.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,197 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
use FML\Types\BgColorable;
 | 
			
		||||
use FML\Types\Linkable;
 | 
			
		||||
use FML\Types\Scriptable;
 | 
			
		||||
use FML\Types\Styleable;
 | 
			
		||||
use FML\Types\SubStyleable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing CMlQuad
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad extends Control implements BgColorable, Linkable, Scriptable, Styleable, SubStyleable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $image = '';
 | 
			
		||||
	protected $imageFocus = '';
 | 
			
		||||
	protected $colorize = '';
 | 
			
		||||
	protected $modulizeColor = '';
 | 
			
		||||
	protected $bgColor = '';
 | 
			
		||||
	protected $url = '';
 | 
			
		||||
	protected $manialink = '';
 | 
			
		||||
	protected $scriptEvents = 0;
 | 
			
		||||
	protected $style = '';
 | 
			
		||||
	protected $subStyle = '';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new quad control
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $id        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										31
									
								
								application/core/FML/Controls/Quads/Quad_321Go.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								application/core/FML/Controls/Quads/Quad_321Go.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style '321Go'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_321Go extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = '321Go';
 | 
			
		||||
	const SUBSTYLE_3 = '3';
 | 
			
		||||
	const SUBSTYLE_2 = '2';
 | 
			
		||||
	const SUBSTYLE_1 = '1';
 | 
			
		||||
	const SUBSTYLE_Go = 'Go!';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct 321Go quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										54
									
								
								application/core/FML/Controls/Quads/Quad_BgRaceScore2.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								application/core/FML/Controls/Quads/Quad_BgRaceScore2.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'BgRaceScore2'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_BgRaceScore2 extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'BgRaceScore2';
 | 
			
		||||
	const SUBSTYLE_BgCardPlayer = 'BgCardPlayer';
 | 
			
		||||
	const SUBSTYLE_BgCardServer = 'BgCardServer';
 | 
			
		||||
	const SUBSTYLE_BgScores = 'BgScores';
 | 
			
		||||
	const SUBSTYLE_Cartouche = 'Cartouche';
 | 
			
		||||
	const SUBSTYLE_CartoucheLine = 'CartoucheLine';
 | 
			
		||||
	const SUBSTYLE_CupFinisher = 'CupFinisher';
 | 
			
		||||
	const SUBSTYLE_CupPotentialFinisher = 'CupPotentialFinisher';
 | 
			
		||||
	const SUBSTYLE_Fame = 'Fame';
 | 
			
		||||
	const SUBSTYLE_Handle = 'Handle';
 | 
			
		||||
	const SUBSTYLE_HandleBlue = 'HandleBlue';
 | 
			
		||||
	const SUBSTYLE_HandleRed = 'HandleRed';
 | 
			
		||||
	const SUBSTYLE_HandleSelectable = 'HandleSelectable';
 | 
			
		||||
	const SUBSTYLE_IsLadderDisabled = 'IsLadderDisabled';
 | 
			
		||||
	const SUBSTYLE_IsLocalPlayer = 'IsLocalPlayer';
 | 
			
		||||
	const SUBSTYLE_LadderPoints = 'LadderPoints';
 | 
			
		||||
	const SUBSTYLE_LadderRank = 'LadderRank';
 | 
			
		||||
	const SUBSTYLE_Laps = 'Laps';
 | 
			
		||||
	const SUBSTYLE_Podium = 'Podium';
 | 
			
		||||
	const SUBSTYLE_Points = 'Points';
 | 
			
		||||
	const SUBSTYLE_SandTimer = 'SandTimer';
 | 
			
		||||
	const SUBSTYLE_ScoreLink = 'ScoreLink';
 | 
			
		||||
	const SUBSTYLE_ScoreReplay = 'ScoreReplay';
 | 
			
		||||
	const SUBSTYLE_SendScore = 'SendScore';
 | 
			
		||||
	const SUBSTYLE_Speaking = 'Speaking';
 | 
			
		||||
	const SUBSTYLE_Spectator = 'Spectator';
 | 
			
		||||
	const SUBSTYLE_Tv = 'Tv';
 | 
			
		||||
	const SUBSTYLE_Warmup = 'Warmup';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct BgRaceScore2 quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										35
									
								
								application/core/FML/Controls/Quads/Quad_Bgs1.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								application/core/FML/Controls/Quads/Quad_Bgs1.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Bgs1'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Bgs1 extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Bgs1';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Bgs1 quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										35
									
								
								application/core/FML/Controls/Quads/Quad_Bgs1InRace.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								application/core/FML/Controls/Quads/Quad_Bgs1InRace.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Bgs1InRace'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Bgs1InRace extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Bgs1InRace';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Bgs1InRace quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'BgsChallengeMedals'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_BgsChallengeMedals extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'BgsChallengeMedals';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct BgsChallengeMedals quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("BgBronze", "BgGold", "BgNadeo", "BgNotPlayed", "BgPlayed", "BgSilver");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										30
									
								
								application/core/FML/Controls/Quads/Quad_BgsPlayerCard.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								application/core/FML/Controls/Quads/Quad_BgsPlayerCard.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'BgsPlayerCard'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_BgsPlayerCard extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'BgsPlayerCard';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct BgsPlayerCard quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("BgActivePlayerCard", "BgActivePlayerName", "BgActivePlayerScore", "BgCard", "BgCardSystem", "BgMediaTracker", 
 | 
			
		||||
			"BgPlayerCard", "BgPlayerCardBig", "BgPlayerCardSmall", "BgPlayerName", "BgPlayerScore", "BgRacePlayerLine", 
 | 
			
		||||
			"BgRacePlayerName", "ProgressBar");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										29
									
								
								application/core/FML/Controls/Quads/Quad_Copilot.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								application/core/FML/Controls/Quads/Quad_Copilot.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Copilot'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Copilot extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Copilot';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Copilot quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("Down", "DownGood", "DownWrong", "Left", "LeftGood", "LeftWrong", "Right", "RightGood", "RightWrong", "Up", "UpGood", 
 | 
			
		||||
			"UpWrong");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										30
									
								
								application/core/FML/Controls/Quads/Quad_Emblems.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								application/core/FML/Controls/Quads/Quad_Emblems.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Emblems'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Emblems extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Emblems';
 | 
			
		||||
	const SUBSTYLE_0 = '#0';
 | 
			
		||||
	const SUBSTYLE_1 = '#1';
 | 
			
		||||
	const SUBSTYLE_2 = '#2';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Emblems quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										28
									
								
								application/core/FML/Controls/Quads/Quad_EnergyBar.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								application/core/FML/Controls/Quads/Quad_EnergyBar.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'EnergyBar'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_EnergyBar extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'EnergyBar';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct EnergyBar quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("BgText", "EnergyBar", "EnergyBar_0.25", "EnergyBar_Thin", "HeaderGaugeLeft", "HeaderGaugeRight");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										29
									
								
								application/core/FML/Controls/Quads/Quad_Hud3dEchelons.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								application/core/FML/Controls/Quads/Quad_Hud3dEchelons.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Hud3dEchelons'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Hud3dEchelons extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Hud3dEchelons';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Hud3dEchelons quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("EchelonBronze1", "EchelonBronze2", "EchelonBronze3", "EchelonGold1", "EchelonGold2", "EchelonGold3", "EchelonSilver1", 
 | 
			
		||||
			"EchelonSilver2", "EchelonSilver3");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										34
									
								
								application/core/FML/Controls/Quads/Quad_Icons128x128_1.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								application/core/FML/Controls/Quads/Quad_Icons128x128_1.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Icons128x128_1'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Icons128x128_1 extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Icons128x128_1';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Icons128x128_1 quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
@@ -0,0 +1,34 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Icons128x128_Blink'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Icons128x128_Blink extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Icons128x128_Blink';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Icons128x128_Blink quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										30
									
								
								application/core/FML/Controls/Quads/Quad_Icons128x32_1.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								application/core/FML/Controls/Quads/Quad_Icons128x32_1.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Icons128x32_1'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Icons128x32_1 extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Icons128x32_1';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Icons128x32_1 quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										37
									
								
								application/core/FML/Controls/Quads/Quad_Icons64x64_1.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								application/core/FML/Controls/Quads/Quad_Icons64x64_1.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Icons64x64_1'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Icons64x64_1 extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Icons64x64_1';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Icons64x64_1 quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										29
									
								
								application/core/FML/Controls/Quads/Quad_Icons64x64_2.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								application/core/FML/Controls/Quads/Quad_Icons64x64_2.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'Icons64x64_2'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_Icons64x64_2 extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'Icons64x64_2';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct Icons64x64_2 quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("ArrowElimination", "ArrowHit", "Disconnected", "DisconnectedLight", "LaserElimination", "LaserHit", 
 | 
			
		||||
			"NucleusElimination", "NucleusHit", "RocketElimination", "RocketHit", "ServerNotice", "UnknownElimination", "UnknownHit");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
@@ -0,0 +1,34 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'ManiaPlanetLogos'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_ManiaPlanetLogos extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'ManiaPlanetLogos';
 | 
			
		||||
	const SUBSTYLE_IconPlanets = 'IconPlanets';
 | 
			
		||||
	const SUBSTYLE_IconPlanetsPerspective = 'IconPlanetsPerspective';
 | 
			
		||||
	const SUBSTYLE_IconPlanetsSmall = 'IconPlanetsSmall';
 | 
			
		||||
	const SUBSTYLE_ManiaPlanetLogoBlack = 'ManiaPlanetLogoBlack';
 | 
			
		||||
	const SUBSTYLE_ManiaPlanetLogoBlackSmall = 'ManiaPlanetLogoBlackSmall';
 | 
			
		||||
	const SUBSTYLE_ManiaPlanetLogoWhite = 'ManiaPlanetLogoWhite';
 | 
			
		||||
	const SUBSTYLE_ManiaPlanetLogoWhiteSmall = 'ManiaPlanetLogoWhiteSmall';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct ManiaPlanetLogos quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
@@ -0,0 +1,33 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'ManiaplanetSystem'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_ManiaplanetSystem extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'ManiaplanetSystem';
 | 
			
		||||
	const SUBSTYLE_BgDialog = 'BgDialog';
 | 
			
		||||
	const SUBSTYLE_BgDialogAnchor = 'BgDialogAnchor';
 | 
			
		||||
	const SUBSTYLE_BgFloat = 'BgFloat';
 | 
			
		||||
	const SUBSTYLE_Events = 'Events';
 | 
			
		||||
	const SUBSTYLE_Medals = 'Medals';
 | 
			
		||||
	const SUBSTYLE_Statistics = 'Statistics';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct ManiaplanetSystem quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										28
									
								
								application/core/FML/Controls/Quads/Quad_MedalsBig.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								application/core/FML/Controls/Quads/Quad_MedalsBig.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'MedalsBig'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_MedalsBig extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'MedalsBig';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct MedalsBig quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("MedalBronze", "MedalGold", "MedalGoldPerspective", "MedalNadeo", "MedalNadeoPerspective", "MedalSilver", "MedalSlot");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										28
									
								
								application/core/FML/Controls/Quads/Quad_TitleLogos.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								application/core/FML/Controls/Quads/Quad_TitleLogos.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'TitleLogos'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_TitleLogos extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'TitleLogos';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct TitleLogos quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
		array("Author", "Collection", "Icon", "Title");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
@@ -0,0 +1,33 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'UIConstruction_Buttons'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_UIConstruction_Buttons extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'UIConstruction_Buttons';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct UIConstruction_Buttons quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->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");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
@@ -0,0 +1,48 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls\Quads;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Quad;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Quad class for style 'UiSMSpectatorScoreBig'
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Quad_UiSMSpectatorScoreBig extends Quad {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const STYLE = 'UiSMSpectatorScoreBig';
 | 
			
		||||
	CONST SUBSTYLE_BotLeft = 'BotLeft';
 | 
			
		||||
	CONST SUBSTYLE_BotLeftGlass = 'BotLeftGlass';
 | 
			
		||||
	CONST SUBSTYLE_BotRight = 'BotRight';
 | 
			
		||||
	CONST SUBSTYLE_BotRightGlass = 'BotRightGlass';
 | 
			
		||||
	CONST SUBSTYLE_CenterShield = 'CenterShield';
 | 
			
		||||
	CONST SUBSTYLE_CenterShieldSmall = 'CenterShieldSmall';
 | 
			
		||||
	CONST SUBSTYLE_HandleLeft = 'HandleLeft';
 | 
			
		||||
	CONST SUBSTYLE_HandleRight = 'HandleRight';
 | 
			
		||||
	CONST SUBSTYLE_PlayerGlass = 'PlayerGlass';
 | 
			
		||||
	CONST SUBSTYLE_PlayerIconBg = 'PlayerIconBg';
 | 
			
		||||
	CONST SUBSTYLE_PlayerJunction = 'PlayerJunction';
 | 
			
		||||
	CONST SUBSTYLE_PlayerSlot = 'PlayerSlot';
 | 
			
		||||
	CONST SUBSTYLE_PlayerSlotCenter = 'PlayerSlotCenter';
 | 
			
		||||
	CONST SUBSTYLE_PlayerSlotRev = 'PlayerSlotRev';
 | 
			
		||||
	CONST SUBSTYLE_PlayerSlotSmall = 'PlayerSlotSmall';
 | 
			
		||||
	CONST SUBSTYLE_PlayerSlotSmallRev = 'PlayerSlotSmallRev';
 | 
			
		||||
	CONST SUBSTYLE_TableBgHoriz = 'TableBgHoriz';
 | 
			
		||||
	CONST SUBSTYLE_TableBgVert = 'TableBgVert';
 | 
			
		||||
	CONST SUBSTYLE_Top = 'Top';
 | 
			
		||||
	CONST SUBSTYLE_UIRange1Bg = 'UIRange1Bg';
 | 
			
		||||
	CONST SUBSTYLE_UIRange2Bg = 'UIRange2Bg';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct UiSMSpectatorScoreBig quad
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct() {
 | 
			
		||||
		parent::__construct();
 | 
			
		||||
		$this->setStyle(self::STYLE);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										30
									
								
								application/core/FML/Controls/Video.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								application/core/FML/Controls/Video.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Controls;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing video (CMlMediaPlayer)
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Video extends Control implements Playable, Scriptable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new video control
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		parent::__construct($id);
 | 
			
		||||
		$this->tagName = 'video';
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 *
 | 
			
		||||
	 * @see \FML\Control::render()
 | 
			
		||||
	 */
 | 
			
		||||
	public function render(\DOMDocument $domDocument) {
 | 
			
		||||
		$xml = parent::render($domDocument);
 | 
			
		||||
		return $xml;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										26
									
								
								application/core/FML/Elements/Format.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								application/core/FML/Elements/Format.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Elements;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing a format
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Format implements BgColorable, Renderable, Styleable, TextFormatable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $tagName = 'format';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 *
 | 
			
		||||
	 * @see \FML\Renderable::render()
 | 
			
		||||
	 */
 | 
			
		||||
	public function render(\DOMDocument $domDocument) {
 | 
			
		||||
		$xml = $domDocument->createElement($this->tagName);
 | 
			
		||||
		return $xml;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										37
									
								
								application/core/FML/Elements/Including.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								application/core/FML/Elements/Including.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Elements;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing include
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Including implements Renderable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $url = '';
 | 
			
		||||
	protected $tagName = 'include';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set url
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $url        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setUrl($url) {
 | 
			
		||||
		$this->url = $url;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 *
 | 
			
		||||
	 * @see \FML\Renderable::render()
 | 
			
		||||
	 */
 | 
			
		||||
	public function render(\DOMDocument $domDocument) {
 | 
			
		||||
		$xml = $domDocument->createElement($this->tagName);
 | 
			
		||||
		$xml->setAttribute('url', $this->url);
 | 
			
		||||
		return $xml;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										41
									
								
								application/core/FML/Elements/Music.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								application/core/FML/Elements/Music.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Elements;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing music
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Music implements Renderable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $data = '';
 | 
			
		||||
	protected $tagName = 'music';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set data
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $data        	
 | 
			
		||||
	 * @return \FML\Elements\Music
 | 
			
		||||
	 */
 | 
			
		||||
	public function setData($data) {
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										42
									
								
								application/core/FML/Elements/SimpleScript.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								application/core/FML/Elements/SimpleScript.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Elements;
 | 
			
		||||
 | 
			
		||||
use FML\Types\Renderable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing a manialink script tag with a simple script text
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class SimpleScript implements Renderable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $tagName = 'script';
 | 
			
		||||
	protected $text = '';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set script text
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $text        	
 | 
			
		||||
	 * @return \FML\Script\Script
 | 
			
		||||
	 */
 | 
			
		||||
	public function setText($text) {
 | 
			
		||||
		$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										168
									
								
								application/core/FML/ManiaLink.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										168
									
								
								application/core/FML/ManiaLink.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,168 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML;
 | 
			
		||||
 | 
			
		||||
require_once __DIR__ . '/autoload.php';
 | 
			
		||||
 | 
			
		||||
use FML\Types\Container;
 | 
			
		||||
use FML\Types\Renderable;
 | 
			
		||||
use FML\Script\Script;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class representing a manialink
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class ManiaLink implements Container {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $encoding = 'utf-8';
 | 
			
		||||
	protected $tagName = 'manialink';
 | 
			
		||||
	protected $id = '';
 | 
			
		||||
	protected $version = 1;
 | 
			
		||||
	protected $background = '';
 | 
			
		||||
	protected $navigable3d = 0;
 | 
			
		||||
	protected $timeout = 0;
 | 
			
		||||
	protected $children = array();
 | 
			
		||||
	protected $script = null;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Construct a new manialink
 | 
			
		||||
	 */
 | 
			
		||||
	public function __construct($id = null) {
 | 
			
		||||
		if ($id !== null) {
 | 
			
		||||
			$this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										206
									
								
								application/core/FML/Script/Script.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										206
									
								
								application/core/FML/Script/Script.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,206 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Control;
 | 
			
		||||
use FML\Script\Sections\Constants;
 | 
			
		||||
use FML\Script\Sections\Functions;
 | 
			
		||||
use FML\Script\Sections\Globals;
 | 
			
		||||
use FML\Script\Sections\Includes;
 | 
			
		||||
use FML\Script\Sections\Labels;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class reprenting the manialink script
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Script {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $features = array();
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Add a script feature
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param ScriptFeature $scriptFeature        	
 | 
			
		||||
	 * @return \FML\Script\Script
 | 
			
		||||
	 */
 | 
			
		||||
	public function addFeature(ScriptFeature $scriptFeature) {
 | 
			
		||||
		array_push($this->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										13
									
								
								application/core/FML/Script/ScriptFeature.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								application/core/FML/Script/ScriptFeature.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface representing a script feature
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface ScriptFeature {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										18
									
								
								application/core/FML/Script/Sections/Constants.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								application/core/FML/Script/Sections/Constants.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script\Sections;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Script feature using constants
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Constants {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Return array of constant values with names as keys
 | 
			
		||||
	 */
 | 
			
		||||
	public function getConstants();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Script/Sections/Functions.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Script/Sections/Functions.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script\Sections;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Script feature using functions
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Functions {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Return array of function implementations and signatures as keys
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array
 | 
			
		||||
	 */
 | 
			
		||||
	public function getFunctions();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Script/Sections/Globals.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Script/Sections/Globals.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script\Sections;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Script feature using globals
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Globals {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Return array with global variable types with variable names as keys
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array
 | 
			
		||||
	 */
 | 
			
		||||
	public function getGlobals();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Script/Sections/Includes.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Script/Sections/Includes.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script\Sections;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Script feature using includes
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Includes {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Return array of included files with namespaces as keys
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array
 | 
			
		||||
	 */
 | 
			
		||||
	public function getIncludes();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										30
									
								
								application/core/FML/Script/Sections/Labels.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								application/core/FML/Script/Sections/Labels.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script\Sections;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Script feature using labels
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Labels {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const ENTRYSUBMIT = 'EntrySubmit';
 | 
			
		||||
	const KEYPRESS = 'KeyPress';
 | 
			
		||||
	const LOOP = 'Loop';
 | 
			
		||||
	const MOUSECLICK = 'MouseClick';
 | 
			
		||||
	const MOUSEOUT = 'MouseOut';
 | 
			
		||||
	const MOUSEOVER = 'MouseOver';
 | 
			
		||||
	const ONINIT = 'OnInit';
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Return array of label implementations with label names as keys
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return array
 | 
			
		||||
	 */
 | 
			
		||||
	public function getLabels();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										27
									
								
								application/core/FML/Script/Templates/Main.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								application/core/FML/Script/Templates/Main.txt
									
									
									
									
									
										Normal file
									
								
							@@ -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+++
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -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();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -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();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										71
									
								
								application/core/FML/Script/Tooltips.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								application/core/FML/Script/Tooltips.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Script;
 | 
			
		||||
 | 
			
		||||
use FML\Controls\Control;
 | 
			
		||||
use FML\Script\Sections\Constants;
 | 
			
		||||
use FML\Script\Sections\Labels;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * ScriptFeature class offering tooltip behaviors
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
class Tooltips implements Constants, Labels, ScriptFeature {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Constants
 | 
			
		||||
	 */
 | 
			
		||||
	const C_TOOLTIPIDS = 'C_FML_TooltipIds';
 | 
			
		||||
	
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $tooltips = array();
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Add a tooltip behavior showing the tooltipControl while hovering over the hoverControl
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param Control $hoverControl        	
 | 
			
		||||
	 * @param Control $tooltipControl        	
 | 
			
		||||
	 * @return \FML\Script\Tooltips
 | 
			
		||||
	 */
 | 
			
		||||
	public function add(Control $hoverControl, Control $tooltipControl) {
 | 
			
		||||
		$hoverControl->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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Types/BgColorable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Types/BgColorable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with background color attribute
 | 
			
		||||
 * 
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface BgColorable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set background color
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $bgColor        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setBgColor($bgColor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										25
									
								
								application/core/FML/Types/Container.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								application/core/FML/Types/Container.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements being able to contain other elements
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Container {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Add a new child
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param Renderable $child        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function add(Renderable $child);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Remove all children
 | 
			
		||||
	 */
 | 
			
		||||
	public function removeChildren();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										27
									
								
								application/core/FML/Types/Linkable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								application/core/FML/Types/Linkable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with url attributes
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Linkable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set url
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $url        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setUrl($url);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set manialink
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $manialink        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setManialink($manialink);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Types/NewLineable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Types/NewLineable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with autonewline attribute
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface NewLineable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set auto new line
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param bool $autoNewLine        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setAutoNewLine($autoNewLine);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										56
									
								
								application/core/FML/Types/Playable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								application/core/FML/Types/Playable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with media attributes
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Playable {
 | 
			
		||||
	/**
 | 
			
		||||
	 * Protected properties
 | 
			
		||||
	 */
 | 
			
		||||
	protected $data = '';
 | 
			
		||||
	protected $play = 0;
 | 
			
		||||
	protected $looping = 0;
 | 
			
		||||
	protected $music = 1;
 | 
			
		||||
	protected $volume = 1.;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set data
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $data        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setData($data);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set play
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param bool $play        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setPlay($play);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set looping
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param bool $looping        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setLooping($looping);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set music
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param bool $music        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setMusic($music);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set volume
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param real $volume        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setVolume($volume);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										21
									
								
								application/core/FML/Types/Renderable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								application/core/FML/Types/Renderable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for renderable elements
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Renderable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Render the xml element
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param \DOMDocument $domDocument        	
 | 
			
		||||
	 * @return \DOMElement
 | 
			
		||||
	 */
 | 
			
		||||
	public function render(\DOMDocument $domDocument);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Types/Scriptable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Types/Scriptable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with scriptevents attribute
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Scriptable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set scriptevents
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param bool $style        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setScriptEvents($scriptEvents);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										20
									
								
								application/core/FML/Types/Styleable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								application/core/FML/Types/Styleable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with style attribute
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface Styleable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set style
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $style        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setStyle($style);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										28
									
								
								application/core/FML/Types/SubStyleable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								application/core/FML/Types/SubStyleable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with substyle attribute
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface SubStyleable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set substyle
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $subStyle        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setSubStyle($subStyle);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set style and substyle
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param string $style        	
 | 
			
		||||
	 * @param string $subStyle        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setStyles($style, $subStyle);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										41
									
								
								application/core/FML/Types/TextFormatable.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								application/core/FML/Types/TextFormatable.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace FML\Types;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Interface for elements with formatable text
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 */
 | 
			
		||||
interface TextFormatable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set text size
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param int $textSize        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setTextSize($textSize);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set text color
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $textColor        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setTextColor($textColor);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set area color
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $areaColor        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setAreaColor($areaColor);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Set area focus color
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param string $areaFocusColor        	
 | 
			
		||||
	 */
 | 
			
		||||
	public function setAreaFocusColor($areaFocusColor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										22
									
								
								application/core/FML/autoload.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								application/core/FML/autoload.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FancyManiaLinks - Automatic ManiaLink Generator Framework
 | 
			
		||||
 *
 | 
			
		||||
 * @author steeffeen
 | 
			
		||||
 * @version 1.0
 | 
			
		||||
 */
 | 
			
		||||
if (!defined('FML_PATH')) {
 | 
			
		||||
	define('FML_PATH', __DIR__ . '/../');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
spl_autoload_register(
 | 
			
		||||
		function ($className) {
 | 
			
		||||
			$classPath = str_replace('\\', DIRECTORY_SEPARATOR, $className);
 | 
			
		||||
			$filePath = FML_PATH . DIRECTORY_SEPARATOR . $classPath . '.php';
 | 
			
		||||
			if (file_exists($filePath)) {
 | 
			
		||||
				require_once $filePath;
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
		Reference in New Issue
	
	Block a user