fml update

This commit is contained in:
Steffen Schröder
2014-01-21 20:30:40 +01:00
parent 71a19d2464
commit 11abd5ee6e
73 changed files with 209 additions and 83 deletions

View File

@@ -12,7 +12,7 @@ use FML\Types\Scriptable;
* @author steeffeen
*/
class Audio extends Control implements Playable, Scriptable {
/**
/*
* Protected Properties
*/
protected $data = '';

View File

@@ -11,7 +11,7 @@ use FML\Types\Renderable;
* @author steeffeen
*/
abstract class Control implements Renderable {
/**
/*
* Constants
*/
const CENTER = 'center';
@@ -21,7 +21,7 @@ abstract class Control implements Renderable {
const BOTTOM = 'bottom';
const LEFT = 'left';
/**
/*
* Protected Properties
*/
protected $tagName = 'control';

View File

@@ -14,7 +14,7 @@ use FML\Types\TextFormatable;
* @author steeffeen
*/
class Entry extends Control implements NewLineable, Scriptable, Styleable, TextFormatable {
/**
/*
* Protected Properties
*/
protected $name = '';

View File

@@ -9,7 +9,7 @@ namespace FML\Controls;
* @author steeffeen
*/
class FileEntry extends Entry {
/**
/*
* Protected Properties
*/
protected $folder = '';

View File

@@ -14,7 +14,7 @@ use FML\Elements\FrameModel;
* @author steeffeen
*/
class Frame extends Control implements Container {
/**
/*
* Protected Properties
*/
protected $children = array();

View File

@@ -12,7 +12,7 @@ use FML\Stylesheet\Style3d;
* @author steeffeen
*/
class Frame3d extends Frame implements Scriptable {
/**
/*
* Protected Properties
*/
protected $style3dId = '';

View File

@@ -12,7 +12,7 @@ use FML\Types\Renderable;
* @author steeffeen
*/
class FrameInstance extends Control {
/**
/*
* Protected Properties
*/
protected $modelId = '';

View File

@@ -10,9 +10,16 @@ use FML\Types\Styleable;
*
* @author steeffeen
*/
// TODO: gauge styles
class Gauge extends Control implements Styleable {
/**
/*
* Constants
*/
const STYLE_BgCard = 'BgCard';
const STYLE_EnergyBar = 'EnergyBar';
const STYLE_ProgressBar = 'ProgressBar';
const STYLE_ProgressBarSmall = 'ProgressBarSmall';
/*
* Protected Properties
*/
protected $ratio = 0.;

View File

@@ -16,7 +16,7 @@ use FML\Types\TextFormatable;
* @author steeffeen
*/
class Label extends Control implements Actionable, Linkable, NewLineable, Scriptable, Styleable, TextFormatable {
/**
/*
* Protected Properties
*/
protected $text = '';
@@ -137,6 +137,14 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
return $this;
}
/**
*
* @see \FML\Types\Actionable::getAction()
*/
public function getAction() {
return $this->action;
}
/**
*
* @see \FML\Types\Actionable::setActionKey()
@@ -263,7 +271,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
if ($this->text) {
if (strlen($this->text) > 0) {
$xmlElement->setAttribute('text', $this->text);
}
if ($this->textId) {
@@ -281,7 +289,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
if ($this->maxLines >= 0) {
$xmlElement->setAttribute('maxlines', $this->maxLines);
}
if ($this->action) {
if (strlen($this->action) > 0) {
$xmlElement->setAttribute('action', $this->action);
}
if ($this->actionKey >= 0) {

View File

@@ -10,7 +10,7 @@ use FML\Controls\Label;
* @author steeffeen
*/
class Label_Button extends Label {
/**
/*
* Constants
*/
const STYLE_CardButtonMedium = 'CardButtonMedium';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Label;
* @author steeffeen
*/
class Label_Text extends Label {
/**
/*
* Constants
*/
const STYLE_AvatarButtonNormal = 'AvatarButtonNormal';
@@ -93,7 +93,7 @@ class Label_Text extends Label {
* Create a new Label_Text Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Labels\Label_Button
* @return \FML\Controls\Labels\Label_Text
*/
public static function create($id = null) {
$labelText = new Label_Text($id);

View File

@@ -16,7 +16,7 @@ use FML\Types\SubStyleable;
* @author steeffeen
*/
class Quad extends Control implements Actionable, BgColorable, Linkable, Scriptable, Styleable, SubStyleable {
/**
/*
* Protected Properties
*/
protected $image = '';
@@ -146,6 +146,14 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
*
* @see \FML\Types\Actionable::getAction()
*/
public function getAction() {
return $this->action;
}
/**
*
* @see \FML\Types\Actionable::setActionKey()
@@ -274,7 +282,7 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
if (!$this->autoScale) {
$xmlElement->setAttribute('autoscale', $this->autoScale);
}
if ($this->action) {
if (strlen($this->action) > 0) {
$xmlElement->setAttribute('action', $this->action);
}
if ($this->actionKey >= 0) {

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_321Go extends Quad {
/**
/*
* Constants
*/
const STYLE = '321Go';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_BgRaceScore2 extends Quad {
/**
/*
* Constants
*/
const STYLE = 'BgRaceScore2';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Bgs1 extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Bgs1';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Bgs1InRace extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Bgs1InRace';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_BgsChallengeMedals extends Quad {
/**
/*
* Constants
*/
const STYLE = 'BgsChallengeMedals';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_BgsPlayerCard extends Quad {
/**
/*
* Constants
*/
const STYLE = 'BgsPlayerCard';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Copilot extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Copilot';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Emblems extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Emblems';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_EnergyBar extends Quad {
/**
/*
* Constants
*/
const STYLE = 'EnergyBar';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Hud3dEchelons extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Hud3dEchelons';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Icons128x128_1 extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Icons128x128_1';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Icons128x128_Blink extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Icons128x128_Blink';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Icons128x32_1 extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Icons128x32_1';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Icons64x64_1 extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Icons64x64_1';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_Icons64x64_2 extends Quad {
/**
/*
* Constants
*/
const STYLE = 'Icons64x64_2';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_ManiaPlanetLogos extends Quad {
/**
/*
* Constants
*/
const STYLE = 'ManiaPlanetLogos';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_ManiaplanetSystem extends Quad {
/**
/*
* Constants
*/
const STYLE = 'ManiaplanetSystem';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_MedalsBig extends Quad {
/**
/*
* Constants
*/
const STYLE = 'MedalsBig';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_TitleLogos extends Quad {
/**
/*
* Constants
*/
const STYLE = 'TitleLogos';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_UIConstruction_Buttons extends Quad {
/**
/*
* Constants
*/
const STYLE = 'UIConstruction_Buttons';

View File

@@ -10,7 +10,7 @@ use FML\Controls\Quad;
* @author steeffeen
*/
class Quad_UiSMSpectatorScoreBig extends Quad {
/**
/*
* Constants
*/
const STYLE = 'UiSMSpectatorScoreBig';

View File

@@ -12,7 +12,7 @@ use FML\Types\Scriptable;
* @author steeffeen
*/
class Video extends Control implements Playable, Scriptable {
/**
/*
* Protected Properties
*/
protected $data = '';