mainform: playback: Move volume track position to mouse position on click

Allows for smoother volume control
This commit is contained in:
Farex-GH
2022-09-11 00:57:22 -07:00
parent 34ef4c594c
commit 641074edf2
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -1983,5 +1983,12 @@ namespace BAKKA_Editor
(songTrackBar.Maximum - songTrackBar.Minimum);
songTrackBar.Value = (int)val;
}
private void trackBarVolume_MouseDown(object sender, MouseEventArgs e)
{
float val = ((float)e.Location.Y / (float)trackBarVolume.Height) *
(trackBarVolume.Maximum - trackBarVolume.Minimum);
trackBarVolume.Value = (int)val;
}
}
}