Example #1
0
        public GItemList(int serial, int menuID, string question, AnswerEntry[] answers) : base(0x910, 0x19, 0x19)
        {
            this.m_xLast      = -1234;
            this.m_yLast      = -1234;
            this.m_Serial     = serial;
            this.m_MenuID     = menuID;
            this.m_EntryLabel = new GLabel("", Engine.GetFont(1), Hues.Load(0x75f), 0x27, 0x6a);
            base.m_Children.Add(this.m_EntryLabel);
            GLabel toAdd = new GLabel(question, Engine.GetFont(1), Hues.Load(0x75f), 0x27, 0x13);

            toAdd.Scissor(0, 0, 0xda, 11);
            base.m_Children.Add(toAdd);
            int x = 0x25;

            for (int i = 0; i < answers.Length; i++)
            {
                GItemListEntry entry = new GItemListEntry(x, answers[i], this);
                base.m_Children.Add(entry);
                x += entry.Width;
            }
            x -= 0x25;
            if (x >= 0xde)
            {
                this.m_xOffsetCap = -(x - 0xde);
                this.m_Left       = new GItemListScroller(0x17, this, 150);
                this.m_Right      = new GItemListScroller(0x105, this, -150);
                base.m_Children.Add(this.m_Left);
                base.m_Children.Add(this.m_Right);
            }
        }
Example #2
0
        public GBuyGump_OfferMenu(GBuyGump owner) : base(0x871, 170, 0xd6)
        {
            string str;

            this.m_Owner = owner;
            Mobile player = World.Player;

            if (((player != null) && ((str = player.Name) != null)) && ((str = str.Trim()).Length > 0))
            {
                this.m_Signature         = new GLabel(str, Engine.GetFont(5), Hues.Load(0x455), 0x48, 0xc2);
                this.m_Signature.Visible = false;
                base.m_Children.Add(this.m_Signature);
            }
            base.m_Children.Add(new GLabel((player != null) ? player.Gold.ToString() : "0", Engine.GetFont(6), Hues.Default, 0xbc, 0xa7));
            this.m_Total  = new GLabel("0", Engine.GetFont(6), Hues.Default, 0x44, 0xa7);
            this.m_Accept = new GBuyAccept(owner);
            this.m_Clear  = new GBuyClear(owner);
            base.m_Children.Add(this.m_Total);
            base.m_Children.Add(this.m_Accept);
            base.m_Children.Add(this.m_Clear);
            base.m_CanDrag   = true;
            base.m_QuickDrag = true;
            GVSlider toAdd = new GVSlider(0x828, 0xed, 0x51, 0x22, 0x3a, 0.0, 0.0, 50.0, 1.0);

            this.m_Slider = toAdd;
            base.m_Children.Add(toAdd);
            base.m_Children.Add(new GHotspot(0xed, 0x42, 0x22, 0x54, toAdd));
        }
Example #3
0
 public GMessageBoxYesNo(string prompt, bool modal, MBYesNoCallback callback) : base(0x816, 0, 0)
 {
     this.m_Callback = callback;
     this.Center();
     base.m_CanClose = false;
     base.m_Children.Add(new GLabel(prompt, Engine.GetFont(1), Hues.Load(0x39f), 0x21, 0x1b));
     base.m_Children.Add(new GMBYNButton(this, 0x817, 0x25, false));
     base.m_Children.Add(new GMBYNButton(this, 0x81a, 100, true));
     Gumps.Modal = this;
 }
Example #4
0
        public void ClearTargetQueue()
        {
            Mobile player = World.Player;

            if (player != null)
            {
                player.AddTextMessage("", "Cleared target queue.", Engine.GetFont(3), Hues.Load(0x59), true);
            }
            Engine.m_TargetQueue = null;
        }
