description label clone maplist
This commit is contained in:
parent
18fd95dcd4
commit
9efe8f1ffa
@ -231,6 +231,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$closeQuad->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_QuitRace);
|
$closeQuad->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_QuitRace);
|
||||||
$closeQuad->setAction(ManialinkManager::ACTION_CLOSEWIDGET);
|
$closeQuad->setAction(ManialinkManager::ACTION_CLOSEWIDGET);
|
||||||
|
|
||||||
|
|
||||||
return $frame;
|
return $frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,9 +248,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$frame = $this->buildMainFrame();
|
$frame = $this->buildMainFrame();
|
||||||
$maniaLink->add($frame);
|
$maniaLink->add($frame);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create script and features
|
// Create script and features
|
||||||
$script = new Script();
|
$script = new Script();
|
||||||
$maniaLink->setScript($script);
|
$maniaLink->setScript($script);
|
||||||
@ -262,6 +260,14 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$array = array("Id" => $x + 5, "Mx ID" => $x + 10, "MapName" => $x + 20, "Author" => $x + 68, "Karma" => $x + 115, "Actions" => $this->width / 2 - 15);
|
$array = array("Id" => $x + 5, "Mx ID" => $x + 10, "MapName" => $x + 20, "Author" => $x + 68, "Karma" => $x + 115, "Actions" => $this->width / 2 - 15);
|
||||||
$this->maniaControl->manialinkManager->labelLine($headFrame, $array);
|
$this->maniaControl->manialinkManager->labelLine($headFrame, $array);
|
||||||
|
|
||||||
|
//Predefine Description Label
|
||||||
|
$preDefinedDescriptionLabel = new Label();
|
||||||
|
$preDefinedDescriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
||||||
|
$preDefinedDescriptionLabel->setPosition($x + 10, -$this->height / 2 + 5);
|
||||||
|
$preDefinedDescriptionLabel->setSize($this->width * 0.7, 4);
|
||||||
|
$preDefinedDescriptionLabel->setTextSize(2);
|
||||||
|
$preDefinedDescriptionLabel->setVisible(false);
|
||||||
|
|
||||||
//Get Maplist
|
//Get Maplist
|
||||||
$mapList = $this->maniaControl->mapManager->getMapList();
|
$mapList = $this->maniaControl->mapManager->getMapList();
|
||||||
|
|
||||||
@ -313,13 +319,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
|
|
||||||
|
|
||||||
//MapQueue Description Label
|
//MapQueue Description Label
|
||||||
$descriptionLabel = new Label();
|
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
||||||
$frame->add($descriptionLabel);
|
$frame->add($descriptionLabel);
|
||||||
$descriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
|
||||||
$descriptionLabel->setPosition($x + 10, -$this->height / 2 + 5);
|
|
||||||
$descriptionLabel->setSize($this->width * 0.7, 4);
|
|
||||||
$descriptionLabel->setTextSize(2);
|
|
||||||
$descriptionLabel->setVisible(false);
|
|
||||||
|
|
||||||
//Map-Queue-Map-Label
|
//Map-Queue-Map-Label
|
||||||
if(isset($queuedMaps[$map->uid])) {
|
if(isset($queuedMaps[$map->uid])) {
|
||||||
@ -364,13 +365,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$eraseQuad->setAction(self::ACTION_CONFIRM_ERASE_MAP . "." . ($id));
|
$eraseQuad->setAction(self::ACTION_CONFIRM_ERASE_MAP . "." . ($id));
|
||||||
|
|
||||||
//Description Label
|
//Description Label
|
||||||
$descriptionLabel = new Label();
|
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
||||||
$frame->add($descriptionLabel);
|
$frame->add($descriptionLabel);
|
||||||
$descriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
|
||||||
$descriptionLabel->setPosition($x + 10, -$this->height / 2 + 5);
|
|
||||||
$descriptionLabel->setSize($this->width * 0.7, 4);
|
|
||||||
$descriptionLabel->setTextSize(2);
|
|
||||||
$descriptionLabel->setVisible(false);
|
|
||||||
$descriptionLabel->setText("Remove Map: {$map->name}");
|
$descriptionLabel->setText("Remove Map: {$map->name}");
|
||||||
$script->addTooltip($eraseQuad, $descriptionLabel);
|
$script->addTooltip($eraseQuad, $descriptionLabel);
|
||||||
}
|
}
|
||||||
@ -389,13 +385,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
|
|
||||||
$switchToQuad->setAction(self::ACTION_CONFIRM_SWITCHTO_MAP . "." . ($id));
|
$switchToQuad->setAction(self::ACTION_CONFIRM_SWITCHTO_MAP . "." . ($id));
|
||||||
|
|
||||||
$descriptionLabel = new Label();
|
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
||||||
$frame->add($descriptionLabel);
|
$frame->add($descriptionLabel);
|
||||||
$descriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
|
||||||
$descriptionLabel->setPosition($x + 10, -$this->height / 2 + 5);
|
|
||||||
$descriptionLabel->setSize($this->width * 0.7, 4);
|
|
||||||
$descriptionLabel->setTextSize(2);
|
|
||||||
$descriptionLabel->setVisible(false);
|
|
||||||
$descriptionLabel->setText("Switch Directly to Map: {$map->name}");
|
$descriptionLabel->setText("Switch Directly to Map: {$map->name}");
|
||||||
$script->addTooltip($switchToQuad, $descriptionLabel);
|
$script->addTooltip($switchToQuad, $descriptionLabel);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ use FML\Controls\Quads\Quad_Icons64x64_1;
|
|||||||
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
||||||
use FML\ManiaLink;
|
use FML\ManiaLink;
|
||||||
use FML\Script\Script;
|
use FML\Script\Script;
|
||||||
use FML\Script\Tooltips;
|
|
||||||
use ManiaControl\Admin\AuthenticationManager;
|
use ManiaControl\Admin\AuthenticationManager;
|
||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
|
Loading…
Reference in New Issue
Block a user