design improvements

This commit is contained in:
kremsy 2014-01-27 21:27:31 +01:00 committed by Steffen Schröder
parent 6ae3bb3f20
commit 5701fc3313
2 changed files with 72 additions and 61 deletions

View File

@ -492,7 +492,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$queuedMaps = $this->maniaControl->mapManager->mapQueue->getQueuedMapsRanking(); $queuedMaps = $this->maniaControl->mapManager->mapQueue->getQueuedMapsRanking();
/** /**
*
* @var KarmaPlugin $karmaPlugin * @var KarmaPlugin $karmaPlugin
*/ */
$karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN); $karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN);
@ -501,7 +500,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$y = $height / 2 - 10; $y = $height / 2 - 10;
$pageFrames = array(); $pageFrames = array();
/** /**
*
* @var Map $map * @var Map $map
*/ */
foreach($mapList as $map) { foreach($mapList as $map) {
@ -574,7 +572,9 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
// Display Maps // Display Maps
$array = array($id => $x + 5, $mxId => $x + 10, Formatter::stripDirtyCodes($map->name) => $x + 20, $map->authorNick => $x + 68); $array = array($id => $x + 5, $mxId => $x + 10, Formatter::stripDirtyCodes($map->name) => $x + 20, $map->authorNick => $x + 68);
$this->maniaControl->manialinkManager->labelLine($mapFrame, $array); $labels = $this->maniaControl->manialinkManager->labelLine($mapFrame, $array);
$script->addTooltip($labels[3], $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => '$<' . $map->name . '$> made by $<' . $map->authorLogin . '$>'));
// TODO action detailed map info including mx info // TODO action detailed map info including mx info
// Map-Queue-Map-Label // Map-Queue-Map-Label

View File

@ -140,6 +140,17 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
$pagerNext->setPosition($width * 0.45, $height * -0.44, 2); $pagerNext->setPosition($width * 0.45, $height * -0.44, 2);
$pagerNext->setSize($pagerSize, $pagerSize); $pagerNext->setSize($pagerSize, $pagerSize);
$pagerNext->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowNext); $pagerNext->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowNext);
$script->addPager($pagerPrev, -1, $pagesId);
$script->addPager($pagerNext, 1, $pagesId);
$pageCountLabel = new Label_Text();
$frame->add($pageCountLabel);
$pageCountLabel->setHAlign(Control::RIGHT);
$pageCountLabel->setPosition($width * 0.40, $height * -0.44, 1);
$pageCountLabel->setStyle($pageCountLabel::STYLE_TextTitle1);
$pageCountLabel->setTextSize(1.3);
$script->addPageLabel($pageCountLabel, $pagesId);
} }
// Start offsets // Start offsets
@ -168,7 +179,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
$this->maniaControl->manialinkManager->labelLine($headFrame, $array); $this->maniaControl->manialinkManager->labelLine($headFrame, $array);
$i = 1; $i = 1;
$y -= 10; $y = $height / 2 - 10;
$pageFrames = array(); $pageFrames = array();
foreach($players as $listPlayer) { foreach($players as $listPlayer) {
/** @var Player $listPlayer * */ /** @var Player $listPlayer * */
@ -179,7 +190,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
$pageFrame->setVisible(false); $pageFrame->setVisible(false);
} }
array_push($pageFrames, $pageFrame); array_push($pageFrames, $pageFrame);
$y = $height / 2 - 16; $y = $height / 2 - 10;
$script->addPage($pageFrame, count($pageFrames), $pagesId); $script->addPage($pageFrame, count($pageFrames), $pagesId);
} }