Esempio n. 1
0
        public GInfoForm() : base(0, 0, 400, 430)
        {
            base.m_NonRestrictivePicking        = true;
            base.Client.m_NonRestrictivePicking = true;
            Gumps.Focus = this;
            base.Text   = "Information Browser";
            InfoProvider[] providerArray = new InfoProvider[] { new CommandInfoProvider(), new CastingInfoProvider(), new SwingInfoProvider() };
            GMainMenu      toAdd         = new GMainMenu((this.Width - 130) - 4, 8);
            GMenuItem      child         = new GMenuItem("Change Provider")
            {
                DropDown = true
            };

            for (int i = 0; i < providerArray.Length; i++)
            {
                child.Add(new ChangeProviderMenu(this, providerArray[i]));
            }
            toAdd.Add(child);
            this.RecurseFormatMenu(child);
            base.Client.Children.Add(toAdd);
            this.m_CPMenu = toAdd;
            this.Provider = providerArray[0];
            base.GUID     = "Info Browser";
            this.Center();
        }
Esempio n. 2
0
 public override Gump CreateGump()
 {
     GMainMenu menu = new GMainMenu(0, 0);
     GMenuItem child = new GMenuItem(base.Name) {
         DropDown = true
     };
     for (int i = 0; i < this.m_Nodes.Length; i++)
     {
         child.Add(this.m_Nodes[i].Menu);
     }
     menu.Add(child);
     this.RecurseFormatMenu(child);
     return menu;
 }
Esempio n. 3
0
        public override void UpdateGump(Gump g)
        {
            GMainMenu menu   = (GMainMenu)g;
            GMenuItem item   = (GMenuItem)menu.Children[0];
            InfoNode  active = base.Active as InfoNode;

            if (active == null)
            {
                item.Text = base.Name;
            }
            else
            {
                item.Text = active.Name;
            }
        }
Esempio n. 4
0
        public override Gump CreateGump()
        {
            GMainMenu menu  = new GMainMenu(0, 0);
            GMenuItem child = new GMenuItem(base.Name)
            {
                DropDown = true
            };

            for (int i = 0; i < this.m_Nodes.Length; i++)
            {
                child.Add(this.m_Nodes[i].Menu);
            }
            menu.Add(child);
            this.RecurseFormatMenu(child);
            return(menu);
        }
Esempio n. 5
0
 public GInfoForm()
     : base(0, 0, 400, 430)
 {
     base.m_NonRestrictivePicking = true;
     base.Client.m_NonRestrictivePicking = true;
     Gumps.Focus = this;
     base.Text = "Information Browser";
     InfoProvider[] providerArray = new InfoProvider[] { new CommandInfoProvider(), new CastingInfoProvider(), new SwingInfoProvider() };
     GMainMenu toAdd = new GMainMenu((this.Width - 130) - 4, 8);
     GMenuItem child = new GMenuItem("Change Provider") {
         DropDown = true
     };
     for (int i = 0; i < providerArray.Length; i++)
     {
         child.Add(new ChangeProviderMenu(this, providerArray[i]));
     }
     toAdd.Add(child);
     this.RecurseFormatMenu(child);
     base.Client.Children.Add(toAdd);
     this.m_CPMenu = toAdd;
     this.Provider = providerArray[0];
     base.GUID = "Info Browser";
     this.Center();
 }
Esempio n. 6
0
 public static GMainMenu BuildSmartLoginMenu()
 {
     ServerProfile[] list = Profiles.List;
     GMainMenu menu = new GMainMenu(0, 270);
     for (int i = 0; i < list.Length; i++)
     {
         ServerProfile server = list[i];
         GMenuItem child = new GNewAccountMenu(server, server.Title);
         server.Menu = child;
         for (int j = 0; j < server.Accounts.Length; j++)
         {
             GMenuItem item2;
             AccountProfile account = server.Accounts[j];
             if (server.Accounts.Length == 1)
             {
                 item2 = child;
             }
             else
             {
                 item2 = new GAccountMenu(account);
                 child.Add(item2);
             }
             account.Menu = item2;
             for (int k = 0; k < account.Shards.Length; k++)
             {
                 GMenuItem item3;
                 ShardProfile shard = account.Shards[k];
                 if (account.Shards.Length == 1)
                 {
                     item3 = item2;
                 }
                 else
                 {
                     item3 = new GShardMenu(shard);
                     item2.Add(item3);
                 }
                 shard.Menu = item3;
                 int num4 = 0;
                 for (int m = 0; m < shard.Characters.Length; m++)
                 {
                     if (shard.Characters[m] != null)
                     {
                         GMenuItem item4 = new GPlayCharacterMenu(shard.Characters[m]);
                         shard.Characters[m].Menu = item4;
                         item3.Add(item4);
                         num4++;
                     }
                 }
             }
             if (item2 != child)
             {
                 child.Add(item2);
             }
         }
         menu.Add(child);
     }
     menu.Add(new GNewServerMenu());
     menu.GUID = "Smart Login";
     return menu;
 }