Example #5
0
        private Gump CreateLabel(string text, bool scroll)
        {
            text = text.Replace('\r', '\n');
            GBackground   background = new GBackground(0xbbc, 200, 100, true);
            GWrappedLabel toAdd      = new GWrappedLabel(text, Engine.GetFont(1), Hues.Load(0x455), background.OffsetX, background.OffsetY, background.UseWidth);

            background.Height = toAdd.Height + (background.Height - background.UseHeight);
            background.Children.Add(toAdd);
            toAdd.Center();
            background.SetMouseOverride(this);
            return(background);
        }
Example #6
0
 public GHealthBar(Mobile m, int X, int Y) : base(m.Player ? (m.Flags[MobileFlag.Warmode] ? 0x807 : 0x803) : 0x804, X, Y)
 {
     this.m_xName     = "";
     this.m_Mobile    = m;
     base.m_CanDrop   = true;
     base.m_QuickDrag = false;
     this.m_Player    = m.Player;
     if (!this.m_Player)
     {
         base.Hue = Hues.GetNotoriety(m.Notoriety);
     }
     if (Engine.Features.AOS)
     {
         base.Tooltip = new MobileTooltip(m);
     }
     if (this.m_Player)
     {
         this.m_HP   = new GImageClip(this.GetHealthGumpID(m.Flags), 0x22, 12, m.HPCur, m.HPMax);
         this.m_Mana = new GImageClip(0x806, 0x22, 0x19, m.ManaCur, m.ManaMax);
         this.m_Stam = new GImageClip(0x806, 0x22, 0x26, m.StamCur, m.StamMax);
         base.m_Children.Add(new GImage(0x805, 0x22, 12));
         base.m_Children.Add(new GImage(0x805, 0x22, 0x19));
         base.m_Children.Add(new GImage(0x805, 0x22, 0x26));
         base.m_Children.Add(this.m_HP);
         base.m_Children.Add(this.m_Mana);
         base.m_Children.Add(this.m_Stam);
         this.m_xHPCur   = m.HPCur;
         this.m_xHPMax   = m.HPMax;
         this.m_xStamCur = m.StamCur;
         this.m_xStamMax = m.StamMax;
         this.m_xManaCur = m.ManaCur;
         this.m_xManaMax = m.ManaMax;
         this.m_xFlags   = m.Flags.Clone();
     }
     else
     {
         this.m_Name   = new GLabel(m.Name, Engine.GetFont(1), Hues.Load(0x455), 0x10, 0);
         this.m_Name.Y = 11 + ((0x18 - this.m_Name.Height) / 2);
         this.m_Name.Scissor(0, 0, 0x7a, this.m_Name.Height);
         this.m_HP = new GImageClip(this.GetHealthGumpID(m.Flags), 0x22, 0x26, m.HPCur, m.HPMax);
         base.m_Children.Add(new GImage(0x805, 0x22, 0x26));
         base.m_Children.Add(this.m_Name);
         base.m_Children.Add(this.m_HP);
         this.m_xName  = m.Name;
         this.m_xHPCur = m.HPCur;
         this.m_xHPMax = m.HPMax;
         this.m_xFlags = m.Flags.Clone();
     }
 }
Example #7
0
 public GQuestionMenuEntry(int x, int y, int xWidth, AnswerEntry a) : base(x, y)
 {
     this.m_yBase  = y;
     this.m_Answer = a;
     this.m_Radio  = new GRadioButton(210, 0xd3, false, 0, 0);
     this.m_Label  = new GWrappedLabel(a.Text, Engine.GetFont(1), Hues.Load(0x455), this.m_Radio.Width + 4, 5, (xWidth - this.m_Radio.Width) - 4);
     this.m_Width  = xWidth;
     this.m_Height = this.m_Radio.Height;
     if ((this.m_Label.Y + this.m_Label.Height) > this.m_Height)
     {
         this.m_Height = this.m_Label.Y + this.m_Label.Height;
     }
     base.m_Children.Add(this.m_Radio);
     base.m_Children.Add(this.m_Label);
 }
