Set the Zindex of backgronds in case of opaque quad

This commit is contained in:
Beu
2022-04-24 10:17:28 +02:00
parent ae25baabf3
commit 8c78f8940c
4 changed files with 14 additions and 3 deletions

View File

@ -592,6 +592,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
}
// we have a vote-message
if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_ALLOW_ON_LOCAL)) {
/** @var \MCTeam\LocalRecordsPlugin */
$localRecordPlugin = $this->maniaControl->getPluginManager()->getPlugin(self::DEFAULT_LOCAL_RECORDS_PLUGIN);
if (!$localRecordPlugin) {
return;
@ -924,6 +925,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
$frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-1.);
$titleLabel = new Label();
$frame->addChild($titleLabel);

View File

@ -293,6 +293,7 @@ class LocalRecordsPlugin implements CallbackListener, CallQueueListener, Command
$frame = new Frame();
$frame->setPosition($posX, $posY);
$frame->setZ(-1.);
$backgroundQuad = new Quad();
$frame->addChild($backgroundQuad);
@ -302,6 +303,7 @@ class LocalRecordsPlugin implements CallbackListener, CallQueueListener, Command
$backgroundQuad->setSize($width * 1.05, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setAction(self::ACTION_SHOW_RECORDSLIST);
$backgroundQuad->setZ(-1.);
$titleLabel = new Label();
$frame->addChild($titleLabel);
@ -838,7 +840,7 @@ class LocalRecordsPlugin implements CallbackListener, CallQueueListener, Command
$labelLine = new LabelLine($headFrame);
$labelLine->addLabelEntryText('Rank', $posX + 5);
$labelLine->addLabelEntryText('Nickname', $posX + 18);
$labelLine->addLabelEntryText('Login', $posX + 70);
$labelLine->addLabelEntryText('Login', $posX + 60);
$labelLine->addLabelEntryText('Time', $posX + 101);
$labelLine->render();
@ -880,7 +882,7 @@ class LocalRecordsPlugin implements CallbackListener, CallQueueListener, Command
$labelLine = new LabelLine($recordFrame);
$labelLine->addLabelEntryText($listRecord->rank, $posX + 5, 13);
$labelLine->addLabelEntryText('$fff' . $listRecord->nickname, $posX + 18, 52);
$labelLine->addLabelEntryText($listRecord->login, $posX + 70, 31);
$labelLine->addLabelEntryText($listRecord->login, $posX + 60, 31);
$labelLine->addLabelEntryText(Formatter::formatTime($listRecord->time), $posX + 101, $width / 2 - ($posX + 110));
$labelLine->render();

View File

@ -261,7 +261,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
$frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
//$backgroundQuad->addMapInfoFeature();
$backgroundQuad->setZ(-1.);
$map = $this->maniaControl->getMapManager()->getCurrentMap();
@ -371,6 +371,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
$frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-1.);
$label = new Label_Text();
$frame->addChild($label);
@ -410,6 +411,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
$frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-1.);
$serverName = $this->maniaControl->getClient()->getServerName();
@ -553,6 +555,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
$frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width, $height);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-1.);
// Check if the Next Map is a queued Map
$queuedMap = $this->maniaControl->getMapManager()->getMapQueue()->getNextMap();