fix winner status & add Z index
This commit is contained in:
parent
265f137de3
commit
8124b25b8e
@ -42,7 +42,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 153;
|
const PLUGIN_ID = 153;
|
||||||
const PLUGIN_VERSION = 1.2;
|
const PLUGIN_VERSION = 1.3;
|
||||||
const PLUGIN_NAME = 'MatchManager Widget';
|
const PLUGIN_NAME = 'MatchManager Widget';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
@ -441,6 +441,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
$listFrame = new Frame();
|
$listFrame = new Frame();
|
||||||
$this->manialinkData->addChild($listFrame);
|
$this->manialinkData->addChild($listFrame);
|
||||||
$listFrame->setPosition($posX, $posY);
|
$listFrame->setPosition($posX, $posY);
|
||||||
|
$listFrame->setZ(1);
|
||||||
|
|
||||||
$rank = 1;
|
$rank = 1;
|
||||||
|
|
||||||
@ -452,7 +453,11 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
$points = $score[2];
|
$points = $score[2];
|
||||||
if (isset($pointlimit)) {
|
if (isset($pointlimit)) {
|
||||||
if ($score[2] > $pointlimit) {
|
if ($score[2] > $pointlimit) {
|
||||||
|
if ($score[3] == 0 || $score[2] - $score[3] == $pointlimit) {
|
||||||
$points = '$0f0Winner';
|
$points = '$0f0Winner';
|
||||||
|
} else {
|
||||||
|
$points = '$f00Finalist';
|
||||||
|
}
|
||||||
} elseif ($score[2] == $pointlimit) {
|
} elseif ($score[2] == $pointlimit) {
|
||||||
$points = '$f00Finalist';
|
$points = '$f00Finalist';
|
||||||
}
|
}
|
||||||
@ -463,6 +468,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
$recordFrame = new Frame();
|
$recordFrame = new Frame();
|
||||||
$listFrame->addChild($recordFrame);
|
$listFrame->addChild($recordFrame);
|
||||||
$recordFrame->setPosition(0, $y + 2);
|
$recordFrame->setPosition(0, $y + 2);
|
||||||
|
$recordFrame->setZ(1);
|
||||||
|
|
||||||
//Rank
|
//Rank
|
||||||
$rankLabel = new Label();
|
$rankLabel = new Label();
|
||||||
@ -474,6 +480,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
$rankLabel->setTextPrefix('$o');
|
$rankLabel->setTextPrefix('$o');
|
||||||
$rankLabel->setText($rank);
|
$rankLabel->setText($rank);
|
||||||
$rankLabel->setTextEmboss(true);
|
$rankLabel->setTextEmboss(true);
|
||||||
|
$rankLabel->setZ(1);
|
||||||
|
|
||||||
//Name
|
//Name
|
||||||
$nameLabel = new Label();
|
$nameLabel = new Label();
|
||||||
@ -483,6 +490,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
$nameLabel->setSize($width * 0.6, 4);
|
$nameLabel->setSize($width * 0.6, 4);
|
||||||
$nameLabel->setTextSize(1);
|
$nameLabel->setTextSize(1);
|
||||||
$nameLabel->setTextEmboss(true);
|
$nameLabel->setTextEmboss(true);
|
||||||
|
$nameLabel->setZ(1);
|
||||||
|
|
||||||
//Points
|
//Points
|
||||||
$pointsLabel = new Label();
|
$pointsLabel = new Label();
|
||||||
@ -493,12 +501,14 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
$pointsLabel->setTextSize(1);
|
$pointsLabel->setTextSize(1);
|
||||||
$pointsLabel->setText('$z' . $points);
|
$pointsLabel->setText('$z' . $points);
|
||||||
$pointsLabel->setTextEmboss(true);
|
$pointsLabel->setTextEmboss(true);
|
||||||
|
$pointsLabel->setZ(1);
|
||||||
|
|
||||||
//Background with Spec action
|
//Background with Spec action
|
||||||
$quad = new Quad();
|
$quad = new Quad();
|
||||||
$recordFrame->addChild($quad);
|
$recordFrame->addChild($quad);
|
||||||
$quad->setStyles(Quad_Bgs1InRace::STYLE, Quad_Bgs1InRace::SUBSTYLE_BgCardList);
|
$quad->setStyles(Quad_Bgs1InRace::STYLE, Quad_Bgs1InRace::SUBSTYLE_BgCardList);
|
||||||
$quad->setSize($width-2, 4);
|
$quad->setSize($width-2, 4);
|
||||||
|
$quad->setZ(1);
|
||||||
|
|
||||||
if ($this->gmbase == "Teams") {
|
if ($this->gmbase == "Teams") {
|
||||||
$team = $this->maniaControl->getClient()->getTeamInfo($score[1] + 1);
|
$team = $this->maniaControl->getClient()->getTeamInfo($score[1] + 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user