Ejemplo n.º 1
0
        private void BuildCombat()
        {
            const int      PAGE      = 8;
            ScrollArea     rightArea = new ScrollArea(190, 60, 390, 380, true);
            ScrollAreaItem item      = new ScrollAreaItem();

            Button buttonInnocentColor = new Button((int)Buttons.InnocentColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate
            };

            item.AddChildren(buttonInnocentColor);
            uint color = 0xFF7F7F7F;

            if (Engine.Profile.Current.InnocentHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.InnocentHue) << 8) | 0xFF);
            }
            ColorPickerBox innocentColor = new ColorPickerBox(3, 3, 1, 1, 13, 14);

            innocentColor.MouseClick += (sender, e) => buttonInnocentColor.InvokeMouseClick(e.Location, e.Button);
            innocentColor.SetHue(color);

            buttonInnocentColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => innocentColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(innocentColor);

            Label text = new Label("Innocent color", true, 1)
            {
                X = 20
            };

            item.AddChildren(text);

            Button buttonFriendColor = new Button((int)Buttons.FriendColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate, Y = buttonInnocentColor.Height
            };

            item.AddChildren(buttonFriendColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.FriendHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.FriendHue) << 8) | 0xFF);
            }

            ColorPickerBox friendColor = new ColorPickerBox(3, 3, 1, 1, 13, 14)
            {
                Y = buttonInnocentColor.Height + 3
            };

            friendColor.MouseClick += (sender, e) => buttonFriendColor.InvokeMouseClick(e.Location, e.Button);
            friendColor.SetHue(color);

            buttonFriendColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => friendColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(friendColor);

            text = new Label("Friend color", true, 1)
            {
                X = 20, Y = buttonInnocentColor.Height
            };
            item.AddChildren(text);

            Button buttonCriminalColor = new Button((int)Buttons.CriminalColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate, Y = buttonFriendColor.Bounds.Bottom
            };

            item.AddChildren(buttonCriminalColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.CriminalHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.CriminalHue) << 8) | 0xFF);
            }

            ColorPickerBox criminalColor = new ColorPickerBox(3, 3, 1, 1, 13, 14)
            {
                Y = buttonFriendColor.Bounds.Bottom + 3
            };

            criminalColor.MouseClick += (sender, e) => buttonCriminalColor.InvokeMouseClick(e.Location, e.Button);
            criminalColor.SetHue(color);

            buttonCriminalColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => criminalColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(criminalColor);

            text = new Label("Criminal color", true, 1)
            {
                X = 20, Y = buttonFriendColor.Bounds.Bottom
            };
            item.AddChildren(text);

            Button buttonEnemyColor = new Button((int)Buttons.EnemyColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate, X = 150
            };

            item.AddChildren(buttonEnemyColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.EnemyHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.EnemyHue) << 8) | 0xFF);
            }

            ColorPickerBox enemyColor = new ColorPickerBox(3, 3, 1, 1, 13, 14)
            {
                X = 150 + 3
            };

            enemyColor.MouseClick += (sender, e) => buttonEnemyColor.InvokeMouseClick(e.Location, e.Button);
            enemyColor.SetHue(color);

            buttonEnemyColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => enemyColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(enemyColor);

            text = new Label("Enemy color", true, 1)
            {
                X = 150 + 20
            };
            item.AddChildren(text);

            Button buttonMurdererColor = new Button((int)Buttons.MurdererColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate, X = 150, Y = buttonEnemyColor.Bounds.Bottom
            };

            item.AddChildren(buttonMurdererColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.MurdererHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.MurdererHue) << 8) | 0xFF);
            }

            ColorPickerBox murdererColor = new ColorPickerBox(3, 3, 1, 1, 13, 14)
            {
                X = 150 + 3, Y = buttonEnemyColor.Bounds.Bottom + 3
            };

            murdererColor.MouseClick += (sender, e) => buttonMurdererColor.InvokeMouseClick(e.Location, e.Button);
            murdererColor.SetHue(color);

            buttonMurdererColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => murdererColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(murdererColor);

            text = new Label("Murderer color", true, 1)
            {
                X = 150 + 20, Y = buttonEnemyColor.Bounds.Bottom
            };
            item.AddChildren(text);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();

            Checkbox queryBeforeAttact = new Checkbox(0x00D2, 0x00D3, "Query before attack", 1)
            {
                Y = 30, IsChecked = Engine.Profile.Current.EnabledCriminalActionQuery
            };

            item.AddChildren(queryBeforeAttact);
            rightArea.AddChildren(item);
            AddChildren(rightArea, PAGE);
        }
