Esempio n. 1
1
        public PartyHealthTrackerGump(PartyMember member)
            : base(member.Serial, 0)
        {
            while (UserInterface.GetControl<MobileHealthTrackerGump>() != null)
            {
                UserInterface.GetControl<MobileHealthTrackerGump>(member.Serial).Dispose();
            }
            IsMoveable = false;
            IsUncloseableWithRMB = true;
            m_Serial = member.Serial;
            //AddControl(m_Background = new ResizePic(this, 0, 0, 3000, 131, 48));//I need opacity %1 background

            AddControl(m_Name = new TextLabel(this, 1, 0, 1, member.Name));
            //m_Background.MouseDoubleClickEvent += Background_MouseDoubleClickEvent; //maybe private message calling?
            m_BarBGs = new GumpPic[3];
            int sameX = 15;
            int sameY = 3;
            if (WorldModel.Entities.GetPlayerEntity().Serial != member.Serial)//you can't send a message to self
            {
                AddControl(btnPrivateMsg = new Button(this, 0, 20, 11401, 11402, ButtonTypes.Activate, member.Serial, 0));//private party message / use bandage ??
            }
            AddControl(m_BarBGs[0] = new GumpPic(this, sameX, 15 + sameY, 9750, 0));
            AddControl(m_BarBGs[1] = new GumpPic(this, sameX, 24 + sameY, 9750, 0));
            AddControl(m_BarBGs[2] = new GumpPic(this, sameX, 33 + sameY, 9750, 0));
            m_Bars = new GumpPicWithWidth[3];
            AddControl(m_Bars[0] = new GumpPicWithWidth(this, sameX, 15 + sameY, 40, 0, 1f));//I couldn't find correct visual
            AddControl(m_Bars[1] = new GumpPicWithWidth(this, sameX, 24 + sameY, 9751, 0, 1f));//I couldn't find correct visual
            AddControl(m_Bars[2] = new GumpPicWithWidth(this, sameX, 33 + sameY, 41, 0, 1f));//I couldn't find correct visual

            // bars should not handle mouse input, pass it to the background gump.
            for (int i = 0; i < m_BarBGs.Length; i++)//???
            {
                m_Bars[i].HandlesMouseInput = false;
            }
        }
Esempio n. 2
0
        internal void BeginPrivateMessage(int serial)
        {
            PartyMember member = GetMember((Serial)serial);

            if (member != null)
            {
                ChatControl chat = Service.Get <ChatControl>();
                chat.SetModeToPartyPrivate(member.Name, member.Serial);
            }
        }
Esempio n. 3
0
        public void SendPartyPrivateMessage(Serial serial, string text)
        {
            WorldModel  world     = Service.Get <WorldModel>();
            PartyMember recipient = GetMember(serial);

            if (recipient != null)
            {
                INetworkClient network = Service.Get <INetworkClient>();
                network.Send(new PartyPrivateMessagePacket(serial, text));
                world.Interaction.ChatMessage($"To {recipient.Name}: {text}", 3, Settings.UserInterface.PartyPrivateMsgColor, false);
            }
            else
            {
                world.Interaction.ChatMessage("They are no longer in your party.", 3, Settings.UserInterface.PartyPrivateMsgColor, false);
            }
        }