diff options
| author | Jacob Palecki <[email protected]> | 2021-07-09 17:16:43 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-07-09 17:16:43 -0700 |
| commit | cc6d1e3722697b85773db57c516ebb6dbfda8edf (patch) | |
| tree | 67c58f5339d1da6e64abfd4e8fb942e6f65dbea5 | |
| parent | Add separate box for power in classic mode (diff) | |
| download | rawaccel-cc6d1e3722697b85773db57c516ebb6dbfda8edf.tar.xz rawaccel-cc6d1e3722697b85773db57c516ebb6dbfda8edf.zip | |
Small bugfix + add default text for LUT
| -rw-r--r-- | grapher/Models/AccelGUIFactory.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/Options/LUT/LUTPanelOptions.cs | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index d424d80..39119e7 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -385,7 +385,7 @@ namespace grapher.Models weightY, offsetY, limitY, - powerClassicX, + powerClassicY, exponentY, midpointY, lutTextY, diff --git a/grapher/Models/Options/LUT/LUTPanelOptions.cs b/grapher/Models/Options/LUT/LUTPanelOptions.cs index 6b13cdc..0d244b4 100644 --- a/grapher/Models/Options/LUT/LUTPanelOptions.cs +++ b/grapher/Models/Options/LUT/LUTPanelOptions.cs @@ -116,6 +116,11 @@ namespace grapher.Models.Options.LUT if (length > 0 && activePoints.First().x != 0) { ActiveValuesTextBox.Text = PointsToActiveValuesText(activePoints, length); + + if (string.IsNullOrWhiteSpace(PointsTextBox.Text)) + { + PointsTextBox.Text = PointsToEntryTextBoxText(activePoints, length); + } } else { @@ -213,5 +218,18 @@ namespace grapher.Models.Options.LUT return builder.ToString(); } + + private string PointsToEntryTextBoxText(IEnumerable<Vec2<float>> points, int length) + { + StringBuilder builder = new StringBuilder(); + + for(int i = 0; i < length; i++) + { + var point = points.ElementAt(i); + builder.Append($"{point.x},{point.y};"); + } + + return builder.ToString(); + } } } |