Example #8
0
        public GCombatGump() : base(0x2b02, 50, 50)
        {
            AbilityInfo[] abilities = AbilityInfo.Abilities;
            AbilityInfo   active    = AbilityInfo.Active;
            AbilityInfo   primary   = AbilityInfo.Primary;
            AbilityInfo   secondary = AbilityInfo.Secondary;
            IFont         uniFont   = Engine.GetUniFont(1);
            OnClick       onClick   = new OnClick(this.Name_OnClick);
            GLabel        toAdd     = new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 100, 4);

            base.m_Children.Add(toAdd);
            toAdd = new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 0x106, 4);
            base.m_Children.Add(toAdd);
            for (int i = 0; i < abilities.Length; i++)
            {
                AbilityInfo a      = abilities[i];
                IHue        hueFor = GetHueFor(a);
                toAdd       = new GTextButton(Localization.GetString(a.Name), uniFont, hueFor, hueFor, 0x38 + ((i / 9) * 0xa2), 0x26 + ((i % 9) * 15), onClick);
                a.NameLabel = (GTextButton)toAdd;
                toAdd.SetTag("Ability", a);
                toAdd.Tooltip       = new Tooltip(Localization.GetString(a.Tooltip), true, 240);
                toAdd.Tooltip.Delay = 0.25f;
                base.m_Children.Add(toAdd);
            }
            this.m_PrimaryIcon               = new GAbilityIcon(true, true, primary.Icon, 0xda, 0x69);
            this.m_PrimaryIcon.Tooltip       = new Tooltip(Localization.GetString(primary.Name), true);
            this.m_PrimaryIcon.Tooltip.Delay = 0.25f;
            this.m_PrimaryIcon.Hue           = (primary == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
            base.m_Children.Add(this.m_PrimaryIcon);
            toAdd = new GLabel("Primary", Engine.GetFont(6), Hues.Default, 0x10c, 0x69);
            base.m_Children.Add(toAdd);
            toAdd = new GLabel("Ability Icon", Engine.GetFont(6), Hues.Default, 0x10c, 0x77);
            base.m_Children.Add(toAdd);
            this.m_SecondaryIcon               = new GAbilityIcon(true, false, secondary.Icon, 0xda, 150);
            this.m_SecondaryIcon.Tooltip       = new Tooltip(Localization.GetString(secondary.Name), true);
            this.m_SecondaryIcon.Tooltip.Delay = 0.25f;
            this.m_SecondaryIcon.Hue           = (secondary == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
            base.m_Children.Add(this.m_SecondaryIcon);
            toAdd = new GLabel("Secondary", Engine.GetFont(6), Hues.Default, 0x10c, 150);
            base.m_Children.Add(toAdd);
            toAdd = new GLabel("Ability Icon", Engine.GetFont(6), Hues.Default, 0x10c, 0xa4);
            base.m_Children.Add(toAdd);
        }
Example #9
0
        public GUpdateScroll(string text) : base(0x13c2, 100, 100, 40, 30, true)
        {
            GLabel        toAdd      = new GLabel("Updates", Engine.DefaultFont, Hues.Load(0x1f0), base.OffsetX, base.OffsetY);
            GBackground   background = new GBackground(0xbbc, 100, 100, base.OffsetX, (toAdd.Y + toAdd.Height) + 4, true);
            GWrappedLabel label2     = new GWrappedLabel(text, Engine.GetFont(1), Hues.Load(0x455), background.OffsetX + 2, background.OffsetY + 2, 250);

            background.Width  = ((background.Width - background.UseWidth) + label2.Width) + 6;
            background.Height = ((background.Height - background.UseHeight) + label2.Height) + 2;
            background.Children.Add(label2);
            this.Width       = (this.Width - base.UseWidth) + background.Width;
            this.Height      = (((this.Height - base.UseHeight) + toAdd.Height) + 4) + background.Height;
            toAdd.X         += (base.UseWidth - toAdd.Width) / 2;
            base.m_CanDrag   = true;
            base.m_QuickDrag = true;
            base.CanClose    = true;
            background.SetMouseOverride(this);
            base.m_Children.Add(toAdd);
            base.m_Children.Add(background);
        }
Example #10
0
        public GDragAmount(Client.Item item) : base(0x85c, 0, 0)
        {
            GTextBox box;

            this.m_First = true;
            this.m_Item  = item;
            int amount = (ushort)this.m_Item.Amount;

            this.m_Amount        = amount;
            this.m_Okay          = new GButtonNew(0x81a, 0x81c, 0x81b, 0x66, 0x25);
            this.m_Okay.CanEnter = true;
            this.m_Okay.Clicked += new EventHandler(this.Okay_Clicked);
            base.m_Children.Add(this.m_Okay);
            GSlider toAdd = new GSlider(0x845, 0x23, 0x10, 0x5f, 15, (double)amount, 0.0, (double)amount, 1.0)
            {
                OnValueChange = new OnValueChange(this.Slider_OnValueChange)
            };

            base.m_Children.Add(toAdd);
            this.m_Slider = toAdd;
            GHotspot hotspot = new GHotspot(0x1c, 0x10, 0x6d, 15, toAdd);

            base.m_Children.Add(hotspot);
            box = new GTextBox(0, false, 0x1a, 0x2b, 0x42, 15, amount.ToString(), Engine.GetFont(1), Hues.Load(0x455), Hues.Load(0x455), Hues.Load(0x455))
            {
                OnTextChange       = (OnTextChange)Delegate.Combine(box.OnTextChange, new OnTextChange(this.TextBox_OnTextChange)),
                OnBeforeTextChange = (OnBeforeTextChange)Delegate.Combine(box.OnBeforeTextChange, new OnBeforeTextChange(this.TextBox_OnBeforeTextChange)),
                EnterButton        = this.m_Okay
            };
            base.m_Children.Add(box);
            this.m_TextBox = box;
            box.Focus();
            base.m_IsDragging = true;
            base.m_OffsetX    = this.Width / 2;
            base.m_OffsetY    = this.Height / 2;
            Gumps.LastOver    = this;
            Gumps.Drag        = this;
            Gumps.Focus       = this;
            base.m_X          = Engine.m_xMouse - base.m_OffsetX;
            base.m_Y          = Engine.m_yMouse - base.m_OffsetY;
        }
Example #11
0
        public GIdleWarning() : base(0xa2c, 100, 100, 0, 0, true)
        {
            base.m_CanDrag   = true;
            base.m_QuickDrag = true;
            GWrappedLabel toAdd = new GWrappedLabel("You have been idle for too long. If you do not do anything in the next minute, you will be logged out.", Engine.GetFont(2), Hues.Load(0x455), base.OffsetX, base.OffsetY - 12, 0x113);

            base.m_Children.Add(toAdd);
            GButtonNew new2 = new GButtonNew(0x481, 0, (toAdd.Y + toAdd.Height) + 4);

            new2.Clicked += new EventHandler(this.Check_Clicked);
            base.m_Children.Add(new2);
            this.Width  = (this.Width - base.UseWidth) + toAdd.Width;
            this.Height = ((this.Height - base.UseHeight) + toAdd.Height) - 12;
            new2.X      = base.OffsetX + ((base.UseWidth - new2.Width) / 2);
            this.Center();
        }
Example #12
0
        public static Gump OpenSpellbook(int circle, int lastSpell, Item container)
        {
            SpellList necromancerList;

            container.OpenSB    = true;
            container.Circle    = circle;
            container.LastSpell = lastSpell;
            circle &= -2;
            Engine.Sounds.PlaySound(0x55);
            Engine.DoEvents();
            GDragable dragable = new GDragable(GetBookIndex(container.ID), 0, 0);

            dragable.SetTag("Container", container);
            dragable.SetTag("Dispose", "Spellbook");
            dragable.Children.Add(new GMinimizer());
            if (container.SpellbookOffset == 0x65)
            {
                necromancerList = NecromancerList;
            }
            else if (container.SpellbookOffset == 0xc9)
            {
                necromancerList = PaladinList;
            }
            else
            {
                necromancerList = RegularList;
            }
            if ((lastSpell >= necromancerList.Start) && (lastSpell < (necromancerList.Start + necromancerList.Spells.Length)))
            {
                int num  = (lastSpell - necromancerList.Start) / necromancerList.SpellsPerCircle;
                int num2 = (lastSpell - necromancerList.Start) % necromancerList.SpellsPerCircle;
                if ((num >= 0) && (num < necromancerList.Circles))
                {
                    if (num == circle)
                    {
                        dragable.Children.Add(new GImage(0x8ad, 0xb8, 2));
                        dragable.Children.Add(new GImage(0x8af, 0xb7, 0x34 + (num2 * 15)));
                    }
                    else if (num == (circle + 1))
                    {
                        dragable.Children.Add(new GImage(0x8ae, 0xcc, 3));
                        dragable.Children.Add(new GImage(0x8b0, 0xcc, 0x34 + (num2 * 15)));
                    }
                }
            }
            dragable.Children.Add(new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 0x6a, 10));
            dragable.Children.Add(new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 0x10d, 10));
            OnClick clickHandler = new OnClick(Spells.ChangeCircle_OnClick);

            int[] numArray  = new int[] { 0x3a, 0x5d, 130, 0xa4, 0xe3, 260, 0x129, 0x14c };
            int[] numArray2 = new int[] { 0x34, 0x34 };
            if (necromancerList.DisplayIndex)
            {
                for (int j = 0; j < necromancerList.Circles; j++)
                {
                    GButton toAdd = new GButton(0x8b1 + j, 0x8b1 + j, 0x8b1 + j, numArray[j], 0xaf, clickHandler);
                    toAdd.SetTag("Circle", j);
                    dragable.Children.Add(toAdd);
                }
            }
            if (necromancerList.DisplayCircles)
            {
                if (circle > 0)
                {
                    GButton button2 = new GButton(0x8bb, 0x8bb, 0x8bb, 50, 8, clickHandler);
                    button2.SetTag("Circle", circle - 1);
                    dragable.Children.Add(button2);
                }
                if (circle < ((necromancerList.Circles - 1) & -2))
                {
                    GButton button3 = new GButton(0x8bc, 0x8bc, 0x8bc, 0x141, 8, clickHandler);
                    button3.SetTag("Circle", circle + 2);
                    dragable.Children.Add(button3);
                }
                for (int k = circle; k < (circle + 2); k++)
                {
                    string str;
                    int    x = ((k & 1) == 0) ? 0x3e : 0xe1;
                    if ((k < 0) || (k >= m_Numbers.Length))
                    {
                        str = "Bad";
                    }
                    else
                    {
                        str = m_Numbers[k];
                    }
                    dragable.Children.Add(new GLabel(string.Format("{0} Circle", str), Engine.GetFont(6), Hues.Default, x, 30));
                }
            }
            int num6 = circle * necromancerList.SpellsPerCircle;
            int num7 = (circle + 2) * necromancerList.SpellsPerCircle;

            for (int i = num6; i < num7; i++)
            {
                if (((i >= num6) && (i < num7)) && container.GetSpellContained(i))
                {
                    int   num9      = i / necromancerList.SpellsPerCircle;
                    Spell spellByID = GetSpellByID(container.SpellbookOffset + i);
                    if (spellByID != null)
                    {
                        IntPtr     ptr;
                        GSpellName name = new GSpellName(container.SpellbookOffset + i, spellByID.Name, Engine.GetFont(9), Hues.Load(0x288), Hues.Load(0x28b), 0x3e + ((num9 & 1) * 0xa3), numArray2[num9 & 1]);
                        numArray2[(int)(ptr = (IntPtr)(num9 & 1))] = numArray2[(int)ptr] + 15;
                        string        str2    = string.Format("{0}\n", spellByID.Name);
                        StringBuilder builder = new StringBuilder();
                        builder.Append(spellByID.Name);
                        builder.Append('\n');
                        for (int m = 0; m < spellByID.Power.Length; m++)
                        {
                            builder.Append(spellByID.Power[m].Name);
                            builder.Append(' ');
                        }
                        for (int n = 0; n < spellByID.Reagents.Count; n++)
                        {
                            builder.Append('\n');
                            Reagent reagent = (Reagent)spellByID.Reagents[n];
                            builder.Append(reagent.Name);
                        }
                        if (spellByID.Tithing > 0)
                        {
                            builder.Append('\n');
                            builder.AppendFormat("Tithing: {0}", spellByID.Tithing);
                        }
                        if (spellByID.Mana > 0)
                        {
                            builder.Append('\n');
                            builder.AppendFormat("Mana: {0}", spellByID.Mana);
                        }
                        if (spellByID.Skill > 0)
                        {
                            builder.Append('\n');
                            builder.AppendFormat("Skill: {0}", spellByID.Skill);
                        }
                        Tooltip tooltip = new Tooltip(builder.ToString(), true);
                        name.Tooltip = tooltip;
                        dragable.Children.Add(name);
                    }
                }
            }
            return(dragable);
        }
