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

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

            this.m_SkillGumps = new GSkillGump[256];
            int num = 4;

            for (int index1 = 0; index1 < skills.Groups.Length; ++index1)
            {
                SkillGroup skillGroup = skills.Groups[index1];
                GLabel     glabel     = new GLabel(skillGroup.Name, (IFont)Engine.GetUniFont(1), Hues.Bright, 4, num);
                glabel.X -= glabel.Image.xMin;
                glabel.Y -= glabel.Image.yMin;
                glabel.SetTag("yBase", (object)glabel.Y);
                this.m_Children.Add((Gump)glabel);
                num += 4 + (glabel.Image.yMax - glabel.Image.yMin);
                for (int index2 = 0; index2 < skillGroup.Skills.Count; ++index2)
                {
                    Skill      skill      = (Skill)skillGroup.Skills[index2];
                    GSkillGump gskillGump = new GSkillGump(skill, num, this.m_Width - 20, this.m_Owner.ShowReal);
                    this.m_SkillGumps[skill.ID] = gskillGump;
                    this.m_Children.Add((Gump)gskillGump);
                    num += 4 + gskillGump.Height;
                }
            }
            this.m_SliderBorder = new GSingleBorder(0, 0, 16, 100);
            this.m_Children.Add((Gump)this.m_SliderBorder);
            this.m_Slider = new GAlphaVSlider(0, 6, 16, 100, 0.0, 0.0, (double)(num + 1), 1.0);
            this.m_Slider.SetTag("Max", (object)(num + 1));
            this.m_Slider.OnValueChange += new OnValueChange(this.Slider_OnValueChange);
            this.m_Children.Add((Gump)this.m_Slider);
            this.m_Hotspot = new GHotspot(0, 0, 16, 100, (Gump)this.m_Slider);
            this.m_Children.Add((Gump)this.m_Hotspot);
        }