Exemple #1
0
        public GPropertyHuePicker(GPropertyEntry entry) : base(0, 0, 200, 150)
        {
            int num = (int)entry.Entry.Property.GetValue(entry.Object, null);

            this.m_Entry     = entry;
            base.m_CanDrag   = false;
            base.FillColor   = GumpColors.Control;
            base.BorderColor = GumpColors.ControlDarkDark;
            base.FillAlpha   = 1f;
            GHuePicker toAdd = this.m_HuePicker = new GHuePicker(7, 7);

            toAdd.m_CanDrag   = false;
            toAdd.OnHueSelect = new OnHueSelect(this.HueSelected);
            base.m_Children.Add(toAdd);
            GBrightnessBar bar = this.m_Bar = new GBrightnessBar((toAdd.X + toAdd.Width) + 1, toAdd.Y, 15, toAdd.Height, toAdd);

            bar.m_CanDrag = false;
            base.m_Children.Add(bar);
            if ((num >= 2) && (num <= 0x3e9))
            {
                num             -= 2;
                toAdd.ShadeX     = (num / 5) % 20;
                toAdd.ShadeY     = (num / 5) / 20;
                toAdd.Brightness = num % 5;
                bar.Refresh();
            }
            GSingleBorder border = new GSingleBorder(bar.X - 1, bar.Y, 1, bar.Height);

            base.m_Children.Add(border);
            this.Width  = ((7 + toAdd.Width) + bar.Width) + 7;
            this.Height = (7 + toAdd.Height) + 7;
        }
 public GPropertyHuePicker(GPropertyEntry entry)
     : base(0, 0, 200, 150)
 {
     int num = (int) entry.Entry.Property.GetValue(entry.Object, null);
     this.m_Entry = entry;
     base.m_CanDrag = false;
     base.FillColor = GumpColors.Control;
     base.BorderColor = GumpColors.ControlDarkDark;
     base.FillAlpha = 1f;
     GHuePicker toAdd = this.m_HuePicker = new GHuePicker(7, 7);
     toAdd.m_CanDrag = false;
     toAdd.OnHueSelect = new OnHueSelect(this.HueSelected);
     base.m_Children.Add(toAdd);
     GBrightnessBar bar = this.m_Bar = new GBrightnessBar((toAdd.X + toAdd.Width) + 1, toAdd.Y, 15, toAdd.Height, toAdd);
     bar.m_CanDrag = false;
     base.m_Children.Add(bar);
     if ((num >= 2) && (num <= 0x3e9))
     {
         num -= 2;
         toAdd.ShadeX = (num / 5) % 20;
         toAdd.ShadeY = (num / 5) / 20;
         toAdd.Brightness = num % 5;
         bar.Refresh();
     }
     GSingleBorder border = new GSingleBorder(bar.X - 1, bar.Y, 1, bar.Height);
     base.m_Children.Add(border);
     this.Width = ((7 + toAdd.Width) + bar.Width) + 7;
     this.Height = (7 + toAdd.Height) + 7;
 }
Exemple #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);
        }
Exemple #4
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);
 }