public override void Draw(Rect rect) { var hGrid = rect.GetHGrid(GUIPlus.LargePadding, -1f, -1f); var l = new ListingPlus(); l.Begin(hGrid[1]); l.RangeSlider(Theme.RefreshRate); l.GapLine(); l.Gap(); l.Label(Lang.Get("Theme.HudPosition").Bold()); l.BoolToggle(Theme.HudDocked); l.RangeSlider(Theme.HudAnchor, !Theme.HudDocked.Value); l.RangeSliderEntry(Theme.HudOffsetX, ref _hudOffsetXText, 1, !Theme.HudDocked.Value); l.RangeSliderEntry(Theme.HudOffsetY, ref _hudOffsetYText, 2, !Theme.HudDocked.Value); l.GapLine(); l.Gap(); l.Label(Lang.Get("Theme.HudDimensions").Bold()); l.RangeSliderEntry(Theme.HudWidth, ref _hudWidthText, 3, !Theme.HudDocked.Value); l.RangeSliderEntry(Theme.HudHeight, ref _hudHeightText, 4, !Theme.HudDocked.Value); l.GapLine(); l.Gap(); l.Label(Lang.Get("Theme.InspectPane").Bold()); l.BoolToggle(Theme.InspectPaneTabModify); l.BoolToggle(Theme.InspectPaneTabAddLog, Theme.InspectPaneTabModify.Value && !Theme.HudDocked.Value); l.RangeSliderEntry(Theme.InspectPaneHeight, ref _inspectPaneHeightText, 5, Theme.InspectPaneTabModify.Value); l.RangeSlider(Theme.InspectPaneTabWidth, Theme.InspectPaneTabModify.Value); l.RangeSlider(Theme.InspectPaneMinTabs, Theme.InspectPaneTabModify.Value); l.End(); l.Begin(hGrid[2]); l.TextStyleEditor(Theme.RegularTextStyle); l.RangeSlider(Theme.LabelWidth); l.RangeSlider(Theme.ValueWidth); l.GapLine(); l.Gap(); l.TextStyleEditor(Theme.LargeTextStyle, !Theme.HudDocked.Value); l.GapLine(); l.Gap(); l.TextStyleEditor(Theme.SmallTextStyle); l.GapLine(); l.Gap(); l.Label(Lang.Get("Theme.OtherOptions").Bold()); l.BoolToggle(Theme.ShowDecimals); l.BoolToggle(Theme.LetterCompress); l.RangeSlider(Theme.LetterPadding, Theme.LetterCompress.Value); l.End(); }
public override void Draw(Rect rect) { var hGrid = rect.GetHGrid(GUIPlus.LargePadding, -1f, -1f); var l = new ListingPlus(); var selected = _selected; l.BeginScrollView(hGrid[1], ref _scrollPosition, ref _viewRect); l.Label(Lang.Get("Theme.HudColors").Bold()); l.GapLine(); l.ColorOptionSelect(Theme.MainTextColor, ref _selected); l.ColorOptionSelect(Theme.DisabledColor, ref _selected); l.ColorOptionSelect(Theme.CriticalColor, ref _selected); l.ColorOptionSelect(Theme.WarningColor, ref _selected); l.ColorOptionSelect(Theme.InfoColor, ref _selected); l.ColorOptionSelect(Theme.GoodColor, ref _selected); l.ColorOptionSelect(Theme.ExcellentColor, ref _selected); l.ColorOptionSelect(Theme.BarBackgroundColor, ref _selected); l.ColorOptionSelect(Theme.BarMainColor, ref _selected); l.ColorOptionSelect(Theme.BarLowColor, ref _selected); l.ColorOptionSelect(Theme.BarThresholdColor, ref _selected); l.ColorOptionSelect(Theme.SelectorTextColor, ref _selected); l.ColorOptionSelect(Theme.SelectorBackgroundColor, ref _selected); l.ColorOptionSelect(Theme.LineColor, ref _selected); l.Gap(); l.Label(Lang.Get("Theme.FactionColors").Bold()); l.GapLine(); l.ColorOptionSelect(Theme.FactionOwnColor, ref _selected); l.ColorOptionSelect(Theme.FactionAlliedColor, ref _selected); l.ColorOptionSelect(Theme.FactionIndependentColor, ref _selected); l.ColorOptionSelect(Theme.FactionHostileColor, ref _selected); l.ColorOptionSelect(Theme.FactionWildColor, ref _selected); l.Gap(); l.Label(Lang.Get("Theme.SkillColors").Bold()); l.GapLine(); l.ColorOptionSelect(Theme.SkillMinorPassionColor, ref _selected); l.ColorOptionSelect(Theme.SkillMajorPassionColor, ref _selected); l.Gap(); var hasBubbles = Mod_Bubbles.Instance.IsActive; l.Label(Lang.Get("Integration.Bubbles.Colors").Bold()); l.GapLine(); l.ColorOptionSelect(Mod_Bubbles.ForeColor, ref _selected, hasBubbles); l.ColorOptionSelect(Mod_Bubbles.BackColor, ref _selected, hasBubbles); l.ColorOptionSelect(Mod_Bubbles.SelectedForeColor, ref _selected, hasBubbles); l.ColorOptionSelect(Mod_Bubbles.SelectedBackColor, ref _selected, hasBubbles); l.EndScrollView(ref _viewRect); l.Begin(hGrid[2]); if (_selected != null) { if (_selected != selected) { ParseColor(); } l.Label(Lang.Get("Dialog_Config.Tab.Colors.Editor", _selected.Label).Bold()); l.GapLine(); l.RangeSliderEntry(_hue, ref _hueText, 1); l.RangeSliderEntry(_saturation, ref _saturationText, 2); l.RangeSliderEntry(_lightness, ref _lightnessText, 3); l.RangeSliderEntry(_alpha, ref _alphaText, 4); l.GapLine(); var newColor = Color.HSVToRGB(_hue.Value.ToPercentageFloat(), _saturation.Value.ToPercentageFloat(), _lightness.Value.ToPercentageFloat()); newColor.a = _alpha.Value.ToPercentageFloat(); _selected.Value = newColor; var sampleRect = l.GetRect(30f); Widgets.DrawBoxSolid(sampleRect, _selected.Value); } l.End(); }