* ServerUIPropertiesMenu for Configurator to edit builtin UIProperties of MP

* fixed unregister-functions of CallbackManager

* Reducing menuItemHeight in Configurator to avoid overlapping of the menu items

* Fully rebuild the admins menu after a player rights changed
This commit is contained in:
axelalex2 2019-01-07 17:16:29 +01:00 committed by Lukas Kremsmayr
parent ba1f6d54bd
commit e241f729ce
3 changed files with 7 additions and 1 deletions

View File

@ -149,6 +149,8 @@ class ActionsMenu implements SidebarMenuEntryListener, CallbackListener, Maniali
* @internal * @internal
*/ */
public function rebuildAndShowAdminMenu() { public function rebuildAndShowAdminMenu() {
$this->maniaControl->getManialinkManager()->hideManialink(self::MLID_ADMIN_MENU);
$admins = $this->maniaControl->getAuthenticationManager()->getConnectedAdmins(AuthenticationManager::AUTH_LEVEL_MODERATOR); $admins = $this->maniaControl->getAuthenticationManager()->getConnectedAdmins(AuthenticationManager::AUTH_LEVEL_MODERATOR);
if (!empty($admins)) { if (!empty($admins)) {
$manialink = $this->buildAdminMenuManiaLink(); $manialink = $this->buildAdminMenuManiaLink();
@ -161,6 +163,8 @@ class ActionsMenu implements SidebarMenuEntryListener, CallbackListener, Maniali
* @internal * @internal
*/ */
public function rebuildAndShowPlayerMenu() { public function rebuildAndShowPlayerMenu() {
$this->maniaControl->getManialinkManager()->hideManialink(self::MLID_PLAYER_MENU);
$players = $this->maniaControl->getPlayerManager()->getPlayers(); $players = $this->maniaControl->getPlayerManager()->getPlayers();
if (!empty($players)) { if (!empty($players)) {
$manialink = $this->buildPlayerMenuManiaLink(); $manialink = $this->buildPlayerMenuManiaLink();

View File

@ -391,6 +391,8 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
$player->authLevel = $authLevel; $player->authLevel = $authLevel;
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_AUTH_LEVEL_CHANGED, $player); $this->maniaControl->getCallbackManager()->triggerCallback(self::CB_AUTH_LEVEL_CHANGED, $player);
$this->maniaControl->getActionsMenu()->rebuildAndShowAdminMenu();
return true; return true;
} }

View File

@ -197,7 +197,7 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
$quadSubstyle = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MENU_SUBSTYLE); $quadSubstyle = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MENU_SUBSTYLE);
$menuListWidth = $menuWidth * 0.3; $menuListWidth = $menuWidth * 0.3;
$menuItemHeight = 10.; $menuItemHeight = 9.;
$subMenuWidth = $menuWidth - $menuListWidth; $subMenuWidth = $menuWidth - $menuListWidth;
$subMenuHeight = $menuHeight; $subMenuHeight = $menuHeight;