Ejemplo n.º 1
0
        private void InitFullView()
        {
            Lang   lang = Service.Lang;
            string text;

            if (!SquadUtils.CanCurrentPlayerJoinSquad(Service.CurrentPlayer, Service.SquadController.StateManager.GetCurrentSquad(), this.squad, lang, out text))
            {
                this.primaryButton.VisuallyDisableButton();
            }
            else if (this.squad.InviteType == 0 && Service.SquadController.StateManager.SquadJoinRequestsPending.Contains(this.squad.SquadID))
            {
                this.primaryButton.Enabled = false;
            }
            this.primaryButton.OnClicked = new UXButtonClickedDelegate(this.OnJoinClicked);
            this.joinModule = new SquadJoinActionModule(this.squad, this.screen, this.primaryButton);
            this.secondaryButton.OnClicked = new UXButtonClickedDelegate(this.screen.ViewSquadInfoClicked);
            this.secondaryButton.Tag       = this.squad.SquadID;
            this.secondaryButton.Visible   = true;
            this.secondaryButtonLabel.Text = lang.Get("context_Info", new object[0]);
            if (this.squad.InviteType == 1)
            {
                this.primaryButtonLabel.Text = lang.Get("JOIN", new object[0]);
                this.typeLabel.Text          = lang.Get("SQUAD_OPEN_TO_ALL", new object[0]);
            }
            else
            {
                this.primaryButtonLabel.Text = lang.Get("APPLY", new object[0]);
                this.typeLabel.Text          = lang.Get("SQUAD_INVITE_ONLY", new object[0]);
            }
            this.playerFactionSprite.Visible = false;
            this.memberNumberLabel.Text      = lang.Get("SQUAD_MEMBERS", new object[0]) + " " + lang.Get("FRACTION", new object[]
            {
                this.squad.MemberCount,
                this.squad.MemberMax
            });
            this.activeMemberNumberLabel.Text = lang.Get("SQUAD_ACTIVE_MEMBERS", new object[0]) + " " + lang.Get("FRACTION", new object[]
            {
                this.squad.ActiveMemberCount,
                this.squad.MemberMax
            });
            this.squadLevelGroup.Visible = true;
            this.squadLevelLabel.Text    = this.squad.Level.ToString();
            this.friendTexture.Visible   = false;
            this.planetLabel.Visible     = false;
            this.planetBgTexture.Visible = false;
            Squad currentSquad = Service.SquadController.StateManager.GetCurrentSquad();

            base.ToggleHighlight(currentSquad != null && currentSquad.SquadID == this.squad.SquadID);
        }
Ejemplo n.º 2
0
 public void OnScreenLoaded()
 {
     this.squadInfoOverlay               = this.screen.GetElement <UXElement>("ContainerSquadInfo");
     this.squadInfoOverlay.Visible       = false;
     this.squadDetailsAlertLabel         = this.screen.GetElement <UXLabel>("LabelSquadUserDetails");
     this.squadDetailsAlertLabel.Visible = true;
     this.squadMemberGrid = this.screen.GetElement <UXGrid>("SquadInfoGrid");
     this.squadMemberGrid.SetTemplateItem("SquadInfoItem");
     this.requestBtn           = this.screen.GetElement <UXButton>("BtnJoinSquad");
     this.requestBtnLabel      = this.screen.GetElement <UXLabel>("LabelBtnJoinSquad");
     this.joinModule           = new SquadJoinActionModule(null, this.screen, this.requestBtn);
     this.requestBtn.OnClicked = new UXButtonClickedDelegate(this.OnJoinClicked);
     this.squadNameLabel       = this.screen.GetElement <UXLabel>("LabelSquadNameTop");
     this.squadRankLabel       = this.screen.GetElement <UXLabel>("LabelSquadRankTop");
     this.squadScoreLabel      = this.screen.GetElement <UXLabel>("LabelSquadScoreTop");
     this.squadDescLabel       = this.screen.GetElement <UXLabel>("LabelSquadInfoDescription");
     this.squadToJoinLabel     = this.screen.GetElement <UXLabel>("LabelSquadInfoJoin");
     this.squadSymbolSprite    = this.screen.GetElement <UXSprite>("SpriteSquadIcon");
 }
Ejemplo n.º 3
0
 public override void Destroy()
 {
     this.joinModule = null;
 }