示例#1
0
        private void OnLoadingGumpButtonClick(int buttonId)
        {
            LoginButtons butt = (LoginButtons)buttonId;

            if (butt == LoginButtons.OK || butt == LoginButtons.Cancel)
            {
                StepBack();
            }
        }
示例#2
0
        private LoadingGump GetLoadingScreen()
        {
            string       labelText   = "No Text";
            LoginButtons showButtons = LoginButtons.None;

            if (!string.IsNullOrEmpty(PopupMessage))
            {
                labelText    = PopupMessage;
                showButtons  = LoginButtons.OK;
                PopupMessage = null;
            }
            else
            {
                switch (CurrentLoginStep)
                {
                case LoginSteps.Connecting:
                    labelText = ClilocLoader.Instance.GetString(3000002, ResGeneral.Connecting);     // "Connecting..."

                    break;

                case LoginSteps.VerifyingAccount:
                    labelText = ClilocLoader.Instance.GetString
                                    (3000003, ResGeneral.VerifyingAccount); // "Verifying Account..."

                    showButtons = LoginButtons.Cancel;

                    break;

                case LoginSteps.LoginInToServer:
                    labelText = ClilocLoader.Instance.GetString
                                    (3000053, ResGeneral.LoggingIntoShard); // logging into shard

                    break;

                case LoginSteps.EnteringBritania:
                    labelText = ClilocLoader.Instance.GetString
                                    (3000001, ResGeneral.EnteringBritannia); // Entering Britania...

                    break;

                case LoginSteps.CharacterCreationDone:
                    labelText = ResGeneral.CreatingCharacter;

                    break;
                }
            }

            return(new LoadingGump(labelText, showButtons, OnLoadingGumpButtonClick));
        }
示例#3
0
        public LoadingGump(string labelText, LoginButtons showButtons, Action <int> buttonClick = null) : base(0, 0)
        {
            _buttonClick           = buttonClick;
            CanCloseWithRightClick = false;
            CanCloseWithEsc        = false;

            _Label = new Label(labelText, true, 1, 326, 2, align: TEXT_ALIGN_TYPE.TS_CENTER)
            {
                X = 162,
                Y = 178
            };

            Add(new ResizePic(0x0A28)
            {
                X = 142, Y = 134, Width = 366, Height = 212
            });

            Add(_Label);

            if (showButtons == LoginButtons.OK)
            {
                Add(new Button((int)LoginButtons.OK, 0x0481, 0x0483, 0x0482)
                {
                    X = 306, Y = 304, ButtonAction = ButtonAction.Activate
                });
            }
            else if (showButtons == LoginButtons.Cancel)
            {
                Add(new Button((int)LoginButtons.Cancel, 0x047E, 0x0480, 0x047F)
                {
                    X            = 306,
                    Y            = 304,
                    ButtonAction = ButtonAction.Activate
                });
            }
            else if (showButtons == (LoginButtons.OK | LoginButtons.Cancel))
            {
                Add(new Button((int)LoginButtons.OK, 0x0481, 0x0483, 0x0482)
                {
                    X = 264, Y = 304, ButtonAction = ButtonAction.Activate
                });

                Add(new Button((int)LoginButtons.Cancel, 0x047E, 0x0480, 0x047F)
                {
                    X = 348, Y = 304, ButtonAction = ButtonAction.Activate
                });
            }
        }
示例#4
0
        public LoadingGump(string labelText, LoginButtons showButtons, Action <int> buttonClick = null) : base(0, 0)
        {
            _buttonClick           = buttonClick;
            CanCloseWithRightClick = false;
            CanCloseWithEsc        = false;

            _label = new Label
                     (
                labelText,
                false,
                0x0481,
                326,
                255,
                align: TEXT_ALIGN_TYPE.TS_CENTER
                     )
            {
                X = 670,
                Y = 430
            };

            Add
            (
                new ResizePic(0x9BF5)
            {
                X = 650, Y = 350, Width = 366, Height = 212
            }
            );

            Add(_label);

            if (showButtons == LoginButtons.OK)
            {
                Add
                (
                    new Button((int)LoginButtons.OK, 0x0481, 0x0483, 0x0482)
                {
                    X = 820, Y = 520, ButtonAction = ButtonAction.Activate
                }
                );
            }
            else if (showButtons == LoginButtons.Cancel)
            {
                Add
                (
                    new Button((int)LoginButtons.Cancel, 0x047E, 0x0480, 0x047F)
                {
                    X            = 820,
                    Y            = 520,
                    ButtonAction = ButtonAction.Activate
                }
                );
            }
            else if (showButtons == (LoginButtons.OK | LoginButtons.Cancel))
            {
                Add
                (
                    new Button((int)LoginButtons.OK, 0x0481, 0x0483, 0x0482)
                {
                    X = 780, Y = 520, ButtonAction = ButtonAction.Activate
                }
                );

                Add
                (
                    new Button((int)LoginButtons.Cancel, 0x047E, 0x0480, 0x047F)
                {
                    X = 860, Y = 520, ButtonAction = ButtonAction.Activate
                }
                );
            }
        }
        public LoadingGump(string labelText, LoginButtons showButtons, Action <int> buttonClick = null) : base(0, 0)
        {
            _buttonClick           = buttonClick;
            CanCloseWithRightClick = false;
            CanCloseWithEsc        = false;

            bool isAsianLang = string.Compare(Settings.GlobalSettings.Language, "CHT", StringComparison.InvariantCultureIgnoreCase) == 0 ||
                               string.Compare(Settings.GlobalSettings.Language, "KOR", StringComparison.InvariantCultureIgnoreCase) == 0 ||
                               string.Compare(Settings.GlobalSettings.Language, "JPN", StringComparison.InvariantCultureIgnoreCase) == 0;

            bool   unicode = isAsianLang;
            byte   font    = (byte)(isAsianLang ? 1 : 2);
            ushort hue     = (ushort)(isAsianLang ? 0xFFFF : 0x0386);

            _label = new Label
                     (
                labelText,
                unicode,
                hue,
                326,
                font,
                align: TEXT_ALIGN_TYPE.TS_CENTER
                     )
            {
                X = 162,
                Y = 178
            };

            Add
            (
                new ResizePic(0x0A28)
            {
                X = 142, Y = 134, Width = 366, Height = 212
            }
            );

            Add(_label);

            if (showButtons == LoginButtons.OK)
            {
                Add
                (
                    new Button((int)LoginButtons.OK, 0x0481, 0x0483, 0x0482)
                {
                    X = 306, Y = 304, ButtonAction = ButtonAction.Activate
                }
                );
            }
            else if (showButtons == LoginButtons.Cancel)
            {
                Add
                (
                    new Button((int)LoginButtons.Cancel, 0x047E, 0x0480, 0x047F)
                {
                    X            = 306,
                    Y            = 304,
                    ButtonAction = ButtonAction.Activate
                }
                );
            }
            else if (showButtons == (LoginButtons.OK | LoginButtons.Cancel))
            {
                Add
                (
                    new Button((int)LoginButtons.OK, 0x0481, 0x0483, 0x0482)
                {
                    X = 264, Y = 304, ButtonAction = ButtonAction.Activate
                }
                );

                Add
                (
                    new Button((int)LoginButtons.Cancel, 0x047E, 0x0480, 0x047F)
                {
                    X = 348, Y = 304, ButtonAction = ButtonAction.Activate
                }
                );
            }
        }