From dccc237c4f87e873d18353fceb9c716fc4e737ed Mon Sep 17 00:00:00 2001 From: kremsy Date: Tue, 24 Dec 2013 13:09:39 +0100 Subject: [PATCH] added the close action to the maplist --- application/core/Maps/MapList.php | 20 ++++++++------------ application/core/Players/PlayerActions.php | 5 +++++ application/core/Players/PlayerList.php | 5 +++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index cfb1bda8..2affc5fa 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -1,15 +1,8 @@ maniaControl = $maniaControl; - $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_CLOSEWIDGET , $this, + $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(ManialinkManager::CB_MAIN_WINDOW_CLOSED, $this, 'closeWidget'); $this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERMANIALINKPAGEANSWER, $this, 'handleManialinkPageAnswer'); @@ -206,7 +203,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $closeQuad->setPosition($this->width * 0.483, $this->height * 0.467, 3); $closeQuad->setSize(6, 6); $closeQuad->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_QuitRace); - $closeQuad->setAction(self::ACTION_CLOSEWIDGET ); + $closeQuad->setAction(ManialinkManager::ACTION_CLOSEWIDGET); return $frame; } @@ -344,7 +341,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { */ public function closeWidget(array $callback, Player $player) { //TODO update player things - $this->maniaControl->manialinkManager->closeWidget($player); } /** diff --git a/application/core/Players/PlayerActions.php b/application/core/Players/PlayerActions.php index f2ce0e42..43e78df0 100644 --- a/application/core/Players/PlayerActions.php +++ b/application/core/Players/PlayerActions.php @@ -15,6 +15,11 @@ use ManiaControl\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; +/** + * PlayerActions Class + * + * @author steeffeen & kremsy + */ class PlayerActions { /** * Constants diff --git a/application/core/Players/PlayerList.php b/application/core/Players/PlayerList.php index d08310a0..03120ba2 100644 --- a/application/core/Players/PlayerList.php +++ b/application/core/Players/PlayerList.php @@ -22,6 +22,11 @@ use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkPageAnswerListener; +/** + * PlayerList Widget Class + * + * @author steeffeen & kremsy + */ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { /**