jukebox desc

This commit is contained in:
kremsy 2013-12-28 23:57:02 +01:00
parent b3ce20819e
commit bf942409fb

View File

@ -257,20 +257,29 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$mapFrame->setY($y); $mapFrame->setY($y);
//Jukebox Description Label
$descriptionLabel = new Label();
$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);
//Juke-Map-Label //Juke-Map-Label
if(isset($jukedMaps[$map->uid])){ if(isset($jukedMaps[$map->uid])){
echo "yes";
var_dump($jukedMaps[$map->uid]);
$jukeLabel = new Label_Text(); $jukeLabel = new Label_Text();
$mapFrame->add($jukeLabel); $mapFrame->add($jukeLabel);
$jukeLabel->setX($this->width/2 - 25); $jukeLabel->setX($this->width/2 - 15);
$jukeLabel->setAlign(Control::CENTER,Control::CENTER); $jukeLabel->setAlign(Control::CENTER,Control::CENTER);
$jukeLabel->setZ(0.2); $jukeLabel->setZ(0.2);
$jukeLabel->setTextSize(1.5); $jukeLabel->setTextSize(1.5);
$jukeLabel->setText($jukedMaps[$map->uid]); $jukeLabel->setText($jukedMaps[$map->uid]);
$jukeLabel->setTextColor("FFF"); $jukeLabel->setTextColor("FFF");
}
$descriptionLabel->setText("{$map->name} \$zis on Jukebox Position: {$jukedMaps[$map->uid]}");
$tooltips->add($jukeLabel, $descriptionLabel);
}else{
//Juke-Map-Button //Juke-Map-Button
$jukeQuad = new Quad_Icons128x128_1(); $jukeQuad = new Quad_Icons128x128_1();
$mapFrame->add($jukeQuad); $mapFrame->add($jukeQuad);
@ -280,16 +289,9 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$jukeQuad->setSubStyle($jukeQuad::SUBSTYLE_Load); $jukeQuad->setSubStyle($jukeQuad::SUBSTYLE_Load);
$jukeQuad->setAction(self::ACTION_JUKE_MAP . "." . $map->uid); $jukeQuad->setAction(self::ACTION_JUKE_MAP . "." . $map->uid);
//Description Label
$descriptionLabel = new Label();
$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("Add Map to Jukebox: {$map->name}"); $descriptionLabel->setText("Add Map to Jukebox: {$map->name}");
$tooltips->add($jukeQuad, $descriptionLabel); $tooltips->add($jukeQuad, $descriptionLabel);
}
if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_ADMIN)){ //TODO SET as setting who can add maps if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_ADMIN)){ //TODO SET as setting who can add maps
//erase map quad //erase map quad