updated description label
This commit is contained in:
parent
8b4b6b4559
commit
b07fd8cd71
@ -123,12 +123,13 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
|
|
||||||
|
|
||||||
//Predefine Description Label
|
//Predefine Description Label
|
||||||
$preDefinedDescriptionLabel = new Label();
|
$descriptionLabel = new Label();
|
||||||
$preDefinedDescriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
$frame->add($descriptionLabel);
|
||||||
$preDefinedDescriptionLabel->setPosition($x + 10, -$this->height / 2 + 5);
|
$descriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
||||||
$preDefinedDescriptionLabel->setSize($this->width * 0.7, 4);
|
$descriptionLabel->setPosition($x + 10, -$this->height / 2 + 5);
|
||||||
$preDefinedDescriptionLabel->setTextSize(2);
|
$descriptionLabel->setSize($this->width * 0.7, 4);
|
||||||
$preDefinedDescriptionLabel->setVisible(false);
|
$descriptionLabel->setTextSize(2);
|
||||||
|
$descriptionLabel->setVisible(false);
|
||||||
|
|
||||||
// Headline
|
// Headline
|
||||||
$headFrame = new Frame();
|
$headFrame = new Frame();
|
||||||
@ -212,10 +213,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$countryQuad->setSize(4, 4);
|
$countryQuad->setSize(4, 4);
|
||||||
$countryQuad->setZ(-0.1);
|
$countryQuad->setZ(-0.1);
|
||||||
|
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
$script->addTooltip($countryQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $listPlayer->nickname . " from " . $listPlayer->path));
|
||||||
$frame->add($descriptionLabel);
|
|
||||||
$descriptionLabel->setText($listPlayer->nickname . " from " . $listPlayer->path);
|
|
||||||
$script->addTooltip($countryQuad, $descriptionLabel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Level Quad
|
// Level Quad
|
||||||
@ -232,10 +230,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$rightLabel->setTextSize(0.8);
|
$rightLabel->setTextSize(0.8);
|
||||||
$rightLabel->setZ(10);
|
$rightLabel->setZ(10);
|
||||||
|
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
$script->addTooltip($rightLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $this->maniaControl->authenticationManager->getAuthLevelName($listPlayer->authLevel) . " " . $listPlayer->nickname));
|
||||||
$frame->add($descriptionLabel);
|
|
||||||
$descriptionLabel->setText($this->maniaControl->authenticationManager->getAuthLevelName($listPlayer->authLevel) . " " . $listPlayer->nickname);
|
|
||||||
$script->addTooltip($rightQuad, $descriptionLabel);
|
|
||||||
|
|
||||||
// Player Profile Quad
|
// Player Profile Quad
|
||||||
$playerQuad = new Quad_UIConstruction_Buttons();
|
$playerQuad = new Quad_UIConstruction_Buttons();
|
||||||
@ -247,10 +242,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$script->addProfileButton($playerQuad, $listPlayer->login);
|
$script->addProfileButton($playerQuad, $listPlayer->login);
|
||||||
|
|
||||||
// Description Label
|
// Description Label
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
$script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "View Player profile of " . $listPlayer->nickname));
|
||||||
$frame->add($descriptionLabel);
|
|
||||||
$descriptionLabel->setText("View Player profile of " . $listPlayer->nickname);
|
|
||||||
$script->addTooltip($playerQuad, $descriptionLabel);
|
|
||||||
|
|
||||||
switch($listPlayer->authLevel) {
|
switch($listPlayer->authLevel) {
|
||||||
case authenticationManager::AUTH_LEVEL_MASTERADMIN:
|
case authenticationManager::AUTH_LEVEL_MASTERADMIN:
|
||||||
@ -278,10 +271,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$playerQuad->setSize(3.8, 3.8);
|
$playerQuad->setSize(3.8, 3.8);
|
||||||
$playerQuad->setAction(self::ACTION_PLAYER_ADV . "." . $listPlayer->login);
|
$playerQuad->setAction(self::ACTION_PLAYER_ADV . "." . $listPlayer->login);
|
||||||
|
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
// Description Label
|
||||||
$frame->add($descriptionLabel);
|
$script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Advanced Player Actions on " . $listPlayer->nickname));
|
||||||
$descriptionLabel->setText("Advanced Player Actions on " . $listPlayer->nickname);
|
|
||||||
$script->addTooltip($playerQuad, $descriptionLabel);
|
|
||||||
|
|
||||||
// Force to Red-Team Quad
|
// Force to Red-Team Quad
|
||||||
$redQuad = new Quad_Emblems();
|
$redQuad = new Quad_Emblems();
|
||||||
@ -293,11 +284,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$redQuad->setAction(self::ACTION_FORCE_RED . "." . $listPlayer->login);
|
$redQuad->setAction(self::ACTION_FORCE_RED . "." . $listPlayer->login);
|
||||||
|
|
||||||
// Force to Red-Team Description Label
|
// Force to Red-Team Description Label
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;;
|
$script->addTooltip($redQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Red Team!'));
|
||||||
$frame->add($descriptionLabel);
|
|
||||||
$descriptionLabel->setText("Force " . $listPlayer->nickname . '$z to Red Team!');
|
|
||||||
$script->addTooltip($redQuad, $descriptionLabel);
|
|
||||||
|
|
||||||
|
|
||||||
// Force to Blue-Team Quad
|
// Force to Blue-Team Quad
|
||||||
$blueQuad = new Quad_Emblems();
|
$blueQuad = new Quad_Emblems();
|
||||||
@ -309,10 +296,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$blueQuad->setAction(self::ACTION_FORCE_BLUE . "." . $listPlayer->login);
|
$blueQuad->setAction(self::ACTION_FORCE_BLUE . "." . $listPlayer->login);
|
||||||
|
|
||||||
// Force to Blue-Team Description Label
|
// Force to Blue-Team Description Label
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
$script->addTooltip($blueQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Blue Team!'));
|
||||||
$frame->add($descriptionLabel);
|
|
||||||
$descriptionLabel->setText("Force " . $listPlayer->nickname . '$z to Blue Team!');
|
|
||||||
$script->addTooltip($blueQuad, $descriptionLabel);
|
|
||||||
|
|
||||||
// Force to Spectator Quad
|
// Force to Spectator Quad
|
||||||
$spectatorQuad = new Quad_BgRaceScore2();
|
$spectatorQuad = new Quad_BgRaceScore2();
|
||||||
@ -324,10 +308,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$spectatorQuad->setAction(self::ACTION_FORCE_SPEC . "." . $listPlayer->login);
|
$spectatorQuad->setAction(self::ACTION_FORCE_SPEC . "." . $listPlayer->login);
|
||||||
|
|
||||||
// Force to Spectator Description Label
|
// Force to Spectator Description Label
|
||||||
$descriptionLabel = clone $preDefinedDescriptionLabel;
|
$script->addTooltip($spectatorQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Spectator!'));
|
||||||
$frame->add($descriptionLabel);
|
|
||||||
$descriptionLabel->setText("Force " . $listPlayer->nickname . '$z to Spectator!');
|
|
||||||
$script->addTooltip($spectatorQuad, $descriptionLabel);
|
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
$y -= 4;
|
$y -= 4;
|
||||||
@ -580,7 +561,6 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$adminLogin = $callback[1][1];
|
$adminLogin = $callback[1][1];
|
||||||
$targetLogin = $actionArray[2];
|
$targetLogin = $actionArray[2];
|
||||||
|
|
||||||
var_dump($action);
|
|
||||||
switch($action) {
|
switch($action) {
|
||||||
case self::ACTION_OPEN_PLAYER_DETAILED:
|
case self::ACTION_OPEN_PLAYER_DETAILED:
|
||||||
$player = $this->maniaControl->playerManager->getPlayer($adminLogin);
|
$player = $this->maniaControl->playerManager->getPlayer($adminLogin);
|
||||||
|
Loading…
Reference in New Issue
Block a user