Пример #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;
            }
        }
Пример #2
0
 protected override void OnInitialize()
 {
     Position = new Point(0, 0);
     Size = new Point(800, 600);
     AddControl(new ResizePic(this, 0, 0, 3000, 800, 600));
     int rowwidth = 60;
     // caption string
     m_Label = (TextLabel)AddControl(new TextLabel(this, 50, 8, 0, null));
     // object that is hued based on the current overhue.
     m_HueDisplay = (HuedControl)AddControl(new HuedControl(this, 8305));
     LastControl.Position = new Point(745, 15);
     ((HuedControl)LastControl).Hue = 0;
     // unhued object
     AddControl(new HuedControl(this));
     LastControl.Position = new Point(-5, 10);
     ((HuedControl)LastControl).Hue = 0;
     // hue index 1 (uo hue -1), aka one of the "True Black" hues
     AddControl(new HuedControl(this));
     LastControl.Position = new Point(3, 10);
     ((HuedControl)LastControl).Hue = 1;
     for (int i = 0; i < 3000; i++) {
         AddControl(new HuedControl(this));
         LastControl.Position = new Point((i % rowwidth) * 11 - 5, (i / rowwidth) * 10 + 28);
         ((HuedControl)LastControl).Hue = i + 2;
     }
     using (FileStream file = new FileStream("hues0.png", FileMode.Create)) {
         HueData.HueTexture0.SaveAsPng(file, HueData.HueTexture0.Width, HueData.HueTexture0.Height);
     }
     using (FileStream file = new FileStream("hues1.png", FileMode.Create)) {
         HueData.HueTexture1.SaveAsPng(file, HueData.HueTexture1.Width, HueData.HueTexture1.Height);
     }
 }
Пример #3
0
        public override void Intitialize()
        {
            base.Intitialize();

            m_Gump = (Gump)m_UserInterface.AddControl(new Gump(0, 0), 0, 0);
            m_Gump.Size = new Point(800, 600);
            m_Gump.AddControl(new ResizePic(m_Gump, 5, 5, 3000, 790, 590));

            int rowwidth = 60;

            // caption string
            m_Label = (TextLabel)m_Gump.AddControl(new TextLabel(m_Gump, 50, 8, 0, null));

            // object that is hued based on the current overhue.
            m_HueDisplay = (HuedControl)m_Gump.AddControl(new HuedControl(m_Gump, 8305));
            m_Gump.LastControl.Position = new Point(745, 15);
            ((HuedControl)m_Gump.LastControl).Hue = 0;

            // unhued object
            m_Gump.AddControl(new HuedControl(m_Gump));
            m_Gump.LastControl.Position = new Point(-5, 10);
            ((HuedControl)m_Gump.LastControl).Hue = 0;

            // hue index 1 (uo hue -1), aka one of the "True Black" hues
            m_Gump.AddControl(new HuedControl(m_Gump));
            m_Gump.LastControl.Position = new Point(3, 10);
            ((HuedControl)m_Gump.LastControl).Hue = 1;

            for (int i = 0; i < 3000; i++)
            {
                m_Gump.AddControl(new HuedControl(m_Gump));
                m_Gump.LastControl.Position = new Point((i % rowwidth) * 11 - 5, (i / rowwidth) * 10 + 28);
                ((HuedControl)m_Gump.LastControl).Hue = i + 2;
            }

            using (FileStream file = new FileStream("hues0.png", FileMode.Create))
            {
                HueData.HueTexture0.SaveAsPng(file, HueData.HueTexture0.Width, HueData.HueTexture0.Height);
            }

            using (FileStream file = new FileStream("hues1.png", FileMode.Create))
            {
                HueData.HueTexture1.SaveAsPng(file, HueData.HueTexture1.Width, HueData.HueTexture1.Height);
            }
        }