Esempio n. 7
0
        public GMacroEditorPanel(Client.Macro m) : base(0, 0, 0x103, 230)
        {
            GMainMenu menu;
            GMenuItem menuFrom;

            this.m_Macro   = m;
            base.m_CanDrag = false;
            base.m_NonRestrictivePicking = true;
            base.ShouldHitTest           = false;
            this.m_Ctrl          = new GSystemButton(10, 10, 40, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float)0.5f), SystemColors.ControlText, "Ctrl", Engine.GetUniFont(2));
            this.m_Alt           = new GSystemButton(0x31, 10, 40, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float)0.5f), SystemColors.ControlText, "Alt", Engine.GetUniFont(2));
            this.m_Shift         = new GSystemButton(0x58, 10, 0x2a, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float)0.5f), SystemColors.ControlText, "Shift", Engine.GetUniFont(2));
            this.m_Ctrl.OnClick  = new OnClick(this.Ctrl_OnClick);
            this.m_Alt.OnClick   = new OnClick(this.Alt_OnClick);
            this.m_Shift.OnClick = new OnClick(this.Shift_OnClick);
            this.m_Ctrl.Tooltip  = new Tooltip("Toggles the control key modifier", true);
            this.m_Alt.Tooltip   = new Tooltip("Toggles the alt key modifier", true);
            this.m_Shift.Tooltip = new Tooltip("Toggles the shift key modifier", true);
            base.m_Children.Add(this.m_Ctrl);
            base.m_Children.Add(this.m_Alt);
            base.m_Children.Add(this.m_Shift);
            this.UpdateModifiers();
            GAlphaBackground toAdd = new GAlphaBackground(0x81, 10, 0x4a, 20)
            {
                FillAlpha = 1f,
                FillColor = GumpColors.Window
            };

            base.m_Children.Add(toAdd);
            GMacroKeyEntry entry = new GMacroKeyEntry(GetKeyName(m.Key), 0x81, 10, 0x4a, 20)
            {
                Tooltip = new Tooltip("Press any key here to change the macro", true)
            };

            base.m_Children.Add(entry);
            GSystemButton button = new GSystemButton(10, 10, 40, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float)0.5f), SystemColors.ControlText, "Delete", Engine.GetUniFont(2));

            button.SetBackColor(GumpPaint.Blend(Color.SteelBlue, SystemColors.Control, (float)0.25f));
            button.InactiveColor = GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float)0.5f);
            button.Tooltip       = new Tooltip("Deletes the entire macro", true);
            button.OnClick       = new OnClick(this.Delete_OnClick);
            button.X             = (this.Width - 10) - button.Width;
            base.m_Children.Add(button);
            base.FillAlpha = 0.15f;
            for (int i = 0; i < m.Actions.Length; i++)
            {
                try
                {
                    Action action = m.Actions[i];
                    if (action.Handler != null)
                    {
                        ActionHandler ah = action.Handler;
                        menu     = new GMainMenu(10, 0x23 + (i * 0x17));
                        menuFrom = new GActionMenu(this, m, action);
                        menu.Add(this.FormatMenu(menuFrom));
                        if (ah.Params == null)
                        {
                            GAlphaBackground background2 = new GAlphaBackground(0x81, 0x23 + (i * 0x17), 120, 0x18)
                            {
                                FillAlpha = 1f,
                                FillColor = GumpColors.Window
                            };
                            base.m_Children.Add(background2);
                            IHue     windowText = GumpHues.WindowText;
                            GTextBox box        = new GMacroParamEntry(action, action.Param, background2.X, background2.Y, background2.Width, background2.Height)
                            {
                                MaxChars = 0xef
                            };
                            base.m_Children.Add(box);
                        }
                        else if (ah.Params.Length != 0)
                        {
                            string name = Find(action.Param, ah.Params);
                            if (name == null)
                            {
                                name = action.Param;
                            }
                            menuFrom          = this.GetMenuFrom(new ParamNode(name, ah.Params), action, ah);
                            menuFrom.DropDown = i == (m.Actions.Length - 1);
                            menu.Add(menuFrom);
                        }
                        menu.LeftToRight = true;
                        base.m_Children.Add(menu);
                    }
                }
                catch
                {
                }
            }
            menu              = new GMainMenu(10, 0x23 + (m.Actions.Length * 0x17));
            menuFrom          = this.GetMenuFrom(ActionHandler.Root);
            menuFrom.Tooltip  = new Tooltip("To create a new instruction pick one from the menu below", false, 200);
            menuFrom.Text     = "New...";
            menuFrom.DropDown = true;
            menu.Add(this.FormatMenu(menuFrom));
            menu.LeftToRight = true;
            base.m_Children.Add(menu);
        }
