- Improved Chatlog Plugin
- First Step for ManialinkManager - Added FML Update + MC-Fixes for the changes
This commit is contained in:
@ -83,7 +83,7 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set x position
|
||||
*
|
||||
* @param real $x
|
||||
* @param float $x
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setX($x) {
|
||||
@ -94,7 +94,7 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set y position
|
||||
*
|
||||
* @param real $y
|
||||
* @param float $y
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setY($y) {
|
||||
@ -105,7 +105,7 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set z position
|
||||
*
|
||||
* @param real $z
|
||||
* @param float $z
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setZ($z) {
|
||||
@ -116,9 +116,9 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set position
|
||||
*
|
||||
* @param real $x
|
||||
* @param real $y
|
||||
* @param real $z
|
||||
* @param float $x
|
||||
* @param float $y
|
||||
* @param float $z
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setPosition($x, $y, $z = null) {
|
||||
@ -133,7 +133,7 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set width
|
||||
*
|
||||
* @param real $width
|
||||
* @param float $width
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setWidth($width) {
|
||||
@ -144,7 +144,7 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set height
|
||||
*
|
||||
* @param real $height
|
||||
* @param float $height
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setHeight($height) {
|
||||
@ -155,8 +155,8 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set size
|
||||
*
|
||||
* @param real $width
|
||||
* @param real $height
|
||||
* @param float $width
|
||||
* @param float $height
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setSize($width, $height) {
|
||||
@ -203,7 +203,7 @@ abstract class Control implements Renderable {
|
||||
/**
|
||||
* Set scale
|
||||
*
|
||||
* @param real $scale
|
||||
* @param float $scale
|
||||
* @return \FML\Controls\Control
|
||||
*/
|
||||
public function setScale($scale) {
|
||||
|
@ -36,7 +36,7 @@ class Gauge extends Control implements Styleable {
|
||||
/**
|
||||
* Set ratio
|
||||
*
|
||||
* @param real $ratio
|
||||
* @param float $ratio
|
||||
* @return \FML\Controls\Gauge
|
||||
*/
|
||||
public function setRatio($ratio) {
|
||||
@ -47,7 +47,7 @@ class Gauge extends Control implements Styleable {
|
||||
/**
|
||||
* Set grading
|
||||
*
|
||||
* @param real $grading
|
||||
* @param float $grading
|
||||
* @return \FML\Controls\Gauge
|
||||
*/
|
||||
public function setGrading($grading) {
|
||||
@ -69,7 +69,7 @@ class Gauge extends Control implements Styleable {
|
||||
/**
|
||||
* Set rotation
|
||||
*
|
||||
* @param real $rotation
|
||||
* @param float $rotation
|
||||
* @return \FML\Controls\Gauge
|
||||
*/
|
||||
public function setRotation($rotation) {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace FML\Controls;
|
||||
|
||||
use FML\Types\Actionable;
|
||||
use FML\Types\Linkable;
|
||||
use FML\Types\NewLineable;
|
||||
use FML\Types\Scriptable;
|
||||
@ -13,7 +14,7 @@ use FML\Types\TextFormatable;
|
||||
*
|
||||
* @author steeffeen
|
||||
*/
|
||||
class Label extends Control implements Linkable, NewLineable, Scriptable, Styleable, TextFormatable {
|
||||
class Label extends Control implements Actionable, Linkable, NewLineable, Scriptable, Styleable, TextFormatable {
|
||||
/**
|
||||
* Protected properties
|
||||
*/
|
||||
@ -22,6 +23,7 @@ class Label extends Control implements Linkable, NewLineable, Scriptable, Stylea
|
||||
protected $textEmboss = 0;
|
||||
protected $translate = 0;
|
||||
protected $maxLines = 0;
|
||||
protected $action = '';
|
||||
protected $url = '';
|
||||
protected $manialink = '';
|
||||
protected $autoNewLine = 0;
|
||||
@ -78,7 +80,7 @@ class Label extends Control implements Linkable, NewLineable, Scriptable, Stylea
|
||||
|
||||
/**
|
||||
* Set translate
|
||||
*
|
||||
*
|
||||
* @param bool $translate
|
||||
* @return \FML\Controls\Label
|
||||
*/
|
||||
@ -98,6 +100,16 @@ class Label extends Control implements Linkable, NewLineable, Scriptable, Stylea
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \FML\Types\Actionable::setAction()
|
||||
* @return \FML\Controls\Label
|
||||
*/
|
||||
public function setAction($action) {
|
||||
$this->action = $action;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \FML\Types\Linkable::setUrl()
|
||||
@ -209,6 +221,9 @@ class Label extends Control implements Linkable, NewLineable, Scriptable, Stylea
|
||||
if ($this->maxLines) {
|
||||
$xml->setAttribute('maxlines', $this->maxLines);
|
||||
}
|
||||
if ($this->action) {
|
||||
$xml->setAttribute('action', $this->action);
|
||||
}
|
||||
if ($this->url) {
|
||||
$xml->setAttribute('url', $this->url);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace FML\Controls;
|
||||
|
||||
use FML\Types\Actionable;
|
||||
use FML\Types\BgColorable;
|
||||
use FML\Types\Linkable;
|
||||
use FML\Types\Scriptable;
|
||||
@ -13,7 +14,7 @@ use FML\Types\SubStyleable;
|
||||
*
|
||||
* @author steeffeen
|
||||
*/
|
||||
class Quad extends Control implements BgColorable, Linkable, Scriptable, Styleable, SubStyleable {
|
||||
class Quad extends Control implements Actionable, BgColorable, Linkable, Scriptable, Styleable, SubStyleable {
|
||||
/**
|
||||
* Protected properties
|
||||
*/
|
||||
@ -21,6 +22,7 @@ class Quad extends Control implements BgColorable, Linkable, Scriptable, Styleab
|
||||
protected $imageFocus = '';
|
||||
protected $colorize = '';
|
||||
protected $modulizeColor = '';
|
||||
protected $action = '';
|
||||
protected $bgColor = '';
|
||||
protected $url = '';
|
||||
protected $manialink = '';
|
||||
@ -83,6 +85,16 @@ class Quad extends Control implements BgColorable, Linkable, Scriptable, Styleab
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \FML\Types\Actionable::setAction()
|
||||
* @return \FML\Controls\Quad
|
||||
*/
|
||||
public function setAction($action) {
|
||||
$this->action = $action;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \FML\Types\BgColorable::setBgColor()
|
||||
@ -172,6 +184,9 @@ class Quad extends Control implements BgColorable, Linkable, Scriptable, Styleab
|
||||
if ($this->modulizeColor) {
|
||||
$xml->setAttribute('modulizecolor', $this->modulizeColor);
|
||||
}
|
||||
if ($this->action) {
|
||||
$xml->setAttribute('action', $this->action);
|
||||
}
|
||||
if ($this->bgColor) {
|
||||
$xml->setAttribute('bgcolor', $this->bgColor);
|
||||
}
|
||||
|
19
application/core/FML/Types/Actionable.php
Normal file
19
application/core/FML/Types/Actionable.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Types;
|
||||
|
||||
/**
|
||||
* Interface for elements that support the action attribute
|
||||
*
|
||||
* @author steeffeen
|
||||
*/
|
||||
interface Actionable {
|
||||
|
||||
/**
|
||||
* Set action
|
||||
*
|
||||
* @param string $action
|
||||
*/
|
||||
public function setAction($action);
|
||||
}
|
||||
?>
|
@ -48,7 +48,7 @@ interface Playable {
|
||||
/**
|
||||
* Set volume
|
||||
*
|
||||
* @param real $volume
|
||||
* @param float $volume
|
||||
*/
|
||||
public function setVolume($volume);
|
||||
}
|
||||
|
Reference in New Issue
Block a user