From d9c0b010b991aff15d011b198512bded6b747d2b Mon Sep 17 00:00:00 2001 From: beu Date: Mon, 28 Mar 2022 21:30:15 +0200 Subject: [PATCH] show widget when enabled after the match start #5 --- MatchManagerSuite/MatchManagerWidget.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MatchManagerSuite/MatchManagerWidget.php b/MatchManagerSuite/MatchManagerWidget.php index a6c31d2..de9077e 100644 --- a/MatchManagerSuite/MatchManagerWidget.php +++ b/MatchManagerSuite/MatchManagerWidget.php @@ -42,7 +42,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene * Constants */ const PLUGIN_ID = 153; - const PLUGIN_VERSION = 1.5; + const PLUGIN_VERSION = 1.6; const PLUGIN_NAME = 'MatchManager Widget'; const PLUGIN_AUTHOR = 'Beu'; @@ -68,6 +68,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene */ /** @var ManiaControl $maniaControl */ private $maniaControl = null; + private $MatchManagerCore = null; private $gmbase = ""; private $manialinkData = ""; private $manialinkBackground = ""; @@ -147,6 +148,12 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene $this->maniaControl->getSettingManager()->initSetting($this, self::SETTING_MATCHMANAGERWIDGET_LIVE_WIDTH, 42, "Width of the widget"); $this->generateMatchLiveWidgetBackground(); + + if ($this->MatchManagerCore->getMatchStatus()) { + $this->gmbase = $this->MatchManagerCore->getCurrentGamemodeBase(); + $this->displayManialinks(false); + } + return true; }