reanmed to new FML names
This commit is contained in:
@ -137,22 +137,22 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
if ($this->maniaControl->getAuthenticationManager()->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) {
|
||||
// Admin Menu Icon Frame
|
||||
$iconFrame = new Frame();
|
||||
$manialink->add($iconFrame);
|
||||
$manialink->addChild($iconFrame);
|
||||
$iconFrame->setPosition($posX, $posY);
|
||||
|
||||
$backgroundQuad = new Quad();
|
||||
$iconFrame->add($backgroundQuad);
|
||||
$iconFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
|
||||
$itemQuad = new Quad_Icons64x64_1();
|
||||
$iconFrame->add($itemQuad);
|
||||
$iconFrame->addChild($itemQuad);
|
||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_IconServers);
|
||||
$itemQuad->setSize($itemSize, $itemSize);
|
||||
|
||||
// Admin Menu Description
|
||||
$descriptionLabel = new Label();
|
||||
$manialink->add($descriptionLabel);
|
||||
$manialink->addChild($descriptionLabel);
|
||||
$descriptionLabel->setPosition($posX - count($this->adminMenuItems) * $itemSize * 1.15 - 6, $posY);
|
||||
$descriptionLabel->setAlign($descriptionLabel::RIGHT, $descriptionLabel::TOP);
|
||||
$descriptionLabel->setSize(40, 4);
|
||||
@ -161,15 +161,15 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
|
||||
// Admin Menu
|
||||
$popoutFrame = new Frame();
|
||||
$manialink->add($popoutFrame);
|
||||
$manialink->addChild($popoutFrame);
|
||||
$popoutFrame->setPosition($posX - $itemSize * 0.5, $posY);
|
||||
$popoutFrame->setHAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setSize(4 * $itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setVisible(false);
|
||||
|
||||
$backgroundQuad = new Quad();
|
||||
$popoutFrame->add($backgroundQuad);
|
||||
$backgroundQuad->setHAlign($backgroundQuad::RIGHT);
|
||||
$popoutFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||
|
||||
@ -181,14 +181,14 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
foreach ($menuItems as $menuItem) {
|
||||
$menuQuad = $menuItem[0];
|
||||
/** @var Quad $menuQuad */
|
||||
$popoutFrame->add($menuQuad);
|
||||
$popoutFrame->addChild($menuQuad);
|
||||
$menuQuad->setSize($itemSize, $itemSize);
|
||||
$menuQuad->setX($itemPosX);
|
||||
$menuQuad->setHAlign($menuQuad::RIGHT);
|
||||
$menuQuad->setHorizontalAlign($menuQuad::RIGHT);
|
||||
$itemPosX -= $itemSize * 1.05;
|
||||
|
||||
if ($menuItem[1]) {
|
||||
$menuQuad->removeScriptFeatures();
|
||||
$menuQuad->removeAllScriptFeatures();
|
||||
$description = '$s' . $menuItem[1];
|
||||
$menuQuad->addTooltipLabelFeature($descriptionLabel, $description);
|
||||
}
|
||||
@ -201,22 +201,22 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
*/
|
||||
// Player Menu Icon Frame
|
||||
$iconFrame = new Frame();
|
||||
$manialink->add($iconFrame);
|
||||
$manialink->addChild($iconFrame);
|
||||
$iconFrame->setPosition($posX, $posY - $itemSize * $itemMarginFactorY);
|
||||
|
||||
$backgroundQuad = new Quad();
|
||||
$iconFrame->add($backgroundQuad);
|
||||
$iconFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
|
||||
$itemQuad = new Quad_Icons64x64_1();
|
||||
$iconFrame->add($itemQuad);
|
||||
$iconFrame->addChild($itemQuad);
|
||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_IconPlayers);
|
||||
$itemQuad->setSize($itemSize, $itemSize);
|
||||
|
||||
// Player Menu Description
|
||||
$descriptionLabel = new Label();
|
||||
$manialink->add($descriptionLabel);
|
||||
$manialink->addChild($descriptionLabel);
|
||||
$descriptionLabel->setPosition($posX - count($this->playerMenuItems) * $itemSize * 1.15 - 6, $posY - $itemSize * $itemMarginFactorY);
|
||||
$descriptionLabel->setAlign($descriptionLabel::RIGHT, $descriptionLabel::TOP);
|
||||
$descriptionLabel->setSize(40, 4);
|
||||
@ -225,15 +225,15 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
|
||||
// Player Menu
|
||||
$popoutFrame = new Frame();
|
||||
$manialink->add($popoutFrame);
|
||||
$manialink->addChild($popoutFrame);
|
||||
$popoutFrame->setPosition($posX - $itemSize * 0.5, $posY - $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setHAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setHorizontalAlign($popoutFrame::RIGHT);
|
||||
$popoutFrame->setSize(4 * $itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||
$popoutFrame->setVisible(false);
|
||||
|
||||
$backgroundQuad = new Quad();
|
||||
$popoutFrame->add($backgroundQuad);
|
||||
$backgroundQuad->setHAlign($backgroundQuad::RIGHT);
|
||||
$popoutFrame->addChild($backgroundQuad);
|
||||
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||
$backgroundQuad->setSize(count($this->playerMenuItems) * $itemSize * 1.15 + 2, $itemSize * $itemMarginFactorY);
|
||||
|
||||
@ -245,14 +245,14 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
foreach ($menuItems as $menuItem) {
|
||||
$menuQuad = $menuItem[0];
|
||||
/** @var Quad $menuQuad */
|
||||
$popoutFrame->add($menuQuad);
|
||||
$popoutFrame->addChild($menuQuad);
|
||||
$menuQuad->setSize($itemSize, $itemSize);
|
||||
$menuQuad->setX($itemPosX);
|
||||
$menuQuad->setHAlign($menuQuad::RIGHT);
|
||||
$menuQuad->setHorizontalAlign($menuQuad::RIGHT);
|
||||
$itemPosX -= $itemSize * 1.05;
|
||||
|
||||
if ($menuItem[1]) {
|
||||
$menuQuad->removeScriptFeatures();
|
||||
$menuQuad->removeAllScriptFeatures();
|
||||
$description = '$s' . $menuItem[1];
|
||||
$menuQuad->addTooltipLabelFeature($descriptionLabel, $description);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
// Main frame
|
||||
$frame = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultListFrame($script, $paging);
|
||||
$maniaLink->add($frame);
|
||||
$maniaLink->addChild($frame);
|
||||
|
||||
// Start offsets
|
||||
$posX = -$width / 2;
|
||||
@ -104,11 +104,11 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
//Predefine description Label
|
||||
$descriptionLabel = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultDescriptionLabel();
|
||||
$frame->add($descriptionLabel);
|
||||
$frame->addChild($descriptionLabel);
|
||||
|
||||
// Headline
|
||||
$headFrame = new Frame();
|
||||
$frame->add($headFrame);
|
||||
$frame->addChild($headFrame);
|
||||
$headFrame->setY($posY - 5);
|
||||
$array = array('Id' => $posX + 5, 'Nickname' => $posX + 18, 'Login' => $posX + 70, 'Actions' => $posX + 120);
|
||||
$this->maniaControl->getManialinkManager()->labelLine($headFrame, $array);
|
||||
@ -120,19 +120,19 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
foreach ($admins as $admin) {
|
||||
if ($index % self::MAX_PLAYERS_PER_PAGE === 1) {
|
||||
$pageFrame = new Frame();
|
||||
$frame->add($pageFrame);
|
||||
$frame->addChild($pageFrame);
|
||||
|
||||
$paging->addPageControl($pageFrame);
|
||||
$posY = $height / 2 - 10;
|
||||
}
|
||||
|
||||
$playerFrame = new Frame();
|
||||
$pageFrame->add($playerFrame);
|
||||
$pageFrame->addChild($playerFrame);
|
||||
$playerFrame->setY($posY);
|
||||
|
||||
if ($index % 2 !== 0) {
|
||||
$lineQuad = new Quad_BgsPlayerCard();
|
||||
$playerFrame->add($lineQuad);
|
||||
$playerFrame->addChild($lineQuad);
|
||||
$lineQuad->setSize($width, 4);
|
||||
$lineQuad->setSubStyle($lineQuad::SUBSTYLE_BgPlayerCardBig);
|
||||
$lineQuad->setZ(0.001);
|
||||
@ -144,14 +144,14 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
// Level Quad
|
||||
$rightQuad = new Quad_BgRaceScore2();
|
||||
$playerFrame->add($rightQuad);
|
||||
$playerFrame->addChild($rightQuad);
|
||||
$rightQuad->setX($posX + 13);
|
||||
$rightQuad->setZ(5);
|
||||
$rightQuad->setSubStyle($rightQuad::SUBSTYLE_CupFinisher);
|
||||
$rightQuad->setSize(7, 3.5);
|
||||
|
||||
$rightLabel = new Label_Text();
|
||||
$playerFrame->add($rightLabel);
|
||||
$playerFrame->addChild($rightLabel);
|
||||
$rightLabel->setX($posX + 13.9);
|
||||
$rightLabel->setTextSize(0.8);
|
||||
$rightLabel->setZ(10);
|
||||
@ -171,7 +171,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
// Quad
|
||||
$quad = new Quad_BgsPlayerCard();
|
||||
$playerFrame->add($quad);
|
||||
$playerFrame->addChild($quad);
|
||||
$quad->setZ(11);
|
||||
$quad->setX($posX + 130);
|
||||
$quad->setSubStyle($quad::SUBSTYLE_BgPlayerCardBig);
|
||||
@ -180,7 +180,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
//Label
|
||||
$label = new Label_Button();
|
||||
$playerFrame->add($label);
|
||||
$playerFrame->addChild($label);
|
||||
$label->setX($posX + 130);
|
||||
$quad->setZ(12);
|
||||
$label->setStyle($style);
|
||||
|
Reference in New Issue
Block a user