mainform: playback: Add volume control
This commit is contained in:
Generated
+219
-280
File diff suppressed because it is too large
Load Diff
@@ -1095,6 +1095,9 @@ namespace BAKKA_Editor
|
||||
songFilePath = openSongDialog.FileName;
|
||||
songFileLabel.Text = songFilePath;
|
||||
currentSong = soundEngine.Play2D(songFilePath, true, true);
|
||||
/* Volume is represented as a float from 0-1. */
|
||||
currentSong.Volume = (float)trackBarVolume.Value / (float)trackBarVolume.Maximum;
|
||||
|
||||
songTrackBar.Value = 0;
|
||||
songTrackBar.Maximum = (int)currentSong.PlayLength;
|
||||
}
|
||||
@@ -1883,7 +1886,20 @@ namespace BAKKA_Editor
|
||||
opManager.Redo();
|
||||
}
|
||||
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
|
||||
private void trackBarVolume_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
/* No song, nothing to do. */
|
||||
if (currentSong == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
/* Volume is represented as a float from 0-1. */
|
||||
currentSong.Volume = (float) trackBarVolume.Value / (float) trackBarVolume.Maximum;
|
||||
circlePanel.Invalidate();
|
||||
}
|
||||
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
{
|
||||
var zoneWidth = noteViewGroupBox.Left - gimmickTypeGroupBox.Right - 12;
|
||||
var zoneHeight = playbackGroupBox.Top - gimmickTypeGroupBox.Top - 6;
|
||||
|
||||
Reference in New Issue
Block a user