Corrected z values of Plugin Menus
This commit is contained in:
parent
98bcd24268
commit
e7eb70e000
@ -21,6 +21,7 @@ use ManiaControl\Callbacks\Callbacks;
|
|||||||
use ManiaControl\Callbacks\TimerListener;
|
use ManiaControl\Callbacks\TimerListener;
|
||||||
use ManiaControl\Commands\CommandListener;
|
use ManiaControl\Commands\CommandListener;
|
||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
|
use ManiaControl\Manialinks\ManialinkManager;
|
||||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use ManiaControl\Players\PlayerManager;
|
use ManiaControl\Players\PlayerManager;
|
||||||
@ -306,6 +307,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
$frame = new Frame();
|
$frame = new Frame();
|
||||||
$maniaLink->addChild($frame);
|
$maniaLink->addChild($frame);
|
||||||
$frame->setPosition($posX, $posY);
|
$frame->setPosition($posX, $posY);
|
||||||
|
$frame->setZ(ManialinkManager::MAIN_MANIALINK_Z_VALUE);
|
||||||
|
|
||||||
$backgroundQuad = new Quad();
|
$backgroundQuad = new Quad();
|
||||||
$frame->addChild($backgroundQuad);
|
$frame->addChild($backgroundQuad);
|
||||||
|
@ -170,6 +170,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
$frame = new Frame();
|
$frame = new Frame();
|
||||||
$maniaLink->addChild($frame);
|
$maniaLink->addChild($frame);
|
||||||
$frame->setPosition($posX, $posY);
|
$frame->setPosition($posX, $posY);
|
||||||
|
$frame->setZ(ManialinkManager::MAIN_MANIALINK_Z_VALUE);
|
||||||
|
|
||||||
$backgroundQuad = new Quad();
|
$backgroundQuad = new Quad();
|
||||||
$frame->addChild($backgroundQuad);
|
$frame->addChild($backgroundQuad);
|
||||||
@ -189,8 +190,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
|
|
||||||
// Values Menu
|
// Values Menu
|
||||||
$popoutFrame = new Frame();
|
$popoutFrame = new Frame();
|
||||||
$maniaLink->addChild($popoutFrame);
|
$frame->addChild($popoutFrame);
|
||||||
$popoutFrame->setPosition($posX - $itemSize * 0.5, $posY);
|
$popoutFrame->setPosition(- $itemSize * 0.5, 0);
|
||||||
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
||||||
$popoutFrame->setVisible(false);
|
$popoutFrame->setVisible(false);
|
||||||
|
|
||||||
@ -198,7 +199,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
|
|
||||||
// Description Label
|
// Description Label
|
||||||
$descriptionFrame = new Frame();
|
$descriptionFrame = new Frame();
|
||||||
$maniaLink->addChild($descriptionFrame);
|
$frame->addChild($descriptionFrame);
|
||||||
$descriptionFrame->setHorizontalAlign($descriptionFrame::RIGHT);
|
$descriptionFrame->setHorizontalAlign($descriptionFrame::RIGHT);
|
||||||
|
|
||||||
$descriptionLabel = new Label();
|
$descriptionLabel = new Label();
|
||||||
@ -209,7 +210,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
$descriptionLabel->setVisible(true);
|
$descriptionLabel->setVisible(true);
|
||||||
|
|
||||||
// Add items
|
// Add items
|
||||||
$origPosX = $posX;
|
|
||||||
$posX = -2;
|
$posX = -2;
|
||||||
foreach (array_reverse($valueArray) as $value) {
|
foreach (array_reverse($valueArray) as $value) {
|
||||||
$label = new Label_Text();
|
$label = new Label_Text();
|
||||||
@ -226,7 +226,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
$posX -= strlen($value) * 1.6 + 2.5;
|
$posX -= strlen($value) * 1.6 + 2.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$descriptionFrame->setPosition($origPosX + $posX - $width + $itemMarginFactorX, $posY);
|
$descriptionFrame->setPosition( $posX - $width + $itemMarginFactorX, 0);
|
||||||
|
|
||||||
//Popout background
|
//Popout background
|
||||||
$quad = new Quad();
|
$quad = new Quad();
|
||||||
|
Loading…
Reference in New Issue
Block a user