104 lines
3.0 KiB
C#
104 lines
3.0 KiB
C#
#region license
|
|
// This file is part of Vocaluxe.
|
|
//
|
|
// Vocaluxe is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Vocaluxe is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
|
#endregion
|
|
|
|
using System.Windows.Forms;
|
|
using Vocaluxe.Base;
|
|
using VocaluxeLib;
|
|
using VocaluxeLib.Menu;
|
|
|
|
namespace Vocaluxe.Screens
|
|
{
|
|
public class CScreenOptionsVideoAdjustments : CMenu
|
|
{
|
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
|
protected override int _ScreenVersion
|
|
{
|
|
get { return 1; }
|
|
}
|
|
|
|
private const string _ButtonExit = "ButtonExit";
|
|
|
|
public override void Init()
|
|
{
|
|
base.Init();
|
|
|
|
_ThemeButtons = new string[] {_ButtonExit};
|
|
}
|
|
|
|
public override bool HandleInput(SKeyEvent keyEvent)
|
|
{
|
|
base.HandleInput(keyEvent);
|
|
|
|
if (keyEvent.KeyPressed) {}
|
|
else
|
|
{
|
|
switch (keyEvent.Key)
|
|
{
|
|
case Keys.Escape:
|
|
case Keys.Back:
|
|
_SaveConfig();
|
|
CGraphics.FadeTo(EScreen.OptionsVideo);
|
|
break;
|
|
|
|
case Keys.S:
|
|
CParty.SetNormalGameMode();
|
|
_SaveConfig();
|
|
CGraphics.FadeTo(EScreen.Song);
|
|
break;
|
|
|
|
case Keys.Enter:
|
|
if (_Buttons[_ButtonExit].Selected)
|
|
{
|
|
_SaveConfig();
|
|
CGraphics.FadeTo(EScreen.OptionsVideo);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public override bool HandleMouse(SMouseEvent mouseEvent)
|
|
{
|
|
base.HandleMouse(mouseEvent);
|
|
|
|
if (mouseEvent.RB)
|
|
{
|
|
_SaveConfig();
|
|
CGraphics.FadeTo(EScreen.OptionsVideo);
|
|
}
|
|
|
|
if (mouseEvent.LB && _IsMouseOverCurSelection(mouseEvent))
|
|
{
|
|
_SaveConfig();
|
|
if (_Buttons[_ButtonExit].Selected)
|
|
CGraphics.FadeTo(EScreen.OptionsVideo);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public override bool UpdateGame()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
private void _SaveConfig()
|
|
{
|
|
CConfig.SaveConfig();
|
|
}
|
|
}
|
|
} |