From c0e3df972df524d3d89101adadaeaf16894bdb13 Mon Sep 17 00:00:00 2001 From: Jocy Date: Wed, 29 Mar 2017 21:08:58 +0200 Subject: [PATCH] Updated Donationsplugin with default tooltip --- plugins/MCTeam/DonationPlugin.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/MCTeam/DonationPlugin.php b/plugins/MCTeam/DonationPlugin.php index 6d487398..20313226 100644 --- a/plugins/MCTeam/DonationPlugin.php +++ b/plugins/MCTeam/DonationPlugin.php @@ -199,19 +199,18 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { // Description Label $descriptionFrame = new Frame(); $maniaLink->addChild($descriptionFrame); - $descriptionFrame->setPosition($posX - 50, $posY - 5); $descriptionFrame->setHorizontalAlign($descriptionFrame::RIGHT); $descriptionLabel = new Label(); $descriptionFrame->addChild($descriptionLabel); - $descriptionLabel->setAlign($descriptionLabel::LEFT, $descriptionLabel::TOP); + $descriptionLabel->setAlign($descriptionLabel::RIGHT, $descriptionLabel::TOP); $descriptionLabel->setSize(40, 4); - $descriptionLabel->setTextSize(2); + $descriptionLabel->setTextSize(1); $descriptionLabel->setVisible(true); - $descriptionLabel->setTextColor('0f0'); // Add items - $posX = -2; + $origPosX = $posX; + $posX = -2; foreach (array_reverse($valueArray) as $value) { $label = new Label_Text(); $popoutFrame->addChild($label); @@ -227,6 +226,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { $posX -= strlen($value) * 2 + 1.7; } + $descriptionFrame->setPosition($origPosX + $posX - $width + $itemMarginFactorX, $posY); + //Popout background $quad = new Quad(); $popoutFrame->addChild($quad);