Fixed Adminmenu, Playermenu
Corrected background size of Donation menu and customvotes menu Fixed bug directory browser and removed the default value for tooltip (was always shown)
This commit is contained in:
parent
e0102e20ed
commit
95d55836de
@ -156,7 +156,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
||||
// Admin Menu Description
|
||||
$descriptionLabel = new Label();
|
||||
$manialink->addChild($descriptionLabel);
|
||||
$descriptionLabel->setPosition($posX - count($this->adminMenuItems) * $itemSize * 1.15 - 6, $posY);
|
||||
$descriptionLabel->setPosition($posX - count($this->adminMenuItems) * $itemSize * 1.05 - 5, $posY);
|
||||
$descriptionLabel->setAlign($descriptionLabel::RIGHT, $descriptionLabel::TOP);
|
||||
$descriptionLabel->setSize(40, 4);
|
||||
$descriptionLabel->setTextSize(1.4);
|
||||
@ -167,14 +167,13 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
||||
$manialink->addChild($popoutFrame);
|
||||
$popoutFrame->setPosition($posX - $itemSize * 0.5, $posY);
|
||||
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setSize(4 * $itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setVisible(false);
|
||||
|
||||
$backgroundQuad = new Quad();
|
||||
$popoutFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.05 + 2 , $itemSize * $itemMarginFactorY);
|
||||
|
||||
$itemQuad->addToggleFeature($popoutFrame);
|
||||
|
||||
@ -220,7 +219,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
||||
// Player Menu Description
|
||||
$descriptionLabel = new Label();
|
||||
$manialink->addChild($descriptionLabel);
|
||||
$descriptionLabel->setPosition($posX - count($this->playerMenuItems) * $itemSize * 1.15 - 6, $posY - $itemSize * $itemMarginFactorY);
|
||||
$descriptionLabel->setPosition($posX - count($this->playerMenuItems) * $itemSize * 1.05 - 5, $posY - $itemSize * $itemMarginFactorY);
|
||||
$descriptionLabel->setAlign($descriptionLabel::RIGHT, $descriptionLabel::TOP);
|
||||
$descriptionLabel->setSize(40, 4);
|
||||
$descriptionLabel->setTextSize(1.4);
|
||||
@ -231,14 +230,13 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
||||
$manialink->addChild($popoutFrame);
|
||||
$popoutFrame->setPosition($posX - $itemSize * 0.5, $posY - $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setSize(4 * $itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setVisible(false);
|
||||
|
||||
$backgroundQuad = new Quad();
|
||||
$popoutFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
$backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||
$backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY);
|
||||
|
||||
$itemQuad->addToggleFeature($popoutFrame);
|
||||
|
||||
|
@ -157,7 +157,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
|
||||
|
||||
$tooltipLabel = new Label();
|
||||
$frame->addChild($tooltipLabel);
|
||||
$tooltipLabel->setPosition($width * -0.48, $height * -0.44)->setSize($width * 0.8, 5)->setHorizontalAlign($tooltipLabel::LEFT)->setTextSize(1)->setText('tooltip');
|
||||
$tooltipLabel->setPosition($width * -0.48, $height * -0.44)->setSize($width * 0.8, 5)->setHorizontalAlign($tooltipLabel::LEFT)->setTextSize(1);
|
||||
|
||||
$mapFiles = $this->scanMapFiles($folderPath);
|
||||
|
||||
@ -178,7 +178,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
|
||||
$pageFrame = new Frame();
|
||||
$frame->addChild($pageFrame);
|
||||
$posY = $height / 2 - 10;
|
||||
$paging->addPage($pageFrame);
|
||||
$paging->addPageControl($pageFrame);
|
||||
}
|
||||
|
||||
// Map Frame
|
||||
|
@ -347,7 +347,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
$popoutFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
$backgroundQuad->setSize($menuEntries * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||
$backgroundQuad->setSize($menuEntries * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY);
|
||||
|
||||
$itemQuad->addToggleFeature($popoutFrame);
|
||||
|
||||
|
@ -135,8 +135,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
* Display the widget
|
||||
*/
|
||||
public function displayWidget() {
|
||||
if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_DONATE_WIDGET_ACTIVATED)
|
||||
) {
|
||||
if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_DONATE_WIDGET_ACTIVATED)) {
|
||||
$this->displayDonateWidget();
|
||||
}
|
||||
}
|
||||
@ -159,8 +158,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
$itemMarginFactorY = 1.2;
|
||||
|
||||
//If game is shootmania lower the icons position by 20
|
||||
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() === 'sm'
|
||||
) {
|
||||
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() === 'sm') {
|
||||
$posY -= $shootManiaOffset;
|
||||
}
|
||||
|
||||
@ -194,16 +192,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
$maniaLink->addChild($popoutFrame);
|
||||
$popoutFrame->setPosition($posX - $itemSize * 0.5, $posY);
|
||||
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setSize(4 * $itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setVisible(false);
|
||||
|
||||
$quad = new Quad();
|
||||
$popoutFrame->addChild($quad);
|
||||
$quad->setHorizontalAlign($quad::RIGHT);
|
||||
$quad->setStyles($quadStyle, $quadSubstyle);
|
||||
$quad->setSize(strlen($values) * 2 + count($valueArray) * 1, $itemSize * $itemMarginFactorY);
|
||||
|
||||
$popoutFrame->addChild($quad);
|
||||
$itemQuad->addToggleFeature($popoutFrame);
|
||||
|
||||
// Description Label
|
||||
@ -237,6 +227,13 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
$posX -= strlen($value) * 2 + 1.7;
|
||||
}
|
||||
|
||||
//Popout background
|
||||
$quad = new Quad();
|
||||
$popoutFrame->addChild($quad);
|
||||
$quad->setHorizontalAlign($quad::RIGHT);
|
||||
$quad->setStyles($quadStyle, $quadSubstyle);
|
||||
$quad->setSize((2 - $posX), $itemSize * $itemMarginFactorY);
|
||||
|
||||
// Send manialink
|
||||
$this->maniaControl->getManialinkManager()->sendManialink($maniaLink, $login);
|
||||
}
|
||||
@ -328,8 +325,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
*/
|
||||
public function handlePlayerConnect(Player $player) {
|
||||
// Display Map Widget
|
||||
if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_DONATE_WIDGET_ACTIVATED)
|
||||
) {
|
||||
if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_DONATE_WIDGET_ACTIVATED)) {
|
||||
$this->displayDonateWidget($player->login);
|
||||
}
|
||||
}
|
||||
@ -381,8 +377,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
* @param Player $player
|
||||
*/
|
||||
public function command_Pay(array $chatCallback, Player $player) {
|
||||
if (!$this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_SUPERADMIN)
|
||||
) {
|
||||
if (!$this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_SUPERADMIN)) {
|
||||
$this->maniaControl->getAuthenticationManager()->sendNotAllowed($player);
|
||||
return;
|
||||
}
|
||||
@ -439,8 +434,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
* @param Player $player
|
||||
*/
|
||||
public function command_GetPlanets(array $chatCallback, Player $player) {
|
||||
if (!$this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_ADMIN)
|
||||
) {
|
||||
if (!$this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_ADMIN)) {
|
||||
$this->maniaControl->getAuthenticationManager()->sendNotAllowed($player);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user