Example #1
0
        public void OnSkillChange(Skill skill, bool showReal)
        {
            GSkillGump gump = this.m_SkillGumps[skill.ID];

            if (gump != null)
            {
                gump.OnSkillChange(showReal ? ((double)skill.Real) : ((double)skill.Value), skill.Lock);
            }
        }
Example #2
0
        public GSkillList(GSkills owner) : base(4, 4, 250, 50)
        {
            this.m_Owner   = owner;
            base.m_CanDrag = false;
            Skills skills = Engine.Skills;

            this.m_SkillGumps = new GSkillGump[0x100];
            int y = 4;

            for (int i = 0; i < skills.Groups.Length; i++)
            {
                GLabel     label;
                SkillGroup group = skills.Groups[i];
                label = new GLabel(group.Name, Engine.GetUniFont(1), Hues.Bright, 4, y)
                {
                    X = label.X - label.Image.xMin,
                    Y = label.Y - label.Image.yMin
                };
                label.SetTag("yBase", label.Y);
                base.m_Children.Add(label);
                y += 4 + (label.Image.yMax - label.Image.yMin);
                for (int j = 0; j < group.Skills.Count; j++)
                {
                    Skill      skill = (Skill)group.Skills[j];
                    GSkillGump toAdd = new GSkillGump(skill, y, base.m_Width - 20, this.m_Owner.ShowReal);
                    this.m_SkillGumps[skill.ID] = toAdd;
                    base.m_Children.Add(toAdd);
                    y += 4 + toAdd.Height;
                }
            }
            this.m_SliderBorder = new GSingleBorder(0, 0, 0x10, 100);
            base.m_Children.Add(this.m_SliderBorder);
            this.m_Slider = new GAlphaVSlider(0, 6, 0x10, 100, 0.0, 0.0, (double)(y + 1), 1.0);
            this.m_Slider.SetTag("Max", y + 1);
            this.m_Slider.OnValueChange = (OnValueChange)Delegate.Combine(this.m_Slider.OnValueChange, new OnValueChange(this.Slider_OnValueChange));
            base.m_Children.Add(this.m_Slider);
            this.m_Hotspot = new GHotspot(0, 0, 0x10, 100, this.m_Slider);
            base.m_Children.Add(this.m_Hotspot);
        }
Example #3
0
 public GSkillList(GSkills owner)
     : base(4, 4, 250, 50)
 {
     this.m_Owner = owner;
     base.m_CanDrag = false;
     Skills skills = Engine.Skills;
     this.m_SkillGumps = new GSkillGump[0x100];
     int y = 4;
     for (int i = 0; i < skills.Groups.Length; i++)
     {
         GLabel label;
         SkillGroup group = skills.Groups[i];
         label = new GLabel(group.Name, Engine.GetUniFont(1), Hues.Bright, 4, y) {
             X = label.X - label.Image.xMin,
             Y = label.Y - label.Image.yMin
         };
         label.SetTag("yBase", label.Y);
         base.m_Children.Add(label);
         y += 4 + (label.Image.yMax - label.Image.yMin);
         for (int j = 0; j < group.Skills.Count; j++)
         {
             Skill skill = (Skill) group.Skills[j];
             GSkillGump toAdd = new GSkillGump(skill, y, base.m_Width - 20, this.m_Owner.ShowReal);
             this.m_SkillGumps[skill.ID] = toAdd;
             base.m_Children.Add(toAdd);
             y += 4 + toAdd.Height;
         }
     }
     this.m_SliderBorder = new GSingleBorder(0, 0, 0x10, 100);
     base.m_Children.Add(this.m_SliderBorder);
     this.m_Slider = new GAlphaVSlider(0, 6, 0x10, 100, 0.0, 0.0, (double) (y + 1), 1.0);
     this.m_Slider.SetTag("Max", y + 1);
     this.m_Slider.OnValueChange = (OnValueChange) Delegate.Combine(this.m_Slider.OnValueChange, new OnValueChange(this.Slider_OnValueChange));
     base.m_Children.Add(this.m_Slider);
     this.m_Hotspot = new GHotspot(0, 0, 0x10, 100, this.m_Slider);
     base.m_Children.Add(this.m_Hotspot);
 }