Compare commits
2 Commits
803b58eb08
...
5d2c6c4627
Author | SHA1 | Date | |
---|---|---|---|
5d2c6c4627
|
|||
36280769bb
|
@ -17,6 +17,7 @@ use ManiaControl\Settings\Setting;
|
|||||||
use ManiaControl\Settings\SettingManager;
|
use ManiaControl\Settings\SettingManager;
|
||||||
use ManiaControl\Callbacks\TimerListener;
|
use ManiaControl\Callbacks\TimerListener;
|
||||||
use ManiaControl\Callbacks\Callbacks;
|
use ManiaControl\Callbacks\Callbacks;
|
||||||
|
use ManiaControl\Logger;
|
||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use ManiaControl\Players\PlayerManager;
|
use ManiaControl\Players\PlayerManager;
|
||||||
|
|
||||||
@ -31,10 +32,12 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 174;
|
const PLUGIN_ID = 174;
|
||||||
const PLUGIN_VERSION = 2.1;
|
const PLUGIN_VERSION = 2.2;
|
||||||
const PLUGIN_NAME = 'MatchManager Admin UI';
|
const PLUGIN_NAME = 'MatchManager Admin UI';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
const LOG_PREFIX = '[MatchManagerAdminUI] ';
|
||||||
|
|
||||||
const MLID_ADMINUI_SIDEMENU = 'Matchmanager.AdminUI';
|
const MLID_ADMINUI_SIDEMENU = 'Matchmanager.AdminUI';
|
||||||
|
|
||||||
const SETTING_POSX = 'Position X of the plugin';
|
const SETTING_POSX = 'Position X of the plugin';
|
||||||
@ -123,6 +126,23 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
public function unload() {
|
public function unload() {
|
||||||
$this->maniaControl->getManialinkManager()->hideManialink(self::MLID_ADMINUI_SIDEMENU);
|
$this->maniaControl->getManialinkManager()->hideManialink(self::MLID_ADMINUI_SIDEMENU);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Custom log function to add prefix
|
||||||
|
*
|
||||||
|
* @param mixed $message
|
||||||
|
*/
|
||||||
|
private function log(mixed $message) {
|
||||||
|
Logger::log(self::LOG_PREFIX . $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom logError function to add prefix
|
||||||
|
*
|
||||||
|
* @param mixed $message
|
||||||
|
*/
|
||||||
|
private function logError(mixed $message) {
|
||||||
|
Logger::logError(self::LOG_PREFIX . $message);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* afterPluginInit
|
* afterPluginInit
|
||||||
@ -257,12 +277,14 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
|
|
||||||
public function addMenuItem(MatchManagerAdminUI_MenuItem $menuItem) {
|
public function addMenuItem(MatchManagerAdminUI_MenuItem $menuItem) {
|
||||||
$this->removeMenuItem($menuItem->getActionId());
|
$this->removeMenuItem($menuItem->getActionId());
|
||||||
|
$this->log("New Menu Item: ". $menuItem->getActionId());
|
||||||
$this->menuItems[] = $menuItem;
|
$this->menuItems[] = $menuItem;
|
||||||
|
|
||||||
$this->updateManialink = true;
|
$this->updateManialink = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeMenuItem(string $actionId) {
|
public function removeMenuItem(string $actionId) {
|
||||||
|
$this->log("Removing Menu Item: ". $actionId);
|
||||||
$this->menuItems = array_filter($this->menuItems, function($menuItem) use ($actionId) {
|
$this->menuItems = array_filter($this->menuItems, function($menuItem) use ($actionId) {
|
||||||
return $menuItem->getActionId() !== $actionId;
|
return $menuItem->getActionId() !== $actionId;
|
||||||
});
|
});
|
||||||
@ -272,7 +294,7 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MatchManagerAdminUI_MenuItem {
|
class MatchManagerAdminUI_MenuItem {
|
||||||
private string $actionId ;
|
private string $actionId;
|
||||||
private int $order = 100;
|
private int $order = 100;
|
||||||
private string $description = '';
|
private string $description = '';
|
||||||
private string $text = '';
|
private string $text = '';
|
||||||
|
@ -28,7 +28,7 @@ class MatchManagerAutomaticLauncher implements CallbackListener, TimerListener,
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 172;
|
const PLUGIN_ID = 172;
|
||||||
const PLUGIN_VERSION = 1.1;
|
const PLUGIN_VERSION = 1.2;
|
||||||
const PLUGIN_NAME = 'MatchManager Automatic Launcher';
|
const PLUGIN_NAME = 'MatchManager Automatic Launcher';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
|
|||||||
* MARK: Constants
|
* MARK: Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 152;
|
const PLUGIN_ID = 152;
|
||||||
const PLUGIN_VERSION = 5.8;
|
const PLUGIN_VERSION = 5.9;
|
||||||
const PLUGIN_NAME = 'MatchManager Core';
|
const PLUGIN_NAME = 'MatchManager Core';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class MatchManagerECircuitMania implements CallbackListener, ManialinkPageAnswer
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 213;
|
const PLUGIN_ID = 213;
|
||||||
const PLUGIN_VERSION = 1.0;
|
const PLUGIN_VERSION = 1.1;
|
||||||
const PLUGIN_NAME = 'MatchManager eCircuitMania';
|
const PLUGIN_NAME = 'MatchManager eCircuitMania';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class MatchManagerGSheet implements CallbackListener, TimerListener, CommandLis
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 156;
|
const PLUGIN_ID = 156;
|
||||||
const PLUGIN_VERSION = 2.3;
|
const PLUGIN_VERSION = 2.4;
|
||||||
const PLUGIN_NAME = 'MatchManager GSheet';
|
const PLUGIN_NAME = 'MatchManager GSheet';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class MatchManagerMultipleConfigManager implements ManialinkPageAnswerListener,
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 171;
|
const PLUGIN_ID = 171;
|
||||||
const PLUGIN_VERSION = 1.6;
|
const PLUGIN_VERSION = 1.7;
|
||||||
const PLUGIN_NAME = 'MatchManager Multiple Config Manager';
|
const PLUGIN_NAME = 'MatchManager Multiple Config Manager';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class MatchManagerPlayersPause implements ManialinkPageAnswerListener, CommandLi
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 159;
|
const PLUGIN_ID = 159;
|
||||||
const PLUGIN_VERSION = 1.5;
|
const PLUGIN_VERSION = 1.6;
|
||||||
const PLUGIN_NAME = 'MatchManager Players Pause';
|
const PLUGIN_NAME = 'MatchManager Players Pause';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class MatchManagerReadyButton implements ManialinkPageAnswerListener, CommandLis
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 158;
|
const PLUGIN_ID = 158;
|
||||||
const PLUGIN_VERSION = 1.5;
|
const PLUGIN_VERSION = 1.6;
|
||||||
const PLUGIN_NAME = 'MatchManager Ready Button';
|
const PLUGIN_NAME = 'MatchManager Ready Button';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class MatchManagerTMWTDuoIntegration implements CallbackListener, ManialinkPageA
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 211;
|
const PLUGIN_ID = 211;
|
||||||
const PLUGIN_VERSION = 1.1;
|
const PLUGIN_VERSION = 1.2;
|
||||||
const PLUGIN_NAME = 'MatchManager TMWT Duo Integration';
|
const PLUGIN_NAME = 'MatchManager TMWT Duo Integration';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 153;
|
const PLUGIN_ID = 153;
|
||||||
const PLUGIN_VERSION = 1.8;
|
const PLUGIN_VERSION = 1.9;
|
||||||
const PLUGIN_NAME = 'MatchManager Widget';
|
const PLUGIN_NAME = 'MatchManager Widget';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user