Esempio n. 8
0
 public GMacroEditorPanel(Client.Macro m)
     : base(0, 0, 0x103, 230)
 {
     GMainMenu menu;
     GMenuItem menuFrom;
     this.m_Macro = m;
     base.m_CanDrag = false;
     base.m_NonRestrictivePicking = true;
     base.ShouldHitTest = false;
     this.m_Ctrl = new GSystemButton(10, 10, 40, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float) 0.5f), SystemColors.ControlText, "Ctrl", Engine.GetUniFont(2));
     this.m_Alt = new GSystemButton(0x31, 10, 40, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float) 0.5f), SystemColors.ControlText, "Alt", Engine.GetUniFont(2));
     this.m_Shift = new GSystemButton(0x58, 10, 0x2a, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float) 0.5f), SystemColors.ControlText, "Shift", Engine.GetUniFont(2));
     this.m_Ctrl.OnClick = new OnClick(this.Ctrl_OnClick);
     this.m_Alt.OnClick = new OnClick(this.Alt_OnClick);
     this.m_Shift.OnClick = new OnClick(this.Shift_OnClick);
     this.m_Ctrl.Tooltip = new Tooltip("Toggles the control key modifier", true);
     this.m_Alt.Tooltip = new Tooltip("Toggles the alt key modifier", true);
     this.m_Shift.Tooltip = new Tooltip("Toggles the shift key modifier", true);
     base.m_Children.Add(this.m_Ctrl);
     base.m_Children.Add(this.m_Alt);
     base.m_Children.Add(this.m_Shift);
     this.UpdateModifiers();
     GAlphaBackground toAdd = new GAlphaBackground(0x81, 10, 0x4a, 20) {
         FillAlpha = 1f,
         FillColor = GumpColors.Window
     };
     base.m_Children.Add(toAdd);
     GMacroKeyEntry entry = new GMacroKeyEntry(GetKeyName(m.Key), 0x81, 10, 0x4a, 20) {
         Tooltip = new Tooltip("Press any key here to change the macro", true)
     };
     base.m_Children.Add(entry);
     GSystemButton button = new GSystemButton(10, 10, 40, 20, GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float) 0.5f), SystemColors.ControlText, "Delete", Engine.GetUniFont(2));
     button.SetBackColor(GumpPaint.Blend(Color.SteelBlue, SystemColors.Control, (float) 0.25f));
     button.InactiveColor = GumpPaint.Blend(Color.WhiteSmoke, SystemColors.Control, (float) 0.5f);
     button.Tooltip = new Tooltip("Deletes the entire macro", true);
     button.OnClick = new OnClick(this.Delete_OnClick);
     button.X = (this.Width - 10) - button.Width;
     base.m_Children.Add(button);
     base.FillAlpha = 0.15f;
     for (int i = 0; i < m.Actions.Length; i++)
     {
         try
         {
             Action action = m.Actions[i];
             if (action.Handler != null)
             {
                 ActionHandler ah = action.Handler;
                 menu = new GMainMenu(10, 0x23 + (i * 0x17));
                 menuFrom = new GActionMenu(this, m, action);
                 menu.Add(this.FormatMenu(menuFrom));
                 if (ah.Params == null)
                 {
                     GAlphaBackground background2 = new GAlphaBackground(0x81, 0x23 + (i * 0x17), 120, 0x18) {
                         FillAlpha = 1f,
                         FillColor = GumpColors.Window
                     };
                     base.m_Children.Add(background2);
                     IHue windowText = GumpHues.WindowText;
                     GTextBox box = new GMacroParamEntry(action, action.Param, background2.X, background2.Y, background2.Width, background2.Height) {
                         MaxChars = 0xef
                     };
                     base.m_Children.Add(box);
                 }
                 else if (ah.Params.Length != 0)
                 {
                     string name = Find(action.Param, ah.Params);
                     if (name == null)
                     {
                         name = action.Param;
                     }
                     menuFrom = this.GetMenuFrom(new ParamNode(name, ah.Params), action, ah);
                     menuFrom.DropDown = i == (m.Actions.Length - 1);
                     menu.Add(menuFrom);
                 }
                 menu.LeftToRight = true;
                 base.m_Children.Add(menu);
             }
         }
         catch
         {
         }
     }
     menu = new GMainMenu(10, 0x23 + (m.Actions.Length * 0x17));
     menuFrom = this.GetMenuFrom(ActionHandler.Root);
     menuFrom.Tooltip = new Tooltip("To create a new instruction pick one from the menu below", false, 200);
     menuFrom.Text = "New...";
     menuFrom.DropDown = true;
     menu.Add(this.FormatMenu(menuFrom));
     menu.LeftToRight = true;
     base.m_Children.Add(menu);
 }