began adminlists, severall design fixes
This commit is contained in:
committed by
Steffen Schröder
parent
337e6e18f9
commit
7a15aef94d
@ -55,7 +55,7 @@ class PlayerDetailed {
|
||||
$script = $maniaLink->getScript();
|
||||
|
||||
// Main frame
|
||||
$frame = $this->maniaControl->manialinkManager->styleManager->defaultListFrame($script);
|
||||
$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script);
|
||||
$maniaLink->add($frame);
|
||||
|
||||
// Create script and features
|
||||
|
@ -4,7 +4,6 @@ namespace ManiaControl\Players;
|
||||
|
||||
use FML\Controls\Control;
|
||||
use FML\Controls\Frame;
|
||||
use FML\Controls\Label;
|
||||
use FML\Controls\Labels\Label_Button;
|
||||
use FML\Controls\Labels\Label_Text;
|
||||
use FML\Controls\Quad;
|
||||
@ -82,6 +81,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
|
||||
/**
|
||||
* Add Player to Shown List
|
||||
*
|
||||
* @param Player $player
|
||||
* @param int $showStatus
|
||||
*/
|
||||
@ -110,7 +110,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
$script = $maniaLink->getScript();
|
||||
|
||||
// Main frame
|
||||
$frame = $this->maniaControl->manialinkManager->styleManager->defaultListFrame($script, $pagesId);
|
||||
$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $pagesId);
|
||||
$maniaLink->add($frame);
|
||||
|
||||
// Start offsets
|
||||
@ -118,13 +118,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
$y = $height / 2;
|
||||
|
||||
// Predefine Description Label
|
||||
$descriptionLabel = new Label();
|
||||
$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel();
|
||||
$frame->add($descriptionLabel);
|
||||
$descriptionLabel->setAlign(Control::LEFT, Control::TOP);
|
||||
$descriptionLabel->setPosition($x + 10, -$height / 2 + 5);
|
||||
$descriptionLabel->setSize($width * 0.7, 4);
|
||||
$descriptionLabel->setTextSize(2);
|
||||
$descriptionLabel->setVisible(false);
|
||||
|
||||
// Headline
|
||||
$headFrame = new Frame();
|
||||
@ -225,6 +220,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
$rightLabel->setX($x + 13.9);
|
||||
$rightLabel->setTextSize(0.8);
|
||||
$rightLabel->setZ(10);
|
||||
$rightLabel->setText($this->maniaControl->authenticationManager->getAuthLevelAbbreviation($listPlayer->authLevel));
|
||||
$rightLabel->setTextColor("fff");
|
||||
|
||||
$script->addTooltip($rightLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $this->maniaControl->authenticationManager->getAuthLevelName($listPlayer->authLevel) . " " . $listPlayer->nickname));
|
||||
|
||||
@ -260,22 +257,6 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
// Description Label
|
||||
$script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "View Player profile of " . $listPlayer->nickname));
|
||||
|
||||
switch($listPlayer->authLevel) {
|
||||
case authenticationManager::AUTH_LEVEL_MASTERADMIN:
|
||||
$rightLabel->setText("MA");
|
||||
break;
|
||||
case authenticationManager::AUTH_LEVEL_SUPERADMIN:
|
||||
$rightLabel->setText("SA");
|
||||
break;
|
||||
case authenticationManager::AUTH_LEVEL_ADMIN:
|
||||
$rightLabel->setText("AD");
|
||||
break;
|
||||
case authenticationManager::AUTH_LEVEL_MODERATOR:
|
||||
$rightLabel->setText("MOD");
|
||||
}
|
||||
|
||||
$rightLabel->setTextColor("fff");
|
||||
|
||||
if ($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) {
|
||||
// Further Player actions Quad
|
||||
$playerQuad = new Quad_Icons64x64_1();
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace ManiaControl\Players;
|
||||
|
||||
use ManiaControl\Admin\AdminLists;
|
||||
use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\CallbackManager;
|
||||
use ManiaControl\Formatter;
|
||||
@ -33,6 +34,7 @@ class PlayerManager implements CallbackListener {
|
||||
public $playerCommands = null;
|
||||
public $playerDetailed = null;
|
||||
public $playerList = null;
|
||||
public $adminLists = null;
|
||||
public $players = array();
|
||||
|
||||
/**
|
||||
@ -53,6 +55,7 @@ class PlayerManager implements CallbackListener {
|
||||
$this->playerActions = new PlayerActions($maniaControl);
|
||||
$this->playerDetailed = new PlayerDetailed($maniaControl);
|
||||
$this->playerList = new PlayerList($this->maniaControl);
|
||||
$this->adminLists = new AdminLists($this->maniaControl);
|
||||
|
||||
// Init settings
|
||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_JOIN_LEAVE_MESSAGES, true);
|
||||
|
Reference in New Issue
Block a user