2008-01-02 21:49:43 +00:00
|
|
|
|
|
|
|
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
|
|
|
* This program is released under GNU General Public License
|
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Namespaces
|
|
|
|
|
2007-09-30 19:37:57 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2008-01-02 21:49:43 +00:00
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Drawing;
|
2007-09-30 19:37:57 +00:00
|
|
|
using System.Text;
|
2008-01-02 21:49:43 +00:00
|
|
|
using CodeImp.DoomBuilder.Properties;
|
|
|
|
using System.IO;
|
|
|
|
using CodeImp.DoomBuilder.IO;
|
|
|
|
using System.Collections;
|
2007-09-30 19:37:57 +00:00
|
|
|
using System.Windows.Forms;
|
|
|
|
|
2008-01-02 21:49:43 +00:00
|
|
|
#endregion
|
|
|
|
|
2007-09-30 19:37:57 +00:00
|
|
|
namespace CodeImp.DoomBuilder.Controls
|
|
|
|
{
|
2008-01-02 21:49:43 +00:00
|
|
|
internal struct KeyControl
|
2007-09-30 19:37:57 +00:00
|
|
|
{
|
|
|
|
#region ================== Variables
|
|
|
|
|
|
|
|
public int key;
|
|
|
|
public string name;
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Constructor / Disposer
|
|
|
|
|
|
|
|
// Constructor
|
|
|
|
public KeyControl(Keys key, string name)
|
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
this.key = (int)key;
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor
|
|
|
|
public KeyControl(SpecialKeys key, string name)
|
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
this.key = (int)key;
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor
|
|
|
|
public KeyControl(int key, string name)
|
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
this.key = key;
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Methods
|
|
|
|
|
|
|
|
// Returns name
|
|
|
|
public override string ToString()
|
|
|
|
{
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|