2015-07-10 21:07:24 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Mesen.GUI.Config;
|
2016-12-11 14:25:29 -05:00
|
|
|
|
using Mesen.GUI.Controls;
|
2015-07-10 21:07:24 -04:00
|
|
|
|
|
|
|
|
|
namespace Mesen.GUI.Forms.Config
|
|
|
|
|
{
|
2016-12-11 14:25:29 -05:00
|
|
|
|
public partial class ctrlInputPortConfig : BaseControl
|
2015-07-10 21:07:24 -04:00
|
|
|
|
{
|
|
|
|
|
private ControllerInfo _controllerInfo;
|
|
|
|
|
|
|
|
|
|
public ctrlInputPortConfig()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Initialize(ControllerInfo controllerInfo)
|
|
|
|
|
{
|
|
|
|
|
_controllerInfo = controllerInfo;
|
2016-02-05 23:14:27 -05:00
|
|
|
|
//ctrlStandardController.Initialize(controllerInfo.Keys);
|
2015-07-10 21:07:24 -04:00
|
|
|
|
|
|
|
|
|
cboControllerType.SelectedIndex = (int)_controllerInfo.ControllerType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateConfig()
|
|
|
|
|
{
|
2016-02-05 23:14:27 -05:00
|
|
|
|
//_controllerInfo.Keys = ctrlStandardController.GetKeyMappings();
|
|
|
|
|
_controllerInfo.ControllerType = (InteropEmu.ControllerType)cboControllerType.SelectedIndex;
|
2015-07-10 21:07:24 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cboControllerType_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2016-02-05 23:14:27 -05:00
|
|
|
|
ctrlStandardController.Visible = ((InteropEmu.ControllerType)cboControllerType.SelectedIndex == InteropEmu.ControllerType.StandardController);
|
2015-07-10 21:07:24 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|