fixed labelline + FML control update
This commit is contained in:
parent
63ee8a9ae4
commit
e39b903ebd
@ -243,7 +243,7 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
|
||||
|
||||
$labelLine->addLabelEntryText($map->id, $posX + 3.5, 9);
|
||||
$labelLine->addLabelEntryText($map->name, $posX + 12.5, 38.5);
|
||||
$labelLine->addLabelEntryText($map->author, $posX + 59,-1,self::ACTION_GET_MAPS_FROM_AUTHOR . '.' . $map->author); //FIXME with > 1 disables the ml
|
||||
$labelLine->addLabelEntryText($map->author, $posX + 59, 44, self::ACTION_GET_MAPS_FROM_AUTHOR . '.' . $map->author);
|
||||
$labelLine->addLabelEntryText(str_replace('Arena', '', $map->maptype), $posX + 103, 15);
|
||||
$labelLine->addLabelEntryText($map->mood, $posX + 118, 12);
|
||||
$labelLine->addLabelEntryText($time, $posX + 130, $width - ($posX + 130));
|
||||
@ -251,7 +251,6 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
|
||||
$labelLine->setPrefix('$s');
|
||||
$labelLine->render();
|
||||
|
||||
|
||||
$mapFrame->setY($posY);
|
||||
|
||||
$mxQuad = new Quad();
|
||||
|
@ -52,6 +52,7 @@ class LabelLine implements UsageInformationAble {
|
||||
}
|
||||
if ($width) {
|
||||
$label->setWidth($width);
|
||||
$label->setHeight(5); //TODO verify if 5 is ok for everywhere
|
||||
}
|
||||
$this->addLabel($label);
|
||||
}
|
||||
|
@ -327,7 +327,8 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
* @api
|
||||
* @param string $horizontalAlign Horizontal alignment
|
||||
* @return static
|
||||
* @deprecated Use setHorizontalAlign() instead
|
||||
* @deprecated Use setHorizontalAlign()
|
||||
* @see Control::setHorizontalAlign()
|
||||
*/
|
||||
public function setHAlign($horizontalAlign)
|
||||
{
|
||||
@ -364,7 +365,8 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
* @api
|
||||
* @param string $verticalAlign Vertical alignment
|
||||
* @return static
|
||||
* @deprecated
|
||||
* @deprecated Use setVerticalAlign()
|
||||
* @see Control::setVerticalAlign()
|
||||
*/
|
||||
public function setVAlign($verticalAlign)
|
||||
{
|
||||
@ -676,12 +678,28 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new Script Features
|
||||
*
|
||||
* @api
|
||||
* @param ScriptFeature[] $scriptFeatures Script Features
|
||||
* @return static
|
||||
*/
|
||||
public function addScriptFeatures(array $scriptFeatures)
|
||||
{
|
||||
foreach ($scriptFeatures as $scriptFeature) {
|
||||
$this->addScriptFeature($scriptFeature);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all Script Features
|
||||
*
|
||||
* @api
|
||||
* @return static
|
||||
* @deprecated use removeAllScriptFeatures() instead
|
||||
* @deprecated Use removeAllScriptFeatures()
|
||||
* @see Control::removeAllScriptFeatures()
|
||||
*/
|
||||
public function removeScriptFeatures()
|
||||
{
|
||||
@ -834,14 +852,28 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
if ($this->controlId) {
|
||||
$domElement->setAttribute("id", $this->controlId);
|
||||
}
|
||||
if ($this->posX || $this->posY) {
|
||||
$domElement->setAttribute("pos", "{$this->posX} {$this->posY}");
|
||||
}
|
||||
if ($this->posX || $this->posY || $this->posZ) {
|
||||
// backwards-compatibility
|
||||
$domElement->setAttribute("posn", "{$this->posX} {$this->posY} {$this->posZ}");
|
||||
}
|
||||
if ($this->posZ) {
|
||||
$domElement->setAttribute("z-index", $this->posZ);
|
||||
}
|
||||
if ($this->width >= 0. || $this->height >= 0.) {
|
||||
$domElement->setAttribute("size", "{$this->width} {$this->height}");
|
||||
// backwards-compatibility
|
||||
$domElement->setAttribute("sizen", "{$this->width} {$this->height}");
|
||||
if ($this->width >= 0.) {
|
||||
// backwards-compatibility
|
||||
$domElement->setAttribute("width", $this->width);
|
||||
}
|
||||
if ($this->height >= 0.) {
|
||||
// backwards-compatibility
|
||||
$domElement->setAttribute("height", $this->height);
|
||||
}
|
||||
}
|
||||
if ($this->horizontalAlign) {
|
||||
$domElement->setAttribute("halign", $this->horizontalAlign);
|
||||
@ -858,7 +890,7 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
if ($this->rotation) {
|
||||
$domElement->setAttribute("rot", $this->rotation);
|
||||
}
|
||||
if (!empty($this->classes)) {
|
||||
if ($this->classes) {
|
||||
$classes = implode(" ", $this->classes);
|
||||
$domElement->setAttribute("class", $classes);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user