custom ui rendering improved

This commit is contained in:
Steffen Schröder 2013-12-31 11:37:03 +01:00
parent 283f6d8fcd
commit 233c8824a5

View File

@ -2,7 +2,6 @@
namespace ManiaControl\Manialinks; namespace ManiaControl\Manialinks;
use FML\CustomUI; use FML\CustomUI;
use ManiaControl\ManiaControl; use ManiaControl\ManiaControl;
use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackListener;
@ -10,7 +9,6 @@ use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\Players\Player; use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager; use ManiaControl\Players\PlayerManager;
/** /**
* Class managing the Custom UI Settings * Class managing the Custom UI Settings
* *
@ -58,11 +56,7 @@ class CustomUIManager implements CallbackListener {
* @param Player $player * @param Player $player
*/ */
private function updateManialink(Player $player = null) { private function updateManialink(Player $player = null) {
// TODO: improve rendering after FML update $manialinkText = $this->customUI->render()->saveXML();
$domDocument = new \DOMDocument();
$element = $this->customUI->render($domDocument);
$domDocument->appendChild($element);
$manialinkText = $domDocument->saveXML();
if ($player) { if ($player) {
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login); $this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login);
return; return;