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

@ -197,6 +197,7 @@ class ActionsMenu implements SidebarMenuEntryListener, CallbackListener, Maniali
$iconFrame->addChild($backgroundQuad); $iconFrame->addChild($backgroundQuad);
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY); $backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle); $backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-1.);
$itemQuad = new Quad_Icons64x64_1(); $itemQuad = new Quad_Icons64x64_1();
$iconFrame->addChild($itemQuad); $iconFrame->addChild($itemQuad);
@ -224,6 +225,7 @@ class ActionsMenu implements SidebarMenuEntryListener, CallbackListener, Maniali
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT); $backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle); $backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY); $backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY);
$backgroundQuad->setZ(-1.);
$itemQuad->addToggleFeature($popoutFrame); $itemQuad->addToggleFeature($popoutFrame);
@ -273,6 +275,7 @@ class ActionsMenu implements SidebarMenuEntryListener, CallbackListener, Maniali
$iconFrame->addChild($backgroundQuad); $iconFrame->addChild($backgroundQuad);
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY); $backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle); $backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-1.);
$itemQuad = new Quad_Icons64x64_1(); $itemQuad = new Quad_Icons64x64_1();
$iconFrame->addChild($itemQuad); $iconFrame->addChild($itemQuad);
@ -300,6 +303,7 @@ class ActionsMenu implements SidebarMenuEntryListener, CallbackListener, Maniali
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT); $backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle); $backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY); $backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY);
$backgroundQuad->setZ(-1.);
$itemQuad->addToggleFeature($popoutFrame); $itemQuad->addToggleFeature($popoutFrame);

View File

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

View File

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

View File

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