diff options
| author | Jacob Palecki <[email protected]> | 2020-08-20 14:22:14 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-08-20 14:22:14 -0700 |
| commit | 7dbeae9d4cf108e78072b356d832123f12e42a90 (patch) | |
| tree | 9711fddfb5241a3dc859cd421aa4937d38a8852f /grapher/Models/Options/AccelOptions.cs | |
| parent | Display active values (diff) | |
| download | rawaccel-7dbeae9d4cf108e78072b356d832123f12e42a90.tar.xz rawaccel-7dbeae9d4cf108e78072b356d832123f12e42a90.zip | |
Add accel type to active values and tweak color
Diffstat (limited to 'grapher/Models/Options/AccelOptions.cs')
| -rw-r--r-- | grapher/Models/Options/AccelOptions.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/grapher/Models/Options/AccelOptions.cs b/grapher/Models/Options/AccelOptions.cs index 8da873f..cd7c4e5 100644 --- a/grapher/Models/Options/AccelOptions.cs +++ b/grapher/Models/Options/AccelOptions.cs @@ -1,4 +1,5 @@ using grapher.Layouts; +using grapher.Models.Options; using System; using System.Collections.Generic; using System.Linq; @@ -31,7 +32,8 @@ namespace grapher ComboBox accelDropdown, Option[] options, OptionXY[] optionsXY, - Button writeButton) + Button writeButton, + ActiveValueLabel activeValueLabel) { AccelDropdown = accelDropdown; AccelDropdown.Items.Clear(); @@ -51,6 +53,7 @@ namespace grapher Options = options; OptionsXY = optionsXY; WriteButton = writeButton; + ActiveValueLabel = activeValueLabel; Layout("Default"); } @@ -61,10 +64,18 @@ namespace grapher public int AccelerationIndex { get; private set; } + public ActiveValueLabel ActiveValueLabel { get; } + public Option[] Options { get; } public OptionXY[] OptionsXY { get; } + public void SetActiveValue(int index) + { + var name = AccelerationTypes.Where(t => t.Value.Index == index).FirstOrDefault().Value.Name; + ActiveValueLabel.SetValue(name); + } + private void OnIndexChanged(object sender, EventArgs e) { var accelerationTypeString = AccelDropdown.SelectedItem.ToString(); |