Exemple #1
0
        public GJournal()
            : base(50, 50, 300, 188)
        {
            int num = Engine.m_Journal.Count - 1;

            if (num < 0)
            {
                num = 0;
            }
            this.m_Children.Add((Gump) new GVResizer((IResizable)this));
            this.m_Children.Add((Gump) new GHResizer((IResizable)this));
            this.m_Children.Add((Gump) new GLResizer((IResizable)this));
            this.m_Children.Add((Gump) new GTResizer((IResizable)this));
            this.m_Children.Add((Gump) new GHVResizer((IResizable)this));
            this.m_Children.Add((Gump) new GLTResizer((IResizable)this));
            this.m_Children.Add((Gump) new GHTResizer((IResizable)this));
            this.m_Children.Add((Gump) new GLVResizer((IResizable)this));
            this.m_Scroller          = new GAlphaVSlider(0, 10, 16, 169, (double)num, 0.0, (double)num, 1.0);
            this.m_Hotspot           = new GHotspot(0, 4, 16, 180, (Gump)this.m_Scroller);
            this.m_Hotspot.NormalHit = false;
            this.m_Children.Add((Gump)this.m_Scroller);
            this.m_Children.Add((Gump)this.m_Hotspot);
            this.Width  = 300;
            this.Height = 188;
        }
Exemple #2
0
        private void AddTooltip(int x, int y, int w, int h, int num)
        {
            GHotspot ghotspot = new GHotspot(x, y, w, h, (Gump)this);

            ghotspot.m_CanDrag   = true;
            ghotspot.m_QuickDrag = false;
            ghotspot.Tooltip     = (ITooltip) new Tooltip(Localization.GetString(num));
            this.m_Children.Add((Gump)ghotspot);
        }
Exemple #3
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);
        }