private void BuildSpeech() { const int PAGE = 7; ScrollArea rightArea = new ScrollArea(190, 20, WIDTH - 210, 420, true); ScrollAreaItem item = new ScrollAreaItem(); _scaleSpeechDelay = new Checkbox(0x00D2, 0x00D3, "Scale speech delay by length", FONT, HUE_FONT, true) { IsChecked = Engine.Profile.Current.ScaleSpeechDelay }; item.Add(_scaleSpeechDelay); rightArea.Add(item); item = new ScrollAreaItem(); Label text = new Label("- Speech delay:", true, HUE_FONT, font: FONT); item.Add(text); _sliderSpeechDelay = new HSliderBar(100, 5, 150, 1, 1000, Engine.Profile.Current.SpeechDelay, HSliderBarStyle.MetalWidgetRecessedBar, true, FONT, HUE_FONT, true); item.Add(_sliderSpeechDelay); rightArea.Add(item); _speechColorPickerBox = CreateClickableColorBox(rightArea, 0, 30, Engine.Profile.Current.SpeechHue, "Speech color", 20, 30); _emoteColorPickerBox = CreateClickableColorBox(rightArea, 0, 0, Engine.Profile.Current.EmoteHue, "Emote color", 20, 0); _partyMessageColorPickerBox = CreateClickableColorBox(rightArea, 0, 0, Engine.Profile.Current.PartyMessageHue, "Party message color", 20, 0); _guildMessageColorPickerBox = CreateClickableColorBox(rightArea, 0, 0, Engine.Profile.Current.GuildMessageHue, "Guild message color", 20, 0); _allyMessageColorPickerBox = CreateClickableColorBox(rightArea, 0, 0, Engine.Profile.Current.AllyMessageHue, "Alliance message color", 20, 0); Add(rightArea, PAGE); }
private void BuildSounds() { const int PAGE = 2; ScrollArea rightArea = new ScrollArea(190, 60, 390, 380, true); _enableSounds = CreateCheckBox(rightArea, "Sounds", Engine.Profile.Current.EnableSound, 0, 0); ScrollAreaItem item = new ScrollAreaItem(); Label text = new Label("- Sounds volume:", true, 0, 0, 1); _soundsVolume = new HSliderBar(150, 5, 180, 0, 100, Engine.Profile.Current.SoundVolume, HSliderBarStyle.MetalWidgetRecessedBar, true, 1); item.Add(text); item.Add(_soundsVolume); rightArea.Add(item); _enableMusic = CreateCheckBox(rightArea, "Music", Engine.Profile.Current.EnableMusic, 0, 0); item = new ScrollAreaItem(); text = new Label("- Music volume:", true, 0, 0, 1); _musicVolume = new HSliderBar(150, 5, 180, 0, 100, Engine.Profile.Current.MusicVolume, HSliderBarStyle.MetalWidgetRecessedBar, true, 1); item.Add(text); item.Add(_musicVolume); rightArea.Add(item); _footStepsSound = CreateCheckBox(rightArea, "Footsteps sound", Engine.Profile.Current.EnableFootstepsSound, 0, 30); _combatMusic = CreateCheckBox(rightArea, "Combat music", Engine.Profile.Current.EnableCombatMusic, 0, 0); _musicInBackground = CreateCheckBox(rightArea, "Reproduce music when ClassicUO is not focused", Engine.Profile.Current.ReproduceSoundsInBackground, 0, 0); _loginMusic = CreateCheckBox(rightArea, "Login music", Engine.GlobalSettings.LoginMusic, 0, 40); item = new ScrollAreaItem(); text = new Label("- Login music volume:", true, 0, 0, 1); _loginMusicVolume = new HSliderBar(150, 5, 180, 0, 100, Engine.GlobalSettings.LoginMusicVolume, HSliderBarStyle.MetalWidgetRecessedBar, true, 1); item.Add(text); item.Add(_loginMusicVolume); rightArea.Add(item); Add(rightArea, PAGE); }
private ClickableColorBox CreateClickableColorBox(ScrollArea area, int x, int y, ushort hue, string text, int labelX, int labelY) { ScrollAreaItem item = new ScrollAreaItem(); uint color = 0xFF7F7F7F; if (hue != 0xFFFF) { color = FileManager.Hues.GetPolygoneColor(12, hue); } ClickableColorBox box = new ClickableColorBox(x, y, 13, 14, hue, color); item.Add(box); item.Add(new Label(text, true, HUE_FONT, font: FONT) { X = labelX, Y = labelY }); area.Add(item); return(box); }
private TextBox CreateInputField(ScrollAreaItem area, TextBox elem, string label = null) { area.Add(new ResizePic(0x0BB8) { X = elem.X - 10, Y = elem.Y - 5, Width = elem.Width + 10, Height = elem.Height - 7 }); area.Add(elem); if (label != null) { Label text = new Label(label, true, HUE_FONT, 0, FONT) { Y = elem.Y - 30 }; area.Add(text); } return(elem); }
private Checkbox CreateCheckBox(ScrollArea area, string text, bool ischecked, int x, int y) { Checkbox box = new Checkbox(0x00D2, 0x00D3, text, FONT, HUE_FONT, true) { IsChecked = ischecked }; if (x != 0) { ScrollAreaItem item = new ScrollAreaItem(); box.X = x; box.Y = y; item.Add(box); area.Add(item); } else { box.Y = y; area.Add(box); } return(box); }
public InfoGump(GameObject obj) : base(0, 0) { X = 200; Y = 200; CanMove = true; AcceptMouseInput = false; Add(new GameBorder(0, 0, WIDTH, HEIGHT, 4)); Add(new GumpPicTiled(4, 4, WIDTH - 8, HEIGHT - 8, 0x0A40) { IsTransparent = true, Alpha = 0.5f, }); Add(new GumpPicTiled(4, 4, WIDTH - 8, HEIGHT - 8, 0x0A40) { IsTransparent = true, Alpha = 0.5f, }); Add(new Label("Object Information", true, 1153, font: 3) { X = 20, Y = 20 }); Add(new Line(20, 50, WIDTH - 50, 1, 0xFFFFFFFF)); _scrollArea = new ScrollArea(20, 60, WIDTH - 40, 510, true) { AcceptMouseInput = true }; Add(_scrollArea); Dictionary <string, string> dict = ReflectionHolder.GetGameObjectProperties(obj); if (dict != null) { foreach (KeyValuePair <string, string> item in dict.OrderBy(s => s.Key)) { ScrollAreaItem areaItem = new ScrollAreaItem(); Label label = new Label(item.Key + ":", true, 33, font: 1, style: FontStyle.BlackBorder) { X = 2 }; areaItem.Add(label); int height = label.Height; label = new Label(item.Value, true, 1153, font: 1, style: FontStyle.BlackBorder, maxwidth: WIDTH - 65 - 200) { X = 200 }; if (label.Height > 0) { height = label.Height; } areaItem.Add(label); areaItem.Add(new Line(0, height + 2, WIDTH - 65, 1, Color.Gray.PackedValue)); _scrollArea.Add(areaItem); } } }
private void BuildVideo() { const int PAGE = 3; ScrollArea rightArea = new ScrollArea(190, 20, WIDTH - 210, 420, true); _debugControls = CreateCheckBox(rightArea, "Debugging mode", Engine.GlobalSettings.Debug, 0, 0); _zoom = CreateCheckBox(rightArea, "Enable in game zoom scaling", Engine.Profile.Current.EnableScaleZoom, 0, 0); _savezoom = CreateCheckBox(rightArea, "Save scale after close game", Engine.Profile.Current.SaveScaleAfterClose, 0, 0); _gameWindowFullsize = CreateCheckBox(rightArea, "Always use fullsize game window", Engine.Profile.Current.GameWindowFullSize, 0, 0); _enableDeathScreen = CreateCheckBox(rightArea, "Enable Death Screen", Engine.Profile.Current.EnableDeathScreen, 0, 0); _enableBlackWhiteEffect = CreateCheckBox(rightArea, "Black&White mode for dead player", Engine.Profile.Current.EnableBlackWhiteEffect, 0, 0); ScrollAreaItem item = new ScrollAreaItem(); Label text = new Label("- Status gump type:", true, HUE_FONT, 0, FONT) { Y = 30 }; item.Add(text); _shardType = new Combobox(text.Width + 20, text.Y, 100, new[] { "Modern", "Old", "Outlands" }) { SelectedIndex = Engine.GlobalSettings.ShardType }; item.Add(_shardType); rightArea.Add(item); item = new ScrollAreaItem(); _gameWindowWidth = CreateInputField(item, new TextBox(1, 5, 80, 80, false) { Text = Engine.Profile.Current.GameWindowSize.X.ToString(), X = 10, Y = 105, Width = 50, Height = 30, NumericOnly = true }, "Game Play Window Size: "); _gameWindowHeight = CreateInputField(item, new TextBox(1, 5, 80, 80, false) { Text = Engine.Profile.Current.GameWindowSize.Y.ToString(), X = 80, Y = 105, Width = 50, Height = 30, NumericOnly = true }); _gameWindowLock = new Checkbox(0x00D2, 0x00D3, "Lock game window moving/resizing", FONT, HUE_FONT, true) { X = 140, Y = 100, IsChecked = Engine.Profile.Current.GameWindowLock }; item.Add(_gameWindowLock); _gameWindowPositionX = CreateInputField(item, new TextBox(1, 5, 80, 80, false) { Text = Engine.Profile.Current.GameWindowPosition.X.ToString(), X = 10, Y = 160, Width = 50, Height = 30, NumericOnly = true }, "Game Play Window Position: "); _gameWindowPositionY = CreateInputField(item, new TextBox(1, 5, 80, 80, false) { Text = Engine.Profile.Current.GameWindowPosition.Y.ToString(), X = 80, Y = 160, Width = 50, Height = 30, NumericOnly = true }); rightArea.Add(item); Add(rightArea, PAGE); }
private void BuildGeneral() { const int PAGE = 1; ScrollArea rightArea = new ScrollArea(190, 20, WIDTH - 210, 420, true); // FPS ScrollAreaItem fpsItem = new ScrollAreaItem(); Label text = new Label("- FPS:", true, HUE_FONT, font: FONT); fpsItem.Add(text); _sliderFPS = new HSliderBar(80, 5, 250, 15, 250, Engine.Profile.Current.MaxFPS, HSliderBarStyle.MetalWidgetRecessedBar, true, FONT, HUE_FONT, true); fpsItem.Add(_sliderFPS); rightArea.Add(fpsItem); fpsItem = new ScrollAreaItem(); text = new Label("- Login FPS:", true, HUE_FONT, font: FONT); fpsItem.Add(text); _sliderFPSLogin = new HSliderBar(80, 5, 250, 15, 250, Engine.GlobalSettings.MaxLoginFPS, HSliderBarStyle.MetalWidgetRecessedBar, true, FONT, HUE_FONT, true); fpsItem.Add(_sliderFPSLogin); rightArea.Add(fpsItem); // Highlight _highlightObjects = CreateCheckBox(rightArea, "Highlight game objects", Engine.Profile.Current.HighlightGameObjects, 0, 10); //// smooth movements //_smoothMovements = new Checkbox(0x00D2, 0x00D3, "Smooth movements", 1) //{ // IsChecked = Engine.Profile.Current.SmoothMovements //}; //rightArea.AddChildren(_smoothMovements); _enablePathfind = CreateCheckBox(rightArea, "Enable pathfinding", Engine.Profile.Current.EnablePathfind, 0, 0); _alwaysRun = CreateCheckBox(rightArea, "Always run", Engine.Profile.Current.AlwaysRun, 0, 0); _preloadMaps = CreateCheckBox(rightArea, "Preload maps (it increases the RAM usage)", Engine.GlobalSettings.PreloadMaps, 0, 0); _enableTopbar = CreateCheckBox(rightArea, "Disable the Menu Bar", Engine.Profile.Current.TopbarGumpIsDisabled, 0, 0); _holdDownKeyTab = CreateCheckBox(rightArea, "Hold down TAB key for combat", Engine.Profile.Current.HoldDownKeyTab, 0, 0); // show % hp mobile ScrollAreaItem hpAreaItem = new ScrollAreaItem(); text = new Label("- Mobiles HP", true, HUE_FONT, font: FONT) { Y = 10 }; hpAreaItem.Add(text); _showHpMobile = new Checkbox(0x00D2, 0x00D3, "Show HP", FONT, HUE_FONT, true) { X = 25, Y = 30, IsChecked = Engine.Profile.Current.ShowMobilesHP }; hpAreaItem.Add(_showHpMobile); int mode = Engine.Profile.Current.MobileHPType; if (mode < 0 || mode > 2) { mode = 0; } _hpComboBox = new Combobox(200, 30, 150, new[] { "Percentage", "Line", "Both" }, mode); hpAreaItem.Add(_hpComboBox); rightArea.Add(hpAreaItem); // highlight character by flags ScrollAreaItem highlightByFlagsItem = new ScrollAreaItem(); text = new Label("- Mobiles status", true, HUE_FONT, font: FONT) { Y = 10 }; highlightByFlagsItem.Add(text); _highlightByState = new Checkbox(0x00D2, 0x00D3, "Highlight by state\n(poisoned, yellow hits, paralyzed)", FONT, HUE_FONT, true) { X = 25, Y = 30, IsChecked = Engine.Profile.Current.HighlightMobilesByFlags }; highlightByFlagsItem.Add(_highlightByState); rightArea.Add(highlightByFlagsItem); _drawRoofs = CreateCheckBox(rightArea, "Hide roofs", !Engine.Profile.Current.DrawRoofs, 0, 20); _treeToStumps = CreateCheckBox(rightArea, "Tree to stumps", Engine.Profile.Current.TreeToStumps, 0, 0); _hideVegetation = CreateCheckBox(rightArea, "Hide vegetation", Engine.Profile.Current.HideVegetation, 0, 0); _enableCaveBorder = CreateCheckBox(rightArea, "Marking cave tiles", Engine.Profile.Current.EnableCaveBorder, 0, 0); hpAreaItem = new ScrollAreaItem(); text = new Label("- Fields: ", true, HUE_FONT, font: FONT) { Y = 10, }; hpAreaItem.Add(text); _normalFields = new RadioButton(0, 0x00D0, 0x00D1, "Normal fields", FONT, HUE_FONT, true) { X = 25, Y = 30, IsChecked = Engine.Profile.Current.FieldsType == 0, }; hpAreaItem.Add(_normalFields); _staticFields = new RadioButton(0, 0x00D0, 0x00D1, "Static fields", FONT, HUE_FONT, true) { X = 25, Y = 30 + _normalFields.Height, IsChecked = Engine.Profile.Current.FieldsType == 1 }; hpAreaItem.Add(_staticFields); _fieldsToTile = new RadioButton(0, 0x00D0, 0x00D1, "Tile fields", FONT, HUE_FONT, true) { X = 25, Y = 30 + _normalFields.Height * 2, IsChecked = Engine.Profile.Current.FieldsType == 2 }; hpAreaItem.Add(_fieldsToTile); rightArea.Add(hpAreaItem); _noColorOutOfRangeObjects = CreateCheckBox(rightArea, "No color for object out of range", Engine.Profile.Current.NoColorObjectsOutOfRange, 0, 0); hpAreaItem = new ScrollAreaItem(); text = new Label("- Circle of Transparency:", true, HUE_FONT, font: FONT) { Y = 10 }; hpAreaItem.Add(text); _circleOfTranspRadius = new HSliderBar(160, 15, 100, Constants.MIN_CIRCLE_OF_TRANSPARENCY_RADIUS, Constants.MAX_CIRCLE_OF_TRANSPARENCY_RADIUS, Engine.Profile.Current.CircleOfTransparencyRadius, HSliderBarStyle.MetalWidgetRecessedBar, true, FONT, HUE_FONT, true); hpAreaItem.Add(_circleOfTranspRadius); _useCircleOfTransparency = new Checkbox(0x00D2, 0x00D3, "Enable circle of transparency", FONT, HUE_FONT, true) { X = 25, Y = 30, IsChecked = Engine.Profile.Current.UseCircleOfTransparency }; hpAreaItem.Add(_useCircleOfTransparency); rightArea.Add(hpAreaItem); Add(rightArea, PAGE); }
public OptionsGump1() : base(0, 0) { Add(new ResizePic(/*0x2436*/ /*0x2422*/ /*0x9C40*/ 9200 /*0x53*/ /*0xE10*/) { Width = 600, Height = 500 }); //AddChildren(new GameBorder(0, 0, 600, 400, 4)); //AddChildren(new GumpPicTiled(4, 4, 600 - 8, 400 - 8, 0x0A40) { IsTransparent = false}); //AddChildren(new ResizePic(0x2436) { X = 20, Y = 20, Width = 150, Height = 460 }); //AddChildren(new LeftButton() { X = 40, Y = 40 }); ScrollArea leftArea = new ScrollArea(10, 10, 160, 480, true); ScrollAreaItem item = new ScrollAreaItem(); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "General", 1, true, 14, 24) { Y = 30, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 1 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Sounds", 1, true, 14, 24) { Y = 30 * 2, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 2 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Video", 1, true, 14, 24) { Y = 30 * 3, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 3 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Commands", 1, true, 14, 24) { Y = 30 * 4, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 4 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Tooltip", 1, true, 14, 24) { Y = 30 * 5, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 5 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Fonts", 1, true, 14, 24) { Y = 30 * 6, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 6 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Speech", 1, true, 14, 24) { Y = 30 * 7, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 7 }); item.Add(new Button(0, 0x9C5, 0x9C5, 0x9C5, "Combat", 1, true, 14, 24) { Y = 30 * 8, FontCenter = true, ButtonAction = ButtonAction.SwitchPage, ToPage = 8 }); leftArea.Add(item); Add(leftArea); int offsetX = 60; int offsetY = 60; Add(new Button((int)Buttons.Cancel, 0x00F3, 0x00F1, 0x00F2) { X = 154 + offsetX, Y = 405 + offsetY, ButtonAction = ButtonAction.Activate }); Add(new Button((int)Buttons.Apply, 0x00EF, 0x00F0, 0x00EE) { X = 248 + offsetX, Y = 405 + offsetY, ButtonAction = ButtonAction.Activate }); Add(new Button((int)Buttons.Default, 0x00F6, 0x00F4, 0x00F5) { X = 346 + offsetX, Y = 405 + offsetY, ButtonAction = ButtonAction.Activate }); Add(new Button((int)Buttons.Ok, 0x00F9, 0x00F8, 0x00F7) { X = 443 + offsetX, Y = 405 + offsetY, ButtonAction = ButtonAction.Activate }); AcceptMouseInput = true; CanMove = true; BuildGeneral(); BuildSounds(); BuildVideo(); BuildCommands(); BuildFonts(); BuildSpeech(); BuildCombat(); BuildTooltip(); ChangePage(1); }
public InspectorGump(GameObject obj) : base(0, 0) { X = 200; Y = 100; _obj = obj; CanMove = true; AcceptMouseInput = false; CanCloseWithRightClick = true; Add(new BorderControl(0, 0, WIDTH, HEIGHT, 4)); Add(new GumpPicTiled(4, 4, WIDTH - 8, HEIGHT - 8, 0x0A40) { Alpha = 0.5f }); Add(new GumpPicTiled(4, 4, WIDTH - 8, HEIGHT - 8, 0x0A40) { Alpha = 0.5f }); Add(new Label("Object Information", true, 1153, font: 3) { X = 20, Y = 10 }); Add(new Line(20, 30, WIDTH - 50, 1, 0xFFFFFFFF)); Add(new NiceButton(WIDTH - 115, 5, 100, 25, ButtonAction.Activate, "Dump") { ButtonParameter = 0 }); _scrollArea = new ScrollArea(20, 35, WIDTH - 40, HEIGHT - 45, true) { AcceptMouseInput = true }; Add(_scrollArea); Dictionary <string, string> dict = ReflectionHolder.GetGameObjectProperties(obj); if (dict != null) { foreach (KeyValuePair <string, string> item in dict.OrderBy(s => s.Key)) { ScrollAreaItem areaItem = new ScrollAreaItem(); Label label = new Label(item.Key + ":", true, 33, font: 1, style: FontStyle.BlackBorder) { X = 2 }; areaItem.Add(label); int height = label.Height; label = new Label(item.Value, true, 1153, font: 1, style: FontStyle.BlackBorder, maxwidth: WIDTH - 65 - 200) { X = 200, AcceptMouseInput = true }; label.MouseUp += OnLabelClick; if (label.Height > 0) { height = label.Height; } areaItem.Add(label); areaItem.Add(new Line(0, height + 2, WIDTH - 65, 1, Color.Gray.PackedValue)); _scrollArea.Add(areaItem); } } }