add UsageInformation Interface to every class which can be used by Plugin Authors

This commit is contained in:
kremsy
2017-03-26 19:44:55 +02:00
parent be99324441
commit f83640179d
44 changed files with 300 additions and 118 deletions

View File

@ -5,6 +5,8 @@ namespace ManiaControl\Manialinks;
use FML\CustomUI;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\TimerListener;
use ManiaControl\General\UsageInformationAble;
use ManiaControl\General\UsageInformationTrait;
use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
@ -16,7 +18,9 @@ use ManiaControl\Players\PlayerManager;
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class CustomUIManager implements CallbackListener, TimerListener {
class CustomUIManager implements CallbackListener, TimerListener, UsageInformationAble {
use UsageInformationTrait;
/*
* Constants
*/

View File

@ -7,6 +7,8 @@ use FML\Controls\Quad;
use FML\ManiaLink;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\Callbacks;
use ManiaControl\General\UsageInformationAble;
use ManiaControl\General\UsageInformationTrait;
use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
@ -18,7 +20,9 @@ use ManiaControl\Players\PlayerManager;
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class IconManager implements CallbackListener {
class IconManager implements CallbackListener, UsageInformationAble {
use UsageInformationTrait;
/*
* Constants
*/

View File

@ -8,6 +8,8 @@ use FML\Controls\Labels\Label_Text;
use FML\ManiaLink;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\General\UsageInformationAble;
use ManiaControl\General\UsageInformationTrait;
use ManiaControl\Logger;
use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
@ -23,7 +25,9 @@ use Maniaplanet\DedicatedServer\Xmlrpc\UnknownPlayerException;
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener {
class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener, UsageInformationAble {
use UsageInformationTrait;
/*
* Constants
*/

View File

@ -11,6 +11,8 @@ use FML\Controls\Quads\Quad_Bgs1InRace;
use FML\Controls\Quads\Quad_Icons64x64_1;
use FML\Script\Features\Paging;
use FML\Script\Script;
use ManiaControl\General\UsageInformationAble;
use ManiaControl\General\UsageInformationTrait;
use ManiaControl\ManiaControl;
/**
@ -20,7 +22,9 @@ use ManiaControl\ManiaControl;
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class StyleManager {
class StyleManager implements UsageInformationAble {
use UsageInformationTrait;
/*
* Constants
*/
@ -162,8 +166,7 @@ class StyleManager {
$frame->setSize($width, $height)->setZ(45); //TODO place before scoreboards
//TODO remove: (just temporary fix for tm bug)
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() === 'tm'
) {
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() === 'tm') {
$frame->setSize($width, $height)->setZ(32);
}