begin playerlist

This commit is contained in:
kremsy
2013-12-18 15:48:33 +01:00
parent 4428fd183c
commit 5d8ae12755
6 changed files with 170 additions and 4 deletions

View File

@ -30,6 +30,9 @@ use MXInfoSearcher;
class MapList implements ManialinkPageAnswerListener, CallbackListener {
/**
* Constants
*/
const ACTION_CLOSEWIDGET = 'MapList.CloseWidget';
const ACTION_ADD_MAP = 'MapList.AddMap';
const ACTION_ERASE_MAP = 'MapList.EraseMap';
@ -134,7 +137,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$headFrame = new Frame();
$frame->add($headFrame);
$headFrame->setY($y - 3);
$array = array("Id" => $x + 5, "Name" => $x + 17, "Author" => $x + 70, "Mood" => $x + 90, "Type" => $x + 105);
$array = array("Id" => $x + 5, "Name" => $x + 17, "Author" => $x + 65, "Mood" => $x + 100, "Type" => $x + 115);
$this->maniaControl->manialinkManager->labelLine($headFrame,$array);
$i = 0;
@ -142,7 +145,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
foreach($maps as $map){
$mapFrame = new Frame();
$frame->add($mapFrame);
$array = array($map->id => $x + 5, $map->name => $x + 17, $map->author => $x + 70, $map->mood => $x + 90, $map->maptype => $x + 105);
$array = array($map->id => $x + 5, $map->name => $x + 17, $map->author => $x + 65, $map->mood => $x + 100, $map->maptype => $x + 115);
$this->maniaControl->manialinkManager->labelLine($mapFrame,$array);
$mapFrame->setY($y);

View File

@ -44,7 +44,7 @@ class MapManager implements CallbackListener {
// Create map commands instance
$this->mapCommands = new MapCommands($maniaControl);
// Register for callbacks
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_ONINIT, $this, 'handleOnInit');
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_BEGINMAP, $this, 'handleBeginMap');