Ejemplo n.º 2
0
        private void BuildPage3()
        {
            AddChildren(new GumpPic(0, 177, 0x00DD, 0)
            {
                CanMove = false
            }, 3);

            Label label = new Label("Language", true, 0, 460, align: TEXT_ALIGN_TYPE.TS_CENTER)
            {
                X = 84, Y = 22
            };

            AddChildren(label, 3);

            label = new Label("The language you use when playing UO is obtained from your OS.", true, 0, 480)
            {
                X = 64, Y = 44
            };
            AddChildren(label, 3);

            _checkboxUseTooltips = new Checkbox(0x00D2, 0x00D3, "Use tooltips")
            {
                X = 64, Y = 90, IsChecked = _settings.UseTooltips
            };
            AddChildren(_checkboxUseTooltips, 3);

            label = new Label("Delay before tooltip appears", true, 0)
            {
                X = 64, Y = 112
            };
            AddChildren(label, 3);
            _sliderDelayAppearTooltips = new HSliderBar(64, 133, 90, 0, 5000, _settings.DelayAppearTooltips, HSliderBarStyle.MetalWidgetRecessedBar, true);
            AddChildren(_sliderDelayAppearTooltips, 3);

            Button button = new Button((int)Buttons.TextColor, 0x00D4, 0x00D4)
            {
                X = 64, Y = 151, ButtonAction = ButtonAction.Activate, ToPage = 3
            };

            button.MouseClick += (sender, e) =>
            {
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => _colorPickerTooltipText.SetHue(s));
                UIManager.Add(pickerGump);
            };
            AddChildren(button, 3);
            uint color = 0xFF7F7F7F;

            if (_settings.TooltipsTextColor != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, _settings.TooltipsTextColor) << 8) | 0xFF);
            }
            _colorPickerTooltipText = new ColorPickerBox(67, 154, 1, 1, 13, 14);
            _colorPickerTooltipText.SetHue(color);
            AddChildren(_colorPickerTooltipText, 3);

            label = new Label("Color of tooltips text", true, 0)
            {
                X = 88, Y = 151
            };
            AddChildren(label, 3);

            AddChildren(new Button((int)Buttons.TextFont, 0x00D0, 0x00D0)
            {
                X = 64, Y = 173, ButtonAction = ButtonAction.Activate, ToPage = 3
            }, 3);

            label = new Label("Font for tooltips", true, 0)
            {
                X = 88, Y = 173
            };
            AddChildren(label, 3);
        }