Example #13
0
        private void StatChange(string name, int oldValue, int newValue)
        {
            int num = newValue - oldValue;

            if (num != 0)
            {
                Engine.AddTextMessage(string.Format("Your {0} has {1} by {2}. It is now {3}.", new object[] { name, (num > 0) ? "increased" : "decreased", Math.Abs(num), newValue }), Engine.GetFont(3), Hues.Load(0x170));
            }
        }
Example #14
0
        public GQuestionMenu(int serial, int menuID, string question, AnswerEntry[] answers) : base(0x23f4, Engine.ScreenWidth / 2, 100, 50, 50, true)
        {
            base.m_CanDrag   = true;
            base.m_QuickDrag = true;
            this.m_Serial    = serial;
            this.m_MenuID    = menuID;
            GWrappedLabel toAdd = new GWrappedLabel(question, Engine.GetFont(1), Hues.Load(0x455), base.OffsetX + 4, base.OffsetY + 4, base.UseWidth - 8);

            base.m_Children.Add(toAdd);
            this.m_Entries = new GQuestionMenuEntry[answers.Length];
            GBackground background = new GQuestionBackground(this.m_Entries, base.UseWidth - 8, ((base.UseHeight - 8) - toAdd.Height) - 4, base.OffsetX + 4, (toAdd.Y + toAdd.Height) + 4);

            background.SetMouseOverride(this);
            int offsetX  = background.OffsetX;
            int offsetY  = background.OffsetY;
            int useWidth = background.UseWidth;

            for (int i = 0; i < answers.Length; i++)
            {
                GQuestionMenuEntry entry = new GQuestionMenuEntry(offsetX, offsetY, useWidth, answers[i]);
                background.Children.Add(entry);
                entry.Radio.ParentOverride = background;
                this.m_Entries[i]          = entry;
                offsetY += entry.Height + 4;
            }
            background.Height = ((offsetY - 4) - background.OffsetY) + (background.Height - background.UseHeight);
            this.Height       = (((((this.Height - base.UseHeight) + 4) + toAdd.Height) + 4) + background.Height) + 4;
            int num5 = (int)(Engine.ScreenHeight * 0.75);

            if (this.Height > num5)
            {
                this.Height       = num5;
                background.Height = ((base.UseHeight - 8) - toAdd.Height) - 4;
            }
            offsetY -= 4;
            offsetY -= background.OffsetY;
            if (offsetY > background.UseHeight)
            {
                int num6 = offsetY;
                background.Width += 0x13;
                this.Width       += 0x13;
                offsetX           = (background.OffsetX + background.UseWidth) - 15;
                offsetY           = background.OffsetY;
                background.Children.Add(new GImage(0x101, offsetX, offsetY));
                background.Children.Add(new GImage(0xff, offsetX, (offsetY + background.UseHeight) - 0x20));
                for (int j = offsetY + 30; (j + 0x20) < background.UseHeight; j += 30)
                {
                    background.Children.Add(new GImage(0x100, offsetX, j));
                }
                this.m_Slider = new GVSlider(0xfe, offsetX + 1, (offsetY + 1) + 12, 13, (background.UseHeight - 2) - 0x18, 0.0, 0.0, (double)(num6 - background.UseHeight), 1.0);
                this.m_Slider.OnValueChange = new OnValueChange(this.OnScroll);
                this.m_Slider.ScrollOffset  = 20.0;
                background.Children.Add(this.m_Slider);
                background.Children.Add(new GHotspot(offsetX, offsetY, 15, background.UseHeight, this.m_Slider));
            }
            GButtonNew new2 = new GButtonNew(0xf3, 0xf2, 0xf1, 0, (background.Y + background.Height) + 4);
            GButtonNew new3 = new GButtonNew(0xf9, 0xf7, 0xf8, 0, new2.Y);

            new2.Clicked += new EventHandler(this.Cancel_Clicked);
            new3.Clicked += new EventHandler(this.Okay_Clicked);
            new2.X        = ((base.OffsetX + base.UseWidth) - 4) - new2.Width;
            new3.X        = (new2.X - 4) - new3.Width;
            base.m_Children.Add(new2);
            base.m_Children.Add(new3);
            this.Height += 4 + new2.Height;
            base.m_Children.Add(background);
            this.Center();
        }
