public void SetVolumeByValue(float volume, PlayManager playManager) { SetVolumeByClick((int)(volume * Width), playManager); }
public void SetVolumeByClick(int mouseX, PlayManager playManager) { points[1].X = points[2].X = Math.Min(mouseX, Width); points[1].Y = Height - (int)(Math.Tan(Math.Atan2(Height, Width)) * points[1].X); playManager.Volume = Volume; }