- Karma plugin

- ColorUtil
- Minor improvements
This commit is contained in:
Steffen Schröder
2013-11-28 01:12:52 +01:00
parent c14c025df3
commit 80db4071ce
10 changed files with 586 additions and 22 deletions

View File

@ -121,19 +121,37 @@ abstract class Control implements Renderable {
* @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);
}
public function setPosition($x, $y, $z = null) {
$this->setX($x);
$this->setY($y);
if ($z !== null) {
$this->setZ($z);
}
return $this;
}
/**
* Set width
*
* @param real $width
* @return \FML\Controls\Control
*/
public function setWidth($width) {
$this->width = $width;
return $this;
}
/**
* Set height
*
* @param real $height
* @return \FML\Controls\Control
*/
public function setHeight($height) {
$this->height = $height;
return $this;
}
/**
* Set size
*
@ -141,13 +159,9 @@ abstract class Control implements Renderable {
* @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;
}
public function setSize($width, $height) {
$this->setWidth($width);
$this->setHeight($height);
return $this;
}