diff --git a/Penumbra/Configuration.cs b/Penumbra/Configuration.cs index b83bed55..0194444c 100644 --- a/Penumbra/Configuration.cs +++ b/Penumbra/Configuration.cs @@ -115,7 +115,10 @@ public class Configuration : IPluginConfiguration, ISavable, IService public bool AlwaysOpenDefaultImport { get; set; } = false; public bool KeepDefaultMetaChanges { get; set; } = false; public string DefaultModAuthor { get; set; } = DefaultTexToolsData.Author; - public bool EditRawTileTransforms { get; set; } = false; + + public bool EditRawTileTransforms { get; set; } = false; + public bool WholePairSelectorAlwaysHighlights { get; set; } = false; + public bool HdrRenderTargets { get; set; } = true; public Dictionary Colors { get; set; } diff --git a/Penumbra/UI/AdvancedWindow/Materials/MtrlTab.CommonColorTable.cs b/Penumbra/UI/AdvancedWindow/Materials/MtrlTab.CommonColorTable.cs index 80f8b7f7..0a1eee39 100644 --- a/Penumbra/UI/AdvancedWindow/Materials/MtrlTab.CommonColorTable.cs +++ b/Penumbra/UI/AdvancedWindow/Materials/MtrlTab.CommonColorTable.cs @@ -273,11 +273,13 @@ public partial class MtrlTab private void ColorTablePairHighlightButton(int pairIdx, bool disabled) { + var wholePairSelectorHighlight = (_config.WholePairSelectorAlwaysHighlights || Im.Io.KeyControl) && Im.Item.Hovered(); + ImEx.Icon.Button(LunaStyle.OnHoverIcon, "Highlight this pair of rows on your character, if possible.\n\nHighlight colors can be configured in Penumbra's settings."u8, disabled || _colorTablePreviewers.Count is 0); - if (Im.Item.Hovered()) + if (wholePairSelectorHighlight || Im.Item.Hovered()) HighlightColorTablePair(pairIdx); else if (_highlightedColorTablePair == pairIdx) CancelColorTableHighlight(); @@ -308,14 +310,14 @@ public partial class MtrlTab else { drawList.RectangleFilled( - rcMin, rcMax with { Y = float.Lerp(rcMin.Y, rcMax.Y, 1.0f / 3) }, + rcMin, rcMax with { Y = MathF.Floor(float.Lerp(rcMin.Y, rcMax.Y, 1.0f / 3)) }, topColor, frameRounding, ImDrawFlagsRectangle.RoundCornersTop); drawList.RectangleMulticolor( - rcMin with { Y = float.Lerp(rcMin.Y, rcMax.Y, 1.0f / 3) }, - rcMax with { Y = float.Lerp(rcMin.Y, rcMax.Y, 2.0f / 3) }, + rcMin with { Y = MathF.Floor(float.Lerp(rcMin.Y, rcMax.Y, 1.0f / 3)) }, + rcMax with { Y = MathF.Ceiling(float.Lerp(rcMin.Y, rcMax.Y, 2.0f / 3)) }, topColor, topColor, bottomColor, bottomColor); drawList.RectangleFilled( - rcMin with { Y = float.Lerp(rcMin.Y, rcMax.Y, 2.0f / 3) }, rcMax, + rcMin with { Y = MathF.Ceiling(float.Lerp(rcMin.Y, rcMax.Y, 2.0f / 3)) }, rcMax, bottomColor, frameRounding, ImDrawFlagsRectangle.RoundCornersTop); } diff --git a/Penumbra/UI/Tabs/SettingsTab.cs b/Penumbra/UI/Tabs/SettingsTab.cs index 9b38f8cb..900ec072 100644 --- a/Penumbra/UI/Tabs/SettingsTab.cs +++ b/Penumbra/UI/Tabs/SettingsTab.cs @@ -801,6 +801,10 @@ public sealed class SettingsTab : ITab Checkbox("Advanced Editing: Edit Raw Tile UV Transforms", "Edit the raw matrix components of tile UV transforms, instead of having them decomposed into scale, rotation and shear.", _config.EditRawTileTransforms, v => _config.EditRawTileTransforms = v); + + Checkbox("Advanced Editing: Always Highlight Color Row Pair when Hovering Selection Button", + "Make the whole color row pair selection button highlight the pair in game, instead of just the crosshair, even without holding Ctrl.", + _config.WholePairSelectorAlwaysHighlights, v => _config.WholePairSelectorAlwaysHighlights = v); } #endregion