public void OnRenderObject() { if (player != null && player.GetLength().Second != 0.0d) { componentGui.DrawSeekBar(new Rect(0.0f, GuiSettings.GuiSettingLoopEditor.seekbarTop, Screen.width, GuiStyleSet.StylePlayer.seekbar.fixedHeight), GuiStyleSet.StylePlayer.seekbar, ( float )(player.Loop.start / player.GetLength()), ( float )(player.Loop.end / player.GetLength()), ( float )player.PositionRate); } else { componentGui.DrawSeekBar(new Rect(0.0f, GuiSettings.GuiSettingLoopEditor.seekbarTop, Screen.width, GuiStyleSet.StylePlayer.seekbar.fixedHeight), GuiStyleSet.StylePlayer.seekbar, 0.0f, 0.0f, 0.0f); } float lWidthVolume = GuiStyleSet.StylePlayer.volumebar.fixedWidth; float lHeightVolume = GuiStyleSet.StylePlayer.volumebar.fixedHeight; //componentGui.DrawVolumeBar( new Rect( Screen.width / 2.0f - 280.0f, lY + GuiStyleSet.StylePlayer.seekbar.fixedHeight + 20.0f, lWidthVolume, lHeightVolume ), GuiStyleSet.StylePlayer.volumebar, player.Volume ); }
public void OnRenderObject() { float lHeightTitle = GuiStyleSet.StylePlayer.labelTitle.CalcSize(new GUIContent(title)).y + GuiStyleSet.StylePlayer.labelTitle.margin.top + GuiStyleSet.StylePlayer.labelTitle.margin.bottom; float lY = Rect.y + lHeightTitle; if (player != null && player.GetLength().Second != 0.0d) { float lWidth = GuiStyleSet.StylePlayer.seekbar.fixedWidth; float lHeight = GuiStyleSet.StylePlayer.seekbar.fixedHeight; componentGui.DrawSeekBar(new Rect(Screen.width / 2 - lWidth / 2, lY, lWidth, lHeight), GuiStyleSet.StylePlayer.seekbar, ( float )(player.Loop.start / player.GetLength()), ( float )(player.Loop.end / player.GetLength()), ( float )player.PositionRate); } else { float lWidth = GuiStyleSet.StylePlayer.seekbar.fixedWidth; float lHeight = GuiStyleSet.StylePlayer.seekbar.fixedHeight; componentGui.DrawSeekBar(new Rect(Screen.width / 2 - lWidth / 2, lY, lWidth, lHeight), GuiStyleSet.StylePlayer.seekbar, 0.0f, 0.0f, 0.0f); } float lYVolume = Rect.y + lHeightTitle + GuiStyleSet.StylePlayer.seekbar.fixedHeight + 18; float lWidthVolume = GuiStyleSet.StylePlayer.volumebar.fixedWidth; float lHeightVolume = GuiStyleSet.StylePlayer.volumebar.fixedHeight; //componentGui.DrawVolumeBar( new Rect( Screen.width / 2.0f - GuiStyleSet.StylePlayer.buttonPrevious.fixedWidth / 2.0f - GuiStyleSet.StylePlayer.toggleStartPause.fixedWidth - lWidthVolume, lYVolume, lWidthVolume, lHeightVolume ), GuiStyleSet.StylePlayer.volumebar, player.Volume ); }