summaryrefslogtreecommitdiff
path: root/grapher/Models
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2021-07-09 17:16:43 -0700
committerJacob Palecki <[email protected]>2021-07-09 17:16:43 -0700
commitcc6d1e3722697b85773db57c516ebb6dbfda8edf (patch)
tree67c58f5339d1da6e64abfd4e8fb942e6f65dbea5 /grapher/Models
parentAdd separate box for power in classic mode (diff)
downloadrawaccel-cc6d1e3722697b85773db57c516ebb6dbfda8edf.tar.xz
rawaccel-cc6d1e3722697b85773db57c516ebb6dbfda8edf.zip
Small bugfix + add default text for LUT
Diffstat (limited to 'grapher/Models')
-rw-r--r--grapher/Models/AccelGUIFactory.cs2
-rw-r--r--grapher/Models/Options/LUT/LUTPanelOptions.cs18
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();
+ }
}
}