Ejemplo n.º 3
0
        private void BuildSpeech()
        {
            const int      PAGE      = 7;
            ScrollArea     rightArea = new ScrollArea(190, 60, 390, 380, true);
            ScrollAreaItem item      = new ScrollAreaItem();

            Checkbox scaleSpeechDelay = new Checkbox(0x00D2, 0x00D3, "Scale speech delay by length", 1)
            {
                IsChecked = Engine.Profile.Current.ScaleSpeechDelay
            };

            item.AddChildren(scaleSpeechDelay);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();
            Label text = new Label("- Speech delay:", true, 1);

            item.AddChildren(text);
            HSliderBar sliderSpeechDelay = new HSliderBar(100, 5, 150, 1, 1000, Engine.Profile.Current.SpeechDelay, HSliderBarStyle.MetalWidgetRecessedBar, true, 1);

            item.AddChildren(sliderSpeechDelay);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();

            Button buttonSpeechColor = new Button((int)Buttons.SpeechColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate, Y = 30
            };

            item.AddChildren(buttonSpeechColor);
            uint color = 0xFF7F7F7F;

            if (Engine.Profile.Current.SpeechHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.SpeechHue) << 8) | 0xFF);
            }

            ColorPickerBox speechColorPickerBox = new ColorPickerBox(3, 3, 1, 1, 13, 14)
            {
                Y = 33
            };

            speechColorPickerBox.MouseClick += (sender, e) => buttonSpeechColor.InvokeMouseClick(e.Location, e.Button);
            speechColorPickerBox.SetHue(color);

            buttonSpeechColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => speechColorPickerBox.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(speechColorPickerBox);

            text = new Label("Speech color", true, 1)
            {
                X = 20, Y = 30
            };
            item.AddChildren(text);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();

            Button buttonEmoteColor = new Button((int)Buttons.EmoteColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate
            };

            item.AddChildren(buttonEmoteColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.EmoteHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.EmoteHue) << 8) | 0xFF);
            }
            ColorPickerBox emoteColorPickerBox = new ColorPickerBox(3, 3, 1, 1, 13, 14);

            emoteColorPickerBox.MouseClick += (sender, e) => buttonEmoteColor.InvokeMouseClick(e.Location, e.Button);
            emoteColorPickerBox.SetHue(color);

            buttonEmoteColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => emoteColorPickerBox.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(emoteColorPickerBox);

            text = new Label("Emote color", true, 1)
            {
                X = 20
            };
            item.AddChildren(text);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();

            Button butttonPartyMessageColor = new Button((int)Buttons.PartyMessageColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate
            };

            item.AddChildren(butttonPartyMessageColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.PartyMessageHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.PartyMessageHue) << 8) | 0xFF);
            }
            ColorPickerBox partyMessageColor = new ColorPickerBox(3, 3, 1, 1, 13, 14);

            partyMessageColor.MouseClick += (sender, e) => butttonPartyMessageColor.InvokeMouseClick(e.Location, e.Button);
            partyMessageColor.SetHue(color);

            butttonPartyMessageColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => partyMessageColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(partyMessageColor);

            text = new Label("Party message color", true, 1)
            {
                X = 20
            };
            item.AddChildren(text);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();

            Button buttonGuildMessageColor = new Button((int)Buttons.GuildMessageColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate
            };

            item.AddChildren(buttonGuildMessageColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.GuildMessageHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.GuildMessageHue) << 8) | 0xFF);
            }
            ColorPickerBox guildMessageColor = new ColorPickerBox(3, 3, 1, 1, 13, 14);

            guildMessageColor.MouseClick += (sender, e) => buttonGuildMessageColor.InvokeMouseClick(e.Location, e.Button);
            guildMessageColor.SetHue(color);

            buttonGuildMessageColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => guildMessageColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(guildMessageColor);

            text = new Label("Guild message color", true, 1)
            {
                X = 20
            };
            item.AddChildren(text);
            rightArea.AddChildren(item);
            item = new ScrollAreaItem();

            Button buttonAllyMessageColor = new Button((int)Buttons.AllyMessageColor, 0x00D4, 0x00D4)
            {
                ButtonAction = ButtonAction.Activate
            };

            item.AddChildren(buttonAllyMessageColor);
            color = 0xFF7F7F7F;

            if (Engine.Profile.Current.AllyMessageHue != 0xFFFF)
            {
                color = Hues.RgbaToArgb((Hues.GetPolygoneColor(12, Engine.Profile.Current.AllyMessageHue) << 8) | 0xFF);
            }
            ColorPickerBox allyMessageColor = new ColorPickerBox(3, 3, 1, 1, 13, 14);

            allyMessageColor.MouseClick += (sender, e) => buttonAllyMessageColor.InvokeMouseClick(e.Location, e.Button);
            allyMessageColor.SetHue(color);

            buttonAllyMessageColor.MouseClick += (sender, e) =>
            {
                // TODO: fix multi opening
                ColorPickerGump pickerGump = new ColorPickerGump(100, 100, s => allyMessageColor.SetHue(s));
                Engine.UI.Add(pickerGump);
            };
            item.AddChildren(allyMessageColor);

            text = new Label("Ally message color", true, 1)
            {
                X = 20
            };
            item.AddChildren(text);
            rightArea.AddChildren(item);
            AddChildren(rightArea, PAGE);
        }