private void OnDestroy() { BackBtn = null; PlayBtn = null; PauseBtn = null; NextBtn = null; VolumeBtn = null; FocusBtn = null; SettingBtn = null; VideoNameText = null; VolumeImages = null; PlayPBPanel = null; VolumePanel = null; SettingsPanel = null; PlayBtnHovrSprite = null; PlayBtnNorSprite = null; PauseBtnHovrSprite = null; PauseBtnNorSprite = null; PlayBtnChildImage = null; PauseBtnChildImage = null; ClickBackBtnCallback = null; ClickPlayBtnAndReplayCallback = null; ClickPlayBtnCallback = null; ClickPauseBtnCallback = null; ClickPreviousBtnCallback = null; ClickNextBtnCallback = null; PointerEnterUICallback = null; VolumeValueChangedByUICallback = null; }
public void Draw(GameTime time) { spriteBatch.Begin(); spriteBatch.Draw(background, new Rectangle(0, 0, (int)GameConstants.WINDOWSIZE.X, (int)GameConstants.WINDOWSIZE.Y), Color.White); MainPanel.Draw(spriteBatch); switch (State) { case SettingState.Difficulty: DifficultyPanel.Draw(spriteBatch); break; case SettingState.Volume: VolumePanel.Draw(spriteBatch); break; case SettingState.Controls: ControlsPanel.Draw(spriteBatch); break; } spriteBatch.End(); }