Example #15
0
 public void AddTextMessage(string msg, TimeSpan ts, int font)
 {
     Engine.AddTextMessage(msg, (float)ts.TotalSeconds, Engine.GetFont(font));
 }
Example #16
0
 public MiddleDeathEffect() : base(0, 1f, 1f, 1f)
 {
     this.m_Label = new GLabel("You are dead.", Engine.GetFont(3), Hues.Default, 0, 0);
     this.m_Label.Center();
     Gumps.Desktop.Children.Add(this.m_Label);
 }
Example #17
0
        public GStatusBar(Mobile m, int X, int Y) : base(0.25f, 0.25f, 0.6f, 0x2a6c, X, Y)
        {
            this.m_xName     = "";
            this.m_Mobile    = m;
            base.m_CanDrop   = true;
            base.m_QuickDrag = true;
            IFont font = Engine.GetFont(9);
            IHue  hue  = Hues.Load(0x455);

            this.m_Name      = new GLabel("", font, hue, 0x26, 50);
            this.m_Str       = new GLabel("0", font, hue, 0x58, 0x4d);
            this.m_Hits      = new GAttributeCurMax(0x92, 0x48, 0x22, 0x15, this.m_Mobile.HPCur, this.m_Mobile.HPMax, font, hue);
            this.m_Dex       = new GLabel("0", font, hue, 0x58, 0x69);
            this.m_Stam      = new GAttributeCurMax(0x92, 100, 0x22, 0x15, this.m_Mobile.StamCur, this.m_Mobile.StamMax, font, hue);
            this.m_Int       = new GLabel("0", font, hue, 0x58, 0x85);
            this.m_Mana      = new GAttributeCurMax(0x92, 0x80, 0x22, 0x15, this.m_Mobile.ManaCur, this.m_Mobile.ManaMax, font, hue);
            this.m_Armor     = new GLabel("0", font, hue, 0x163, 0x4a);
            this.m_Fire      = new GLabel("0", font, hue, 0x163, 0x5b);
            this.m_Cold      = new GLabel("0", font, hue, 0x163, 0x6a);
            this.m_Poison    = new GLabel("0", font, hue, 0x163, 0x77);
            this.m_Energy    = new GLabel("0", font, hue, 0x163, 0x85);
            this.m_Luck      = new GLabel("0", font, hue, 220, 0x69);
            this.m_Damages   = new GLabel("0-0", font, hue, 280, 0x4d);
            this.m_Gold      = new GLabel("0", font, hue, 280, 0x69);
            this.m_Weight    = new GAttributeCurMax(0xd8, 0x80, 0x22, 0x15, this.m_Mobile.Weight, this.GetMaxWeight(this.m_Mobile.Str), font, hue);
            this.m_StatCap   = new GLabel("0", font, hue, 220, 0x4d);
            this.m_Followers = new GLabel("0/0", font, hue, 0x11d, 0x85);
            this.m_Name.X    = 0x27 + ((0x160 - ((this.m_Name.Image.xMax - this.m_Name.Image.xMin) + 1)) / 2);
            this.m_Name.X   -= this.m_Name.Image.xMin;
            base.m_Children.Add(this.m_Name);
            base.m_Children.Add(this.m_Str);
            base.m_Children.Add(this.m_Hits);
            base.m_Children.Add(this.m_Dex);
            base.m_Children.Add(this.m_Stam);
            base.m_Children.Add(this.m_Int);
            base.m_Children.Add(this.m_Mana);
            base.m_Children.Add(this.m_Armor);
            base.m_Children.Add(this.m_Fire);
            base.m_Children.Add(this.m_Cold);
            base.m_Children.Add(this.m_Poison);
            base.m_Children.Add(this.m_Energy);
            base.m_Children.Add(this.m_Luck);
            base.m_Children.Add(this.m_Damages);
            base.m_Children.Add(this.m_Gold);
            base.m_Children.Add(this.m_Weight);
            base.m_Children.Add(this.m_StatCap);
            base.m_Children.Add(this.m_Followers);
            base.m_Children.Add(new GMinimizer(this));
            this.AddTooltip(0x37, 70, 0x40, 0x1a, 0x10311a);
            this.AddTooltip(0x37, 0x62, 0x40, 0x1a, 0x10311b);
            this.AddTooltip(0x37, 0x7e, 0x40, 0x1a, 0x10311c);
            this.AddTooltip(0x79, 70, 0x3f, 0x1a, 0x10311d);
            this.AddTooltip(0x79, 0x62, 0x3f, 0x1a, 0x10311e);
            this.AddTooltip(0x79, 0x7e, 0x3f, 0x1a, 0x10311f);
            this.AddTooltip(0xba, 70, 0x45, 0x1a, 0x103120);
            this.AddTooltip(0xba, 0x62, 0x45, 0x1a, 0x103121);
            this.AddTooltip(0xba, 0x7e, 0x45, 0x1a, 0x103122);
            this.AddTooltip(0x101, 70, 0x48, 0x1a, 0x103123);
            this.AddTooltip(0x101, 0x62, 0x48, 0x1a, 0x103124);
            this.AddTooltip(0x101, 0x7e, 0x48, 0x1a, 0x103125);
            this.AddTooltip(0x14d, 0x4a, 0x2e, 14, 0x103126);
            this.AddTooltip(0x14d, 0x5b, 0x2e, 14, 0x103127);
            this.AddTooltip(0x14d, 0x6a, 0x2e, 13, 0x103128);
            this.AddTooltip(0x14d, 120, 0x2e, 11, 0x103129);
            this.AddTooltip(0x14d, 0x85, 0x2e, 0x10, 0x10312a);
            this.OnRefresh();
            if (Engine.Features.AOS)
            {
                base.Tooltip = new MobileTooltip(m);
            }
        }