- worked on ingame configurator (not possible like that!)
- fml fix
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace ManiaControl\Plugins;
|
||||
|
||||
require_once __DIR__ . '/Plugin.php';
|
||||
require_once __DIR__ . '/PluginMenu.php';
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
@ -21,6 +22,7 @@ class PluginManager {
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
private $pluginMenu = null;
|
||||
private $activePlugins = array();
|
||||
private $pluginClasses = array();
|
||||
|
||||
@ -32,6 +34,9 @@ class PluginManager {
|
||||
public function __construct(ManiaControl $maniaControl) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
$this->initTables();
|
||||
|
||||
$this->pluginMenu = new PluginMenu($maniaControl);
|
||||
$this->maniaControl->configurator->addMenu($this->pluginMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
|
57
application/core/Plugins/PluginMenu.php
Normal file
57
application/core/Plugins/PluginMenu.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace ManiaControl\Plugins;
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Players\Player;
|
||||
use ManiaControl\Configurators\ConfiguratorMenu;
|
||||
use FML\Script\Pages;
|
||||
use FML\Script\Tooltips;
|
||||
use FML\Controls\Frame;
|
||||
|
||||
/**
|
||||
* Configurator for enabling and disabling plugins
|
||||
*
|
||||
* @author steeffeen
|
||||
*/
|
||||
class PluginMenu implements ConfiguratorMenu {
|
||||
/**
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
||||
/**
|
||||
* Create a new plugin menu instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \ManiaControl\Configurators\ConfiguratorMenu::getTitle()
|
||||
*/
|
||||
public function getTitle() {
|
||||
return "Plugins";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \ManiaControl\Configurators\ConfiguratorMenu::getMenu()
|
||||
*/
|
||||
public function getMenu($width, $height, Pages $pages, Tooltips $tooltips) {
|
||||
$frame = new Frame();
|
||||
return $frame;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \ManiaControl\Configurators\ConfiguratorMenu::saveConfigData()
|
||||
*/
|
||||
public function saveConfigData(array $configData, Player $player) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user