From 33616ec10d5c413aef47318a8c688646fd3b9186 Mon Sep 17 00:00:00 2001 From: Jocy Date: Sun, 7 May 2017 19:35:53 +0200 Subject: [PATCH] Fixed warn ManiaLink --- core/Manialinks/StyleManager.php | 2 +- core/Players/PlayerActions.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/Manialinks/StyleManager.php b/core/Manialinks/StyleManager.php index 37ddb24e..1eae8707 100644 --- a/core/Manialinks/StyleManager.php +++ b/core/Manialinks/StyleManager.php @@ -244,7 +244,7 @@ class StyleManager implements UsageInformationAble { // Add Close Quad (X) $closeQuad = new Quad_Icons64x64_1(); $frame->addChild($closeQuad); - $closeQuad->setPosition($width * 0.483, $height * 0.467, 3)->setSize(6, 6)->setSubStyle($closeQuad::SUBSTYLE_QuitRace)->setAction(ManialinkManager::ACTION_CLOSEWIDGET); + $closeQuad->setPosition($width / 2 - 3, $height / 2 - 3, 3)->setSize(6, 6)->setSubStyle($closeQuad::SUBSTYLE_QuitRace)->setAction(ManialinkManager::ACTION_CLOSEWIDGET); if ($script) { $pagerSize = 6.; diff --git a/core/Players/PlayerActions.php b/core/Players/PlayerActions.php index 10396af2..4e1137e4 100644 --- a/core/Players/PlayerActions.php +++ b/core/Players/PlayerActions.php @@ -485,17 +485,19 @@ class PlayerActions implements EchoListener, CommunicationListener, UsageInforma $frame = new Frame(); $maniaLink->addChild($frame); $frame->setPosition(0, 10); + $frame->setZ(ManialinkManager::MAIN_MANIALINK_Z_VALUE); // Background $backgroundQuad = new Quad(); $frame->addChild($backgroundQuad); $backgroundQuad->setSize($width, $height); $backgroundQuad->setStyles($quadStyle, $quadSubstyle); + $backgroundQuad->setZ(-1); // Close Quad (X) $closeQuad = new Quad_Icons64x64_1(); $frame->addChild($closeQuad); - $closeQuad->setPosition($width * 0.473, $height * 0.457, 3); + $closeQuad->setPosition($width / 2 - 3, $height / 2 - 3, 3); $closeQuad->setSize(6, 6); $closeQuad->setSubStyle($closeQuad::SUBSTYLE_QuitRace); $closeQuad->setAction(ManialinkManager::ACTION_CLOSEWIDGET);