UI: Input configuration
This commit is contained in:
parent
98408d7a4a
commit
bceb0394ef
36 changed files with 3043 additions and 157 deletions
|
@ -105,7 +105,9 @@ void Console::Run()
|
|||
|
||||
frameLimiter.ProcessFrame();
|
||||
frameLimiter.WaitForNextFrame();
|
||||
|
||||
|
||||
_controlManager->UpdateControlDevices();
|
||||
|
||||
double newFrameDelay = GetFrameDelay();
|
||||
if(newFrameDelay != frameDelay) {
|
||||
frameDelay = newFrameDelay;
|
||||
|
@ -189,6 +191,8 @@ void Console::LoadRom(VirtualFile romFile, VirtualFile patchFile)
|
|||
_rewindManager.reset(new RewindManager(shared_from_this()));
|
||||
_notificationManager->RegisterNotificationListener(_rewindManager);
|
||||
|
||||
_controlManager->UpdateControlDevices();
|
||||
|
||||
//if(_debugger) {
|
||||
//Reset debugger if it was running before
|
||||
//auto lock = _debuggerLock.AcquireSafe();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "ControlManager.h"
|
||||
#include "Console.h"
|
||||
#include "EmuSettings.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "KeyManager.h"
|
||||
#include "IKeyManager.h"
|
||||
|
@ -12,6 +13,7 @@
|
|||
ControlManager::ControlManager(shared_ptr<Console> console)
|
||||
{
|
||||
_console = console;
|
||||
_inputConfigVersion = -1;
|
||||
_pollCounter = 0;
|
||||
|
||||
UpdateControlDevices();
|
||||
|
@ -86,46 +88,20 @@ void ControlManager::RegisterControlDevice(shared_ptr<BaseControlDevice> control
|
|||
|
||||
ControllerType ControlManager::GetControllerType(uint8_t port)
|
||||
{
|
||||
return ControllerType::SnesController;
|
||||
//TODO _console->GetSettings()->GetControllerType(port);
|
||||
return _console->GetSettings()->GetInputConfig().Controllers[port].Type;
|
||||
}
|
||||
|
||||
shared_ptr<BaseControlDevice> ControlManager::CreateControllerDevice(ControllerType type, uint8_t port, shared_ptr<Console> console)
|
||||
{
|
||||
shared_ptr<BaseControlDevice> device;
|
||||
|
||||
KeyMappingSet keyMappings = {};
|
||||
if(port == 0) {
|
||||
keyMappings.Mapping1.Up = KeyManager::GetKeyCode("Pad1 Up");
|
||||
keyMappings.Mapping1.Down = KeyManager::GetKeyCode("Pad1 Down");
|
||||
keyMappings.Mapping1.Left = KeyManager::GetKeyCode("Pad1 Left");
|
||||
keyMappings.Mapping1.Right = KeyManager::GetKeyCode("Pad1 Right");
|
||||
keyMappings.Mapping1.A = KeyManager::GetKeyCode("Pad1 B");
|
||||
keyMappings.Mapping1.B = KeyManager::GetKeyCode("Pad1 A");
|
||||
keyMappings.Mapping1.X = KeyManager::GetKeyCode("Pad1 Y");
|
||||
keyMappings.Mapping1.Y = KeyManager::GetKeyCode("Pad1 X");
|
||||
keyMappings.Mapping1.L = KeyManager::GetKeyCode("Pad1 L1");
|
||||
keyMappings.Mapping1.R = KeyManager::GetKeyCode("Pad1 R1");
|
||||
keyMappings.Mapping1.Select = KeyManager::GetKeyCode("Pad1 Back");
|
||||
keyMappings.Mapping1.Start = KeyManager::GetKeyCode("Pad1 Start");
|
||||
|
||||
keyMappings.Mapping2.Up = KeyManager::GetKeyCode("Up Arrow");
|
||||
keyMappings.Mapping2.Down = KeyManager::GetKeyCode("Down Arrow");
|
||||
keyMappings.Mapping2.Left = KeyManager::GetKeyCode("Left Arrow");
|
||||
keyMappings.Mapping2.Right = KeyManager::GetKeyCode("Right Arrow");
|
||||
keyMappings.Mapping2.A = KeyManager::GetKeyCode("Z");
|
||||
keyMappings.Mapping2.B = KeyManager::GetKeyCode("X");
|
||||
keyMappings.Mapping2.X = KeyManager::GetKeyCode("S");
|
||||
keyMappings.Mapping2.Y = KeyManager::GetKeyCode("A");
|
||||
keyMappings.Mapping2.L = KeyManager::GetKeyCode("Q");
|
||||
keyMappings.Mapping2.R = KeyManager::GetKeyCode("W");
|
||||
keyMappings.Mapping2.Select = KeyManager::GetKeyCode("E");
|
||||
keyMappings.Mapping2.Start = KeyManager::GetKeyCode("D");
|
||||
}
|
||||
|
||||
InputConfig cfg = console->GetSettings()->GetInputConfig();
|
||||
|
||||
switch(type) {
|
||||
case ControllerType::None: break;
|
||||
case ControllerType::SnesController: device.reset(new SnesController(console, port, keyMappings)); break;
|
||||
case ControllerType::SnesController: device.reset(new SnesController(console, port, cfg.Controllers[port].Keys)); break;
|
||||
case ControllerType::SnesMouse: break;
|
||||
case ControllerType::SuperScope: break;
|
||||
}
|
||||
|
||||
return device;
|
||||
|
@ -133,13 +109,18 @@ shared_ptr<BaseControlDevice> ControlManager::CreateControllerDevice(ControllerT
|
|||
|
||||
void ControlManager::UpdateControlDevices()
|
||||
{
|
||||
auto lock = _deviceLock.AcquireSafe();
|
||||
_controlDevices.clear();
|
||||
uint32_t version = _console->GetSettings()->GetInputConfigVersion();
|
||||
if(_inputConfigVersion != version) {
|
||||
_inputConfigVersion = version;
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
shared_ptr<BaseControlDevice> device = CreateControllerDevice(GetControllerType(i), i, _console);
|
||||
if(device) {
|
||||
RegisterControlDevice(device);
|
||||
auto lock = _deviceLock.AcquireSafe();
|
||||
_controlDevices.clear();
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
shared_ptr<BaseControlDevice> device = CreateControllerDevice(GetControllerType(i), i, _console);
|
||||
if(device) {
|
||||
RegisterControlDevice(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +134,7 @@ void ControlManager::UpdateInputState()
|
|||
{
|
||||
KeyManager::RefreshKeyState();
|
||||
|
||||
//auto lock = _deviceLock.AcquireSafe();
|
||||
auto lock = _deviceLock.AcquireSafe();
|
||||
|
||||
string log = "";
|
||||
for(shared_ptr<BaseControlDevice> &device : _controlDevices) {
|
||||
|
|
|
@ -21,6 +21,7 @@ private:
|
|||
|
||||
//TODO: Static so that power cycle does not reset its value
|
||||
uint32_t _pollCounter;
|
||||
uint32_t _inputConfigVersion;
|
||||
|
||||
protected:
|
||||
shared_ptr<Console> _console;
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
#include "MessageManager.h"
|
||||
#include "../Utilities/FolderUtilities.h"
|
||||
|
||||
EmuSettings::EmuSettings()
|
||||
{
|
||||
_flags = 0;
|
||||
_inputConfigVersion = 0;
|
||||
}
|
||||
|
||||
uint32_t EmuSettings::GetVersion()
|
||||
{
|
||||
//0.1.0
|
||||
|
@ -39,6 +45,22 @@ AudioConfig EmuSettings::GetAudioConfig()
|
|||
return _audio;
|
||||
}
|
||||
|
||||
void EmuSettings::SetInputConfig(InputConfig config)
|
||||
{
|
||||
_input = config;
|
||||
_inputConfigVersion++;
|
||||
}
|
||||
|
||||
InputConfig EmuSettings::GetInputConfig()
|
||||
{
|
||||
return _input;
|
||||
}
|
||||
|
||||
uint32_t EmuSettings::GetInputConfigVersion()
|
||||
{
|
||||
return _inputConfigVersion;
|
||||
}
|
||||
|
||||
void EmuSettings::SetEmulationConfig(EmulationConfig config)
|
||||
{
|
||||
_emulation = config;
|
||||
|
|
|
@ -7,10 +7,12 @@ class EmuSettings
|
|||
private:
|
||||
VideoConfig _video;
|
||||
AudioConfig _audio;
|
||||
InputConfig _input;
|
||||
EmulationConfig _emulation;
|
||||
PreferencesConfig _preferences;
|
||||
|
||||
atomic<uint32_t> _flags;
|
||||
atomic<uint32_t> _inputConfigVersion;
|
||||
|
||||
string _audioDevice;
|
||||
string _saveFolder;
|
||||
|
@ -26,6 +28,7 @@ private:
|
|||
void SetShortcutKey(EmulatorShortcut shortcut, KeyCombination keyCombination, int keySetIndex);
|
||||
|
||||
public:
|
||||
EmuSettings();
|
||||
uint32_t GetVersion();
|
||||
|
||||
void SetVideoConfig(VideoConfig config);
|
||||
|
@ -34,6 +37,10 @@ public:
|
|||
void SetAudioConfig(AudioConfig config);
|
||||
AudioConfig GetAudioConfig();
|
||||
|
||||
void SetInputConfig(InputConfig config);
|
||||
InputConfig GetInputConfig();
|
||||
uint32_t GetInputConfigVersion();
|
||||
|
||||
void SetEmulationConfig(EmulationConfig config);
|
||||
EmulationConfig GetEmulationConfig();
|
||||
|
||||
|
|
|
@ -1340,7 +1340,7 @@ void Ppu::Write(uint32_t addr, uint8_t value)
|
|||
|
||||
case 0x2105:
|
||||
if(_bgMode != (value & 0x07)) {
|
||||
MessageManager::DisplayMessage("Debug", "Entering mode: " + std::to_string(value & 0x07) + " (SL: " + std::to_string(_scanline) + ")");
|
||||
MessageManager::Log("[Debug] Entering mode: " + std::to_string(value & 0x07) + " (SL: " + std::to_string(_scanline) + ")");
|
||||
}
|
||||
_bgMode = value & 0x07;
|
||||
_mode1Bg3Priority = (value & 0x08) != 0;
|
||||
|
|
|
@ -129,62 +129,12 @@ struct AudioConfig
|
|||
double Band20Gain = 0;
|
||||
};
|
||||
|
||||
enum class RamPowerOnState
|
||||
enum class ControllerType
|
||||
{
|
||||
AllZeros = 0,
|
||||
AllOnes = 1,
|
||||
Random = 2
|
||||
};
|
||||
|
||||
struct EmulationConfig
|
||||
{
|
||||
uint32_t EmulationSpeed = 100;
|
||||
uint32_t TurboSpeed = 300;
|
||||
uint32_t RewindSpeed = 100;
|
||||
|
||||
bool AllowInvalidInput = false;
|
||||
bool EnableRandomPowerOnState = false;
|
||||
|
||||
uint32_t PpuExtraScanlinesBeforeNmi = 0;
|
||||
uint32_t PpuExtraScanlinesAfterNmi = 0;
|
||||
|
||||
RamPowerOnState RamPowerOnState = RamPowerOnState::AllZeros;
|
||||
};
|
||||
|
||||
struct PreferencesConfig
|
||||
{
|
||||
bool ShowFps = false;
|
||||
bool ShowFrameCounter = false;
|
||||
bool ShowGameTimer = false;
|
||||
bool ShowDebugInfo = false;
|
||||
bool DisableOsd = false;
|
||||
|
||||
uint32_t RewindBufferSize = 600;
|
||||
|
||||
const char* SaveFolderOverride = nullptr;
|
||||
const char* SaveStateFolderOverride = nullptr;
|
||||
const char* ScreenshotFolderOverride = nullptr;
|
||||
};
|
||||
|
||||
struct OverscanDimensions
|
||||
{
|
||||
uint32_t Left = 0;
|
||||
uint32_t Right = 0;
|
||||
uint32_t Top = 0;
|
||||
uint32_t Bottom = 0;
|
||||
};
|
||||
|
||||
struct FrameInfo
|
||||
{
|
||||
uint32_t Width;
|
||||
uint32_t Height;
|
||||
};
|
||||
|
||||
struct ScreenSize
|
||||
{
|
||||
int32_t Width;
|
||||
int32_t Height;
|
||||
double Scale;
|
||||
None = 0,
|
||||
SnesController = 1,
|
||||
SnesMouse = 2,
|
||||
SuperScope = 3
|
||||
};
|
||||
|
||||
struct KeyMapping
|
||||
|
@ -258,6 +208,77 @@ struct KeyMappingSet
|
|||
}
|
||||
};
|
||||
|
||||
struct ControllerConfig
|
||||
{
|
||||
KeyMappingSet Keys;
|
||||
ControllerType Type = ControllerType::SnesController;
|
||||
};
|
||||
|
||||
struct InputConfig
|
||||
{
|
||||
ControllerConfig Controllers[4];
|
||||
uint32_t ControllerDeadzoneSize = 2;
|
||||
uint32_t MouseSensitivity = 1;
|
||||
};
|
||||
|
||||
enum class RamPowerOnState
|
||||
{
|
||||
AllZeros = 0,
|
||||
AllOnes = 1,
|
||||
Random = 2
|
||||
};
|
||||
|
||||
struct EmulationConfig
|
||||
{
|
||||
uint32_t EmulationSpeed = 100;
|
||||
uint32_t TurboSpeed = 300;
|
||||
uint32_t RewindSpeed = 100;
|
||||
|
||||
bool AllowInvalidInput = false;
|
||||
bool EnableRandomPowerOnState = false;
|
||||
|
||||
uint32_t PpuExtraScanlinesBeforeNmi = 0;
|
||||
uint32_t PpuExtraScanlinesAfterNmi = 0;
|
||||
|
||||
RamPowerOnState RamPowerOnState = RamPowerOnState::AllZeros;
|
||||
};
|
||||
|
||||
struct PreferencesConfig
|
||||
{
|
||||
bool ShowFps = false;
|
||||
bool ShowFrameCounter = false;
|
||||
bool ShowGameTimer = false;
|
||||
bool ShowDebugInfo = false;
|
||||
bool DisableOsd = false;
|
||||
|
||||
uint32_t RewindBufferSize = 600;
|
||||
|
||||
const char* SaveFolderOverride = nullptr;
|
||||
const char* SaveStateFolderOverride = nullptr;
|
||||
const char* ScreenshotFolderOverride = nullptr;
|
||||
};
|
||||
|
||||
struct OverscanDimensions
|
||||
{
|
||||
uint32_t Left = 0;
|
||||
uint32_t Right = 0;
|
||||
uint32_t Top = 0;
|
||||
uint32_t Bottom = 0;
|
||||
};
|
||||
|
||||
struct FrameInfo
|
||||
{
|
||||
uint32_t Width;
|
||||
uint32_t Height;
|
||||
};
|
||||
|
||||
struct ScreenSize
|
||||
{
|
||||
int32_t Width;
|
||||
int32_t Height;
|
||||
double Scale;
|
||||
};
|
||||
|
||||
enum class EmulatorShortcut
|
||||
{
|
||||
FastForward,
|
||||
|
@ -376,9 +397,3 @@ struct ShortcutKeyInfo
|
|||
EmulatorShortcut Shortcut;
|
||||
KeyCombination KeyCombination;
|
||||
};
|
||||
|
||||
enum class ControllerType
|
||||
{
|
||||
None = 0,
|
||||
SnesController = 1
|
||||
};
|
|
@ -9,11 +9,11 @@ private:
|
|||
uint32_t _stateBuffer = 0;
|
||||
|
||||
protected:
|
||||
enum Buttons { A = 0, B, Select, Start, Up, Down, Left, Right, Y, X, L, R };
|
||||
enum Buttons { A = 0, B, X, Y, L, R, Select, Start, Up, Down, Left, Right };
|
||||
|
||||
string GetKeyNames() override
|
||||
{
|
||||
return "ABSTUDLRYXLR";
|
||||
return "ABXYLRSTUDLR";
|
||||
}
|
||||
|
||||
void InternalSetStateFromInput() override
|
||||
|
@ -21,16 +21,16 @@ protected:
|
|||
for(KeyMapping keyMapping : _keyMappings) {
|
||||
SetPressedState(Buttons::A, keyMapping.A);
|
||||
SetPressedState(Buttons::B, keyMapping.B);
|
||||
SetPressedState(Buttons::X, keyMapping.X);
|
||||
SetPressedState(Buttons::Y, keyMapping.Y);
|
||||
SetPressedState(Buttons::L, keyMapping.L);
|
||||
SetPressedState(Buttons::R, keyMapping.R);
|
||||
SetPressedState(Buttons::Start, keyMapping.Start);
|
||||
SetPressedState(Buttons::Select, keyMapping.Select);
|
||||
SetPressedState(Buttons::Up, keyMapping.Up);
|
||||
SetPressedState(Buttons::Down, keyMapping.Down);
|
||||
SetPressedState(Buttons::Left, keyMapping.Left);
|
||||
SetPressedState(Buttons::Right, keyMapping.Right);
|
||||
SetPressedState(Buttons::X, keyMapping.X);
|
||||
SetPressedState(Buttons::Y, keyMapping.Y);
|
||||
SetPressedState(Buttons::L, keyMapping.L);
|
||||
SetPressedState(Buttons::R, keyMapping.R);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,12 @@ extern "C" {
|
|||
{
|
||||
_console->GetSettings()->SetAudioConfig(config);
|
||||
}
|
||||
|
||||
|
||||
DllExport void __stdcall SetInputConfig(InputConfig config)
|
||||
{
|
||||
_console->GetSettings()->SetInputConfig(config);
|
||||
}
|
||||
|
||||
DllExport void __stdcall SetEmulationConfig(EmulationConfig config)
|
||||
{
|
||||
_console->GetSettings()->SetEmulationConfig(config);
|
||||
|
|
|
@ -15,14 +15,16 @@ namespace Mesen.GUI.Config
|
|||
private bool _needToSave = false;
|
||||
|
||||
public string Version = "0.1.0";
|
||||
public RecentItems RecentFiles;
|
||||
public VideoConfig Video;
|
||||
public AudioConfig Audio;
|
||||
public InputConfig Input;
|
||||
public EmulationConfig Emulation;
|
||||
public PreferencesConfig Preferences;
|
||||
public DebugInfo Debug;
|
||||
public RecentItems RecentFiles;
|
||||
public Point? WindowLocation;
|
||||
public Size? WindowSize;
|
||||
public bool NeedInputReinit = true;
|
||||
|
||||
public Configuration()
|
||||
{
|
||||
|
@ -30,6 +32,7 @@ namespace Mesen.GUI.Config
|
|||
Debug = new DebugInfo();
|
||||
Video = new VideoConfig();
|
||||
Audio = new AudioConfig();
|
||||
Input = new InputConfig();
|
||||
Emulation = new EmulationConfig();
|
||||
Preferences = new PreferencesConfig();
|
||||
}
|
||||
|
@ -59,13 +62,19 @@ namespace Mesen.GUI.Config
|
|||
{
|
||||
Video.ApplyConfig();
|
||||
Audio.ApplyConfig();
|
||||
Preferences.ApplyConfig();
|
||||
Input.ApplyConfig();
|
||||
Emulation.ApplyConfig();
|
||||
Preferences.ApplyConfig();
|
||||
}
|
||||
|
||||
public void InitializeDefaults()
|
||||
{
|
||||
Preferences.InitializeDefaultShortcuts();
|
||||
if(NeedInputReinit) {
|
||||
Input.InitializeDefaults();
|
||||
NeedInputReinit = false;
|
||||
}
|
||||
ConfigManager.ApplyChanges();
|
||||
}
|
||||
|
||||
public static Configuration Deserialize(string configFile)
|
||||
|
|
132
UI/Config/InputConfig.cs
Normal file
132
UI/Config/InputConfig.cs
Normal file
|
@ -0,0 +1,132 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Mesen.GUI.Config
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class InputConfig
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||
public ControllerConfig[] Controllers = new ControllerConfig[5];
|
||||
|
||||
[MinMax(0, 4)] public UInt32 ControllerDeadzoneSize = 2;
|
||||
[MinMax(0, 3)] public UInt32 MouseSensitivity = 1;
|
||||
|
||||
public InputConfig()
|
||||
{
|
||||
}
|
||||
|
||||
public InputConfig Clone()
|
||||
{
|
||||
InputConfig cfg = (InputConfig)this.MemberwiseClone();
|
||||
cfg.Controllers = new ControllerConfig[5];
|
||||
for(int i = 0; i < 5; i++) {
|
||||
cfg.Controllers[i] = Controllers[i];
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
||||
public void ApplyConfig()
|
||||
{
|
||||
if(Controllers.Length != 5) {
|
||||
Controllers = new ControllerConfig[5];
|
||||
InitializeDefaults();
|
||||
}
|
||||
ConfigApi.SetInputConfig(this);
|
||||
}
|
||||
|
||||
public void InitializeDefaults()
|
||||
{
|
||||
KeyMapping m1 = new KeyMapping();
|
||||
m1.Up = InputApi.GetKeyCode("Pad1 Up");
|
||||
m1.Down = InputApi.GetKeyCode("Pad1 Down");
|
||||
m1.Left = InputApi.GetKeyCode("Pad1 Left");
|
||||
m1.Right = InputApi.GetKeyCode("Pad1 Right");
|
||||
m1.A = InputApi.GetKeyCode("Pad1 B");
|
||||
m1.B = InputApi.GetKeyCode("Pad1 A");
|
||||
m1.X = InputApi.GetKeyCode("Pad1 Y");
|
||||
m1.Y = InputApi.GetKeyCode("Pad1 X");
|
||||
m1.L = InputApi.GetKeyCode("Pad1 L1");
|
||||
m1.R = InputApi.GetKeyCode("Pad1 R1");
|
||||
m1.Select = InputApi.GetKeyCode("Pad1 Back");
|
||||
m1.Start = InputApi.GetKeyCode("Pad1 Start");
|
||||
|
||||
KeyMapping m2 = new KeyMapping();
|
||||
m2.Up = InputApi.GetKeyCode("Up Arrow");
|
||||
m2.Down = InputApi.GetKeyCode("Down Arrow");
|
||||
m2.Left = InputApi.GetKeyCode("Left Arrow");
|
||||
m2.Right = InputApi.GetKeyCode("Right Arrow");
|
||||
m2.A = InputApi.GetKeyCode("Z");
|
||||
m2.B = InputApi.GetKeyCode("X");
|
||||
m2.X = InputApi.GetKeyCode("S");
|
||||
m2.Y = InputApi.GetKeyCode("A");
|
||||
m2.L = InputApi.GetKeyCode("Q");
|
||||
m2.R = InputApi.GetKeyCode("W");
|
||||
m2.Select = InputApi.GetKeyCode("E");
|
||||
m2.Start = InputApi.GetKeyCode("D");
|
||||
|
||||
Controllers[0].Type = ControllerType.SnesController;
|
||||
Controllers[0].Keys.TurboSpeed = 2;
|
||||
Controllers[0].Keys.Mapping1 = m1;
|
||||
Controllers[0].Keys.Mapping2 = m2;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct KeyMapping
|
||||
{
|
||||
public UInt32 A;
|
||||
public UInt32 B;
|
||||
public UInt32 X;
|
||||
public UInt32 Y;
|
||||
public UInt32 L;
|
||||
public UInt32 R;
|
||||
public UInt32 Up;
|
||||
public UInt32 Down;
|
||||
public UInt32 Left;
|
||||
public UInt32 Right;
|
||||
public UInt32 Start;
|
||||
public UInt32 Select;
|
||||
|
||||
public UInt32 TurboA;
|
||||
public UInt32 TurboB;
|
||||
public UInt32 TurboX;
|
||||
public UInt32 TurboY;
|
||||
public UInt32 TurboL;
|
||||
public UInt32 TurboR;
|
||||
public UInt32 TurboSelect;
|
||||
public UInt32 TurboStart;
|
||||
|
||||
public KeyMapping Clone()
|
||||
{
|
||||
return (KeyMapping)this.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
public struct KeyMappingSet
|
||||
{
|
||||
public KeyMapping Mapping1;
|
||||
public KeyMapping Mapping2;
|
||||
public KeyMapping Mapping3;
|
||||
public KeyMapping Mapping4;
|
||||
public UInt32 TurboSpeed;
|
||||
}
|
||||
|
||||
public struct ControllerConfig
|
||||
{
|
||||
public KeyMappingSet Keys;
|
||||
public ControllerType Type;
|
||||
}
|
||||
|
||||
public enum ControllerType
|
||||
{
|
||||
None = 0,
|
||||
SnesController = 1,
|
||||
SnesMouse = 2,
|
||||
SuperScope = 3
|
||||
}
|
||||
}
|
|
@ -945,33 +945,9 @@
|
|||
<Enums>
|
||||
<Enum ID="ControllerType">
|
||||
<Value ID="None">None</Value>
|
||||
<Value ID="StandardController">Standard Controller</Value>
|
||||
<Value ID="Zapper">Zapper</Value>
|
||||
<Value ID="ArkanoidController">Arkanoid Controller</Value>
|
||||
<Value ID="SnesController">SNES Controller</Value>
|
||||
<Value ID="PowerPad">Power Pad</Value>
|
||||
<Value ID="SnesMouse">SNES Mouse</Value>
|
||||
<Value ID="SuborMouse">Subor Mouse</Value>
|
||||
</Enum>
|
||||
<Enum ID="ExpansionPortDevice">
|
||||
<Value ID="None">None</Value>
|
||||
<Value ID="Zapper">Zapper</Value>
|
||||
<Value ID="FourPlayerAdapter">Four Player Adapter</Value>
|
||||
<Value ID="ArkanoidController">Arkanoid Controller</Value>
|
||||
<Value ID="OekaKidsTablet">Oeka Kids Tablet</Value>
|
||||
<Value ID="FamilyTrainerMat">Family Trainer</Value>
|
||||
<Value ID="KonamiHyperShot">Konami Hyper Shot</Value>
|
||||
<Value ID="FamilyBasicKeyboard">Family Basic Keyboard</Value>
|
||||
<Value ID="PartyTap">Partytap</Value>
|
||||
<Value ID="Pachinko">Pachinko Controller</Value>
|
||||
<Value ID="ExcitingBoxing">Exciting Boxing Punching Bag</Value>
|
||||
<Value ID="JissenMahjong">Jissen Mahjong Controller</Value>
|
||||
<Value ID="SuborKeyboard">Subor Keyboard</Value>
|
||||
<Value ID="BarcodeBattler">Barcode Battler</Value>
|
||||
<Value ID="HoriTrack">Hori Track</Value>
|
||||
<Value ID="BandaiHyperShot">Bandai Hyper Shot</Value>
|
||||
<Value ID="AsciiTurboFile">Turbo File</Value>
|
||||
<Value ID="BattleBox">Battle Box</Value>
|
||||
<Value ID="SuperScope">Super Scope</Value>
|
||||
</Enum>
|
||||
<Enum ID="VideoAspectRatio">
|
||||
<Value ID="NoStretching">Default (No Stretching)</Value>
|
||||
|
|
|
@ -73,18 +73,11 @@ namespace Mesen.GUI.Forms
|
|||
{
|
||||
if(this.DialogResult == System.Windows.Forms.DialogResult.OK) {
|
||||
UpdateObject();
|
||||
if(ApplyChangesOnOK) {
|
||||
OnApply();
|
||||
}
|
||||
OnApply();
|
||||
}
|
||||
base.OnFormClosed(e);
|
||||
}
|
||||
|
||||
protected virtual bool ApplyChangesOnOK
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
protected virtual void OnApply()
|
||||
{
|
||||
}
|
||||
|
|
79
UI/Forms/Config/Controllers/BaseInputConfigControl.cs
Normal file
79
UI/Forms/Config/Controllers/BaseInputConfigControl.cs
Normal file
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Mesen.GUI.Config;
|
||||
using Mesen.GUI.Controls;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public class BaseInputConfigControl : BaseControl
|
||||
{
|
||||
public event EventHandler Change;
|
||||
protected HashSet<Button> _buttons = new HashSet<Button>();
|
||||
|
||||
public enum MappedKeyType
|
||||
{
|
||||
None,
|
||||
Keyboard,
|
||||
Controller
|
||||
}
|
||||
|
||||
public BaseInputConfigControl()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Initialize(KeyMapping mappings) { }
|
||||
public virtual void UpdateKeyMappings(ref KeyMapping mappings) { }
|
||||
|
||||
protected void InitButton(Button btn, UInt32 scanCode)
|
||||
{
|
||||
if(!_buttons.Contains(btn)) {
|
||||
_buttons.Add(btn);
|
||||
btn.Click += btnMapping_Click;
|
||||
btn.AutoEllipsis = true;
|
||||
}
|
||||
btn.Text = InputApi.GetKeyName(scanCode);
|
||||
btn.Tag = scanCode;
|
||||
}
|
||||
|
||||
protected void OnChange()
|
||||
{
|
||||
this.Change?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public MappedKeyType GetKeyType()
|
||||
{
|
||||
MappedKeyType keyType = MappedKeyType.None;
|
||||
foreach(Button btn in _buttons) {
|
||||
if((UInt32)btn.Tag > 0xFFFF) {
|
||||
return MappedKeyType.Controller;
|
||||
} else if((UInt32)btn.Tag > 0) {
|
||||
keyType = MappedKeyType.Keyboard;
|
||||
}
|
||||
}
|
||||
return keyType;
|
||||
}
|
||||
|
||||
public void ClearKeys()
|
||||
{
|
||||
foreach(Button btn in _buttons) {
|
||||
InitButton(btn, 0);
|
||||
}
|
||||
this.OnChange();
|
||||
}
|
||||
|
||||
protected void btnMapping_Click(object sender, EventArgs e)
|
||||
{
|
||||
using(frmGetKey frm = new frmGetKey(true)) {
|
||||
frm.ShowDialog();
|
||||
((Button)sender).Text = frm.ShortcutKey.ToString();
|
||||
((Button)sender).Tag = frm.ShortcutKey.Key1;
|
||||
}
|
||||
this.OnChange();
|
||||
}
|
||||
}
|
||||
}
|
105
UI/Forms/Config/Controllers/BaseInputConfigForm.cs
Normal file
105
UI/Forms/Config/Controllers/BaseInputConfigForm.cs
Normal file
|
@ -0,0 +1,105 @@
|
|||
using Mesen.GUI.Config;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public class BaseInputConfigForm : BaseConfigForm
|
||||
{
|
||||
private TabControl _tabMain;
|
||||
private KeyPresets _presets;
|
||||
protected ControllerConfig _config;
|
||||
|
||||
public ControllerConfig Config { get { return _config; } }
|
||||
|
||||
protected KeyPresets Presets
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_presets == null) {
|
||||
_presets = new KeyPresets();
|
||||
}
|
||||
return _presets;
|
||||
}
|
||||
}
|
||||
|
||||
public BaseInputConfigForm(ControllerConfig cfg)
|
||||
{
|
||||
_config = cfg;
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
ResourceHelper.ApplyResources(this, typeof(BaseInputConfigForm).Name);
|
||||
|
||||
base.OnLoad(e);
|
||||
}
|
||||
|
||||
protected override bool ValidateInput()
|
||||
{
|
||||
UpdateTabIcons();
|
||||
return base.ValidateInput();
|
||||
}
|
||||
|
||||
protected override void UpdateConfig()
|
||||
{
|
||||
UpdateKeyMappings();
|
||||
base.UpdateConfig();
|
||||
}
|
||||
|
||||
protected void SetMainTab(TabControl tabMain)
|
||||
{
|
||||
_tabMain = tabMain;
|
||||
}
|
||||
|
||||
protected BaseInputConfigControl GetControllerControl()
|
||||
{
|
||||
return GetControllerControl(_tabMain.SelectedTab);
|
||||
}
|
||||
|
||||
private BaseInputConfigControl GetControllerControl(TabPage tab)
|
||||
{
|
||||
return (BaseInputConfigControl)tab.Controls[0];
|
||||
}
|
||||
|
||||
private BaseInputConfigControl GetControllerControl(int index)
|
||||
{
|
||||
return GetControllerControl(_tabMain.Controls[index] as TabPage);
|
||||
}
|
||||
|
||||
private void UpdateTabIcon(TabPage tabPage)
|
||||
{
|
||||
int newIndex = (int)GetControllerControl(tabPage).GetKeyType() - 1;
|
||||
if(tabPage.ImageIndex != newIndex) {
|
||||
tabPage.ImageIndex = newIndex;
|
||||
}
|
||||
}
|
||||
|
||||
protected void UpdateTabIcons()
|
||||
{
|
||||
UpdateTabIcon(_tabMain.Controls[0] as TabPage);
|
||||
UpdateTabIcon(_tabMain.Controls[1] as TabPage);
|
||||
UpdateTabIcon(_tabMain.Controls[2] as TabPage);
|
||||
UpdateTabIcon(_tabMain.Controls[3] as TabPage);
|
||||
}
|
||||
|
||||
protected void ClearCurrentTab()
|
||||
{
|
||||
GetControllerControl().ClearKeys();
|
||||
}
|
||||
|
||||
protected void UpdateKeyMappings()
|
||||
{
|
||||
GetControllerControl(0).UpdateKeyMappings(ref _config.Keys.Mapping1);
|
||||
GetControllerControl(1).UpdateKeyMappings(ref _config.Keys.Mapping2);
|
||||
GetControllerControl(2).UpdateKeyMappings(ref _config.Keys.Mapping3);
|
||||
GetControllerControl(3).UpdateKeyMappings(ref _config.Keys.Mapping4);
|
||||
}
|
||||
}
|
||||
}
|
123
UI/Forms/Config/Controllers/BaseInputConfigForm.resx
Normal file
123
UI/Forms/Config/Controllers/BaseInputConfigForm.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
20
UI/Forms/Config/Controllers/ctrlKeyBindingHint.cs
Normal file
20
UI/Forms/Config/Controllers/ctrlKeyBindingHint.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
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;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public partial class ctrlKeyBindingHint : UserControl
|
||||
{
|
||||
public ctrlKeyBindingHint()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
111
UI/Forms/Config/Controllers/ctrlKeyBindingHint.designer.cs
generated
Normal file
111
UI/Forms/Config/Controllers/ctrlKeyBindingHint.designer.cs
generated
Normal file
|
@ -0,0 +1,111 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class ctrlKeyBindingHint
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.pnlHint = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblHint = new System.Windows.Forms.Label();
|
||||
this.picHint = new System.Windows.Forms.PictureBox();
|
||||
this.pnlHint.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picHint)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pnlHint
|
||||
//
|
||||
this.pnlHint.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.pnlHint.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pnlHint.Controls.Add(this.tableLayoutPanel1);
|
||||
this.pnlHint.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlHint.Location = new System.Drawing.Point(3, 0);
|
||||
this.pnlHint.Name = "pnlHint";
|
||||
this.pnlHint.Size = new System.Drawing.Size(441, 31);
|
||||
this.pnlHint.TabIndex = 6;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblHint, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.picHint, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(439, 29);
|
||||
this.tableLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// lblHint
|
||||
//
|
||||
this.lblHint.AutoSize = true;
|
||||
this.lblHint.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblHint.Location = new System.Drawing.Point(25, 0);
|
||||
this.lblHint.Name = "lblHint";
|
||||
this.lblHint.Size = new System.Drawing.Size(411, 29);
|
||||
this.lblHint.TabIndex = 1;
|
||||
this.lblHint.Text = "Tabs with an icon contain key bindings for this player.\r\nEach button can be mappe" +
|
||||
"d to up to 4 different keyboard keys or gamepad buttons.";
|
||||
//
|
||||
// picHint
|
||||
//
|
||||
this.picHint.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help;
|
||||
this.picHint.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.picHint.Location = new System.Drawing.Point(3, 5);
|
||||
this.picHint.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
|
||||
this.picHint.Name = "picHint";
|
||||
this.picHint.Size = new System.Drawing.Size(16, 16);
|
||||
this.picHint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.picHint.TabIndex = 0;
|
||||
this.picHint.TabStop = false;
|
||||
//
|
||||
// ctrlKeyBindingHint
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.pnlHint);
|
||||
this.Name = "ctrlKeyBindingHint";
|
||||
this.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||
this.Size = new System.Drawing.Size(447, 31);
|
||||
this.pnlHint.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picHint)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel pnlHint;
|
||||
private System.Windows.Forms.PictureBox picHint;
|
||||
private System.Windows.Forms.Label lblHint;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
}
|
||||
}
|
120
UI/Forms/Config/Controllers/ctrlKeyBindingHint.resx
Normal file
120
UI/Forms/Config/Controllers/ctrlKeyBindingHint.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
84
UI/Forms/Config/Controllers/ctrlStandardController.cs
Normal file
84
UI/Forms/Config/Controllers/ctrlStandardController.cs
Normal file
|
@ -0,0 +1,84 @@
|
|||
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;
|
||||
using Mesen.GUI.Controls;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public partial class ctrlStandardController : BaseInputConfigControl
|
||||
{
|
||||
public ctrlStandardController()
|
||||
{
|
||||
InitializeComponent();
|
||||
if(IsDesignMode) {
|
||||
return;
|
||||
}
|
||||
picBackground.Resize += picBackground_Resize;
|
||||
UpdateBackground();
|
||||
}
|
||||
|
||||
public int PortNumber { get; set; }
|
||||
|
||||
private void picBackground_Resize(object sender, EventArgs e)
|
||||
{
|
||||
this.BeginInvoke((Action)(()=> UpdateBackground()));
|
||||
}
|
||||
|
||||
public void UpdateBackground()
|
||||
{
|
||||
float xFactor = picBackground.Width / 585f;
|
||||
float yFactor = picBackground.Height / 253f;
|
||||
Bitmap bitmap = new Bitmap(picBackground.Width, picBackground.Height);
|
||||
using(Graphics g = Graphics.FromImage(bitmap)) {
|
||||
g.ScaleTransform(xFactor, yFactor);
|
||||
using(Pen pen = new Pen(Color.LightGray, 2f)) {
|
||||
g.DrawRectangle(pen, 1, 1, 585 - 4, 253 - 4);
|
||||
g.DrawEllipse(pen, 15, 55, 170, 170);
|
||||
g.FillEllipse(Brushes.WhiteSmoke, 370, 35, 210, 210);
|
||||
}
|
||||
}
|
||||
picBackground.Image = bitmap;
|
||||
}
|
||||
|
||||
public override void Initialize(KeyMapping mappings)
|
||||
{
|
||||
InitButton(btnA, mappings.A);
|
||||
InitButton(btnB, mappings.B);
|
||||
InitButton(btnStart, mappings.Start);
|
||||
InitButton(btnSelect, mappings.Select);
|
||||
InitButton(btnUp, mappings.Up);
|
||||
InitButton(btnDown, mappings.Down);
|
||||
InitButton(btnLeft, mappings.Left);
|
||||
InitButton(btnRight, mappings.Right);
|
||||
InitButton(btnX, mappings.X);
|
||||
InitButton(btnY, mappings.Y);
|
||||
InitButton(btnL, mappings.L);
|
||||
InitButton(btnR, mappings.R);
|
||||
|
||||
this.OnChange();
|
||||
}
|
||||
|
||||
public override void UpdateKeyMappings(ref KeyMapping mappings)
|
||||
{
|
||||
mappings.A = (UInt32)btnA.Tag;
|
||||
mappings.B = (UInt32)btnB.Tag;
|
||||
mappings.Start = (UInt32)btnStart.Tag;
|
||||
mappings.Select = (UInt32)btnSelect.Tag;
|
||||
mappings.Up = (UInt32)btnUp.Tag;
|
||||
mappings.Down = (UInt32)btnDown.Tag;
|
||||
mappings.Left = (UInt32)btnLeft.Tag;
|
||||
mappings.Right = (UInt32)btnRight.Tag;
|
||||
mappings.X = (UInt32)btnX.Tag;
|
||||
mappings.Y = (UInt32)btnY.Tag;
|
||||
mappings.L = (UInt32)btnL.Tag;
|
||||
mappings.R = (UInt32)btnR.Tag;
|
||||
}
|
||||
}
|
||||
}
|
325
UI/Forms/Config/Controllers/ctrlStandardController.designer.cs
generated
Normal file
325
UI/Forms/Config/Controllers/ctrlStandardController.designer.cs
generated
Normal file
|
@ -0,0 +1,325 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class ctrlStandardController
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.lblL = new System.Windows.Forms.Label();
|
||||
this.lblR = new System.Windows.Forms.Label();
|
||||
this.btnL = new System.Windows.Forms.Button();
|
||||
this.btnR = new System.Windows.Forms.Button();
|
||||
this.lblB = new System.Windows.Forms.Label();
|
||||
this.lblA = new System.Windows.Forms.Label();
|
||||
this.lblX = new System.Windows.Forms.Label();
|
||||
this.lblY = new System.Windows.Forms.Label();
|
||||
this.lblStart = new System.Windows.Forms.Label();
|
||||
this.lblSelect = new System.Windows.Forms.Label();
|
||||
this.btnY = new System.Windows.Forms.Button();
|
||||
this.btnRight = new System.Windows.Forms.Button();
|
||||
this.btnSelect = new System.Windows.Forms.Button();
|
||||
this.btnLeft = new System.Windows.Forms.Button();
|
||||
this.btnX = new System.Windows.Forms.Button();
|
||||
this.btnB = new System.Windows.Forms.Button();
|
||||
this.btnStart = new System.Windows.Forms.Button();
|
||||
this.btnUp = new System.Windows.Forms.Button();
|
||||
this.btnDown = new System.Windows.Forms.Button();
|
||||
this.btnA = new System.Windows.Forms.Button();
|
||||
this.picBackground = new System.Windows.Forms.PictureBox();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picBackground)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.lblL);
|
||||
this.panel2.Controls.Add(this.lblR);
|
||||
this.panel2.Controls.Add(this.btnL);
|
||||
this.panel2.Controls.Add(this.btnR);
|
||||
this.panel2.Controls.Add(this.lblB);
|
||||
this.panel2.Controls.Add(this.lblA);
|
||||
this.panel2.Controls.Add(this.lblX);
|
||||
this.panel2.Controls.Add(this.lblY);
|
||||
this.panel2.Controls.Add(this.lblStart);
|
||||
this.panel2.Controls.Add(this.lblSelect);
|
||||
this.panel2.Controls.Add(this.btnY);
|
||||
this.panel2.Controls.Add(this.btnRight);
|
||||
this.panel2.Controls.Add(this.btnSelect);
|
||||
this.panel2.Controls.Add(this.btnLeft);
|
||||
this.panel2.Controls.Add(this.btnX);
|
||||
this.panel2.Controls.Add(this.btnB);
|
||||
this.panel2.Controls.Add(this.btnStart);
|
||||
this.panel2.Controls.Add(this.btnUp);
|
||||
this.panel2.Controls.Add(this.btnDown);
|
||||
this.panel2.Controls.Add(this.btnA);
|
||||
this.panel2.Controls.Add(this.picBackground);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(585, 253);
|
||||
this.panel2.TabIndex = 3;
|
||||
//
|
||||
// lblL
|
||||
//
|
||||
this.lblL.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblL.Location = new System.Drawing.Point(186, 12);
|
||||
this.lblL.Name = "lblL";
|
||||
this.lblL.Size = new System.Drawing.Size(60, 18);
|
||||
this.lblL.TabIndex = 34;
|
||||
this.lblL.Text = "L";
|
||||
this.lblL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblR
|
||||
//
|
||||
this.lblR.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblR.Location = new System.Drawing.Point(337, 12);
|
||||
this.lblR.Name = "lblR";
|
||||
this.lblR.Size = new System.Drawing.Size(62, 18);
|
||||
this.lblR.TabIndex = 33;
|
||||
this.lblR.Text = "R";
|
||||
this.lblR.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnL
|
||||
//
|
||||
this.btnL.Location = new System.Drawing.Point(21, 8);
|
||||
this.btnL.Name = "btnL";
|
||||
this.btnL.Size = new System.Drawing.Size(159, 26);
|
||||
this.btnL.TabIndex = 32;
|
||||
this.btnL.Text = "L";
|
||||
this.btnL.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnR
|
||||
//
|
||||
this.btnR.Location = new System.Drawing.Point(405, 8);
|
||||
this.btnR.Name = "btnR";
|
||||
this.btnR.Size = new System.Drawing.Size(159, 26);
|
||||
this.btnR.TabIndex = 31;
|
||||
this.btnR.Text = "R";
|
||||
this.btnR.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblB
|
||||
//
|
||||
this.lblB.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.lblB.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblB.Location = new System.Drawing.Point(444, 223);
|
||||
this.lblB.Name = "lblB";
|
||||
this.lblB.Size = new System.Drawing.Size(62, 18);
|
||||
this.lblB.TabIndex = 29;
|
||||
this.lblB.Text = "B";
|
||||
this.lblB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblA
|
||||
//
|
||||
this.lblA.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.lblA.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblA.Location = new System.Drawing.Point(507, 161);
|
||||
this.lblA.Name = "lblA";
|
||||
this.lblA.Size = new System.Drawing.Size(61, 18);
|
||||
this.lblA.TabIndex = 28;
|
||||
this.lblA.Text = "A";
|
||||
this.lblA.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblX
|
||||
//
|
||||
this.lblX.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.lblX.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblX.Location = new System.Drawing.Point(444, 104);
|
||||
this.lblX.Name = "lblX";
|
||||
this.lblX.Size = new System.Drawing.Size(62, 18);
|
||||
this.lblX.TabIndex = 27;
|
||||
this.lblX.Text = "X";
|
||||
this.lblX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblY
|
||||
//
|
||||
this.lblY.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.lblY.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblY.Location = new System.Drawing.Point(377, 161);
|
||||
this.lblY.Name = "lblY";
|
||||
this.lblY.Size = new System.Drawing.Size(65, 18);
|
||||
this.lblY.TabIndex = 26;
|
||||
this.lblY.Text = "Y";
|
||||
this.lblY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblStart
|
||||
//
|
||||
this.lblStart.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblStart.Location = new System.Drawing.Point(283, 193);
|
||||
this.lblStart.Name = "lblStart";
|
||||
this.lblStart.Size = new System.Drawing.Size(73, 18);
|
||||
this.lblStart.TabIndex = 25;
|
||||
this.lblStart.Text = "Start";
|
||||
this.lblStart.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblSelect
|
||||
//
|
||||
this.lblSelect.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblSelect.Location = new System.Drawing.Point(201, 193);
|
||||
this.lblSelect.Name = "lblSelect";
|
||||
this.lblSelect.Size = new System.Drawing.Size(73, 18);
|
||||
this.lblSelect.TabIndex = 24;
|
||||
this.lblSelect.Text = "Select";
|
||||
this.lblSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnY
|
||||
//
|
||||
this.btnY.Location = new System.Drawing.Point(380, 110);
|
||||
this.btnY.Name = "btnY";
|
||||
this.btnY.Size = new System.Drawing.Size(61, 50);
|
||||
this.btnY.TabIndex = 21;
|
||||
this.btnY.Text = "B";
|
||||
this.btnY.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnRight
|
||||
//
|
||||
this.btnRight.Location = new System.Drawing.Point(105, 125);
|
||||
this.btnRight.Name = "btnRight";
|
||||
this.btnRight.Size = new System.Drawing.Size(69, 35);
|
||||
this.btnRight.TabIndex = 16;
|
||||
this.btnRight.Text = "Right";
|
||||
this.btnRight.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnSelect.Location = new System.Drawing.Point(201, 154);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(73, 37);
|
||||
this.btnSelect.TabIndex = 12;
|
||||
this.btnSelect.Text = "Q";
|
||||
this.btnSelect.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnLeft
|
||||
//
|
||||
this.btnLeft.Location = new System.Drawing.Point(27, 125);
|
||||
this.btnLeft.Name = "btnLeft";
|
||||
this.btnLeft.Size = new System.Drawing.Size(69, 35);
|
||||
this.btnLeft.TabIndex = 17;
|
||||
this.btnLeft.Text = "Left";
|
||||
this.btnLeft.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnX
|
||||
//
|
||||
this.btnX.Location = new System.Drawing.Point(444, 52);
|
||||
this.btnX.Name = "btnX";
|
||||
this.btnX.Size = new System.Drawing.Size(61, 50);
|
||||
this.btnX.TabIndex = 20;
|
||||
this.btnX.Text = "A";
|
||||
this.btnX.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnB
|
||||
//
|
||||
this.btnB.Location = new System.Drawing.Point(444, 172);
|
||||
this.btnB.Name = "btnB";
|
||||
this.btnB.Size = new System.Drawing.Size(61, 50);
|
||||
this.btnB.TabIndex = 15;
|
||||
this.btnB.Text = "B";
|
||||
this.btnB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnStart
|
||||
//
|
||||
this.btnStart.Location = new System.Drawing.Point(283, 154);
|
||||
this.btnStart.Name = "btnStart";
|
||||
this.btnStart.Size = new System.Drawing.Size(73, 37);
|
||||
this.btnStart.TabIndex = 13;
|
||||
this.btnStart.Text = "W";
|
||||
this.btnStart.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnUp
|
||||
//
|
||||
this.btnUp.Location = new System.Drawing.Point(61, 69);
|
||||
this.btnUp.Name = "btnUp";
|
||||
this.btnUp.Size = new System.Drawing.Size(79, 35);
|
||||
this.btnUp.TabIndex = 18;
|
||||
this.btnUp.Text = "Up";
|
||||
this.btnUp.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnDown
|
||||
//
|
||||
this.btnDown.Location = new System.Drawing.Point(61, 178);
|
||||
this.btnDown.Name = "btnDown";
|
||||
this.btnDown.Size = new System.Drawing.Size(79, 35);
|
||||
this.btnDown.TabIndex = 19;
|
||||
this.btnDown.Text = "Down";
|
||||
this.btnDown.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnA
|
||||
//
|
||||
this.btnA.Location = new System.Drawing.Point(507, 110);
|
||||
this.btnA.Name = "btnA";
|
||||
this.btnA.Size = new System.Drawing.Size(61, 50);
|
||||
this.btnA.TabIndex = 14;
|
||||
this.btnA.Text = "A";
|
||||
this.btnA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// picBackground
|
||||
//
|
||||
this.picBackground.Location = new System.Drawing.Point(0, 0);
|
||||
this.picBackground.Name = "picBackground";
|
||||
this.picBackground.Size = new System.Drawing.Size(585, 253);
|
||||
this.picBackground.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.picBackground.TabIndex = 30;
|
||||
this.picBackground.TabStop = false;
|
||||
//
|
||||
// ctrlStandardController
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Name = "ctrlStandardController";
|
||||
this.Size = new System.Drawing.Size(585, 253);
|
||||
this.panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picBackground)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Button btnY;
|
||||
private System.Windows.Forms.Button btnRight;
|
||||
private System.Windows.Forms.Button btnSelect;
|
||||
private System.Windows.Forms.Button btnX;
|
||||
private System.Windows.Forms.Button btnB;
|
||||
private System.Windows.Forms.Button btnStart;
|
||||
private System.Windows.Forms.Button btnUp;
|
||||
private System.Windows.Forms.Button btnDown;
|
||||
private System.Windows.Forms.Button btnA;
|
||||
private System.Windows.Forms.Button btnLeft;
|
||||
private System.Windows.Forms.Label lblB;
|
||||
private System.Windows.Forms.Label lblA;
|
||||
private System.Windows.Forms.Label lblX;
|
||||
private System.Windows.Forms.Label lblY;
|
||||
private System.Windows.Forms.Label lblStart;
|
||||
private System.Windows.Forms.Label lblSelect;
|
||||
private System.Windows.Forms.PictureBox picBackground;
|
||||
private System.Windows.Forms.Label lblL;
|
||||
private System.Windows.Forms.Label lblR;
|
||||
private System.Windows.Forms.Button btnL;
|
||||
private System.Windows.Forms.Button btnR;
|
||||
}
|
||||
}
|
120
UI/Forms/Config/Controllers/ctrlStandardController.resx
Normal file
120
UI/Forms/Config/Controllers/ctrlStandardController.resx
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
96
UI/Forms/Config/Controllers/frmControllerConfig.cs
Normal file
96
UI/Forms/Config/Controllers/frmControllerConfig.cs
Normal file
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Mesen.GUI.Config;
|
||||
using Mesen.GUI.Controls;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public partial class frmControllerConfig : BaseInputConfigForm
|
||||
{
|
||||
private int _portNumber;
|
||||
|
||||
public frmControllerConfig(ControllerConfig cfg, int portNumber) : base(cfg)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if(!this.DesignMode) {
|
||||
_portNumber = portNumber;
|
||||
SetMainTab(this.tabMain);
|
||||
|
||||
//AddBinding("TurboSpeed", trkTurboSpeed);
|
||||
|
||||
ctrlController0.Initialize(cfg.Keys.Mapping1);
|
||||
ctrlController1.Initialize(cfg.Keys.Mapping2);
|
||||
ctrlController2.Initialize(cfg.Keys.Mapping3);
|
||||
ctrlController3.Initialize(cfg.Keys.Mapping4);
|
||||
|
||||
ctrlController0.PortNumber = portNumber;
|
||||
ctrlController1.PortNumber = portNumber;
|
||||
ctrlController2.PortNumber = portNumber;
|
||||
ctrlController3.PortNumber = portNumber;
|
||||
|
||||
this.btnSelectPreset.Image = BaseControl.DownArrow;
|
||||
|
||||
ResourceHelper.ApplyResources(this, mnuStripPreset);
|
||||
this.Text += ": " + ResourceHelper.GetMessage("PlayerNumber", (portNumber + 1).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearCurrentTab();
|
||||
}
|
||||
|
||||
private void btnSelectPreset_Click(object sender, EventArgs e)
|
||||
{
|
||||
mnuStripPreset.Show(btnSelectPreset.PointToScreen(new Point(0, btnSelectPreset.Height-1)));
|
||||
}
|
||||
|
||||
private void mnuWasdLayout_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.WasdLayout);
|
||||
}
|
||||
|
||||
private void mnuArrowLayout_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.ArrowLayout);
|
||||
}
|
||||
|
||||
private void mnuXboxLayout1_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.XboxLayout1);
|
||||
}
|
||||
|
||||
private void mnuXboxLayout2_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.XboxLayout2);
|
||||
}
|
||||
|
||||
private void mnuPs4Layout1_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.Ps4Layout1);
|
||||
}
|
||||
|
||||
private void mnuPs4Layout2_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.Ps4Layout2);
|
||||
}
|
||||
|
||||
private void mnuSnes30Layout1_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.Snes30Layout1);
|
||||
}
|
||||
|
||||
private void mnuSnes30Layout2_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.Snes30Layout2);
|
||||
}
|
||||
}
|
||||
}
|
503
UI/Forms/Config/Controllers/frmControllerConfig.designer.cs
generated
Normal file
503
UI/Forms/Config/Controllers/frmControllerConfig.designer.cs
generated
Normal file
|
@ -0,0 +1,503 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class frmControllerConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmControllerConfig));
|
||||
this.tabMain = new System.Windows.Forms.TabControl();
|
||||
this.tpgSet1 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlController0 = new Mesen.GUI.Forms.Config.ctrlStandardController();
|
||||
this.tpgSet2 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlController1 = new Mesen.GUI.Forms.Config.ctrlStandardController();
|
||||
this.tpgSet3 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlController2 = new Mesen.GUI.Forms.Config.ctrlStandardController();
|
||||
this.tpgSet4 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlController3 = new Mesen.GUI.Forms.Config.ctrlStandardController();
|
||||
this.imageList = new System.Windows.Forms.ImageList(this.components);
|
||||
this.btnClear = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tlpStandardController = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.lblTurboFast = new System.Windows.Forms.Label();
|
||||
this.lblSlow = new System.Windows.Forms.Label();
|
||||
this.trkTurboSpeed = new System.Windows.Forms.TrackBar();
|
||||
this.lblTurboSpeed = new System.Windows.Forms.Label();
|
||||
this.btnSelectPreset = new System.Windows.Forms.Button();
|
||||
this.mnuStripPreset = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuKeyboard = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuWasdLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuArrowLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuXboxController = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuXboxLayout1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuXboxLayout2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPs4Controller = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPs4Layout1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuPs4Layout2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSnes30Controller = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSnes30Layout1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuSnes30Layout2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ctrlKeyBindingHint1 = new Mesen.GUI.Forms.Config.ctrlKeyBindingHint();
|
||||
this.baseConfigPanel.SuspendLayout();
|
||||
this.tabMain.SuspendLayout();
|
||||
this.tpgSet1.SuspendLayout();
|
||||
this.tpgSet2.SuspendLayout();
|
||||
this.tpgSet3.SuspendLayout();
|
||||
this.tpgSet4.SuspendLayout();
|
||||
this.flowLayoutPanel2.SuspendLayout();
|
||||
this.tlpMain.SuspendLayout();
|
||||
this.tlpStandardController.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trkTurboSpeed)).BeginInit();
|
||||
this.mnuStripPreset.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Controls.Add(this.flowLayoutPanel2);
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 360);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(599, 29);
|
||||
this.baseConfigPanel.Controls.SetChildIndex(this.flowLayoutPanel2, 0);
|
||||
//
|
||||
// tabMain
|
||||
//
|
||||
this.tabMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tlpMain.SetColumnSpan(this.tabMain, 3);
|
||||
this.tabMain.Controls.Add(this.tpgSet1);
|
||||
this.tabMain.Controls.Add(this.tpgSet2);
|
||||
this.tabMain.Controls.Add(this.tpgSet3);
|
||||
this.tabMain.Controls.Add(this.tpgSet4);
|
||||
this.tabMain.ImageList = this.imageList;
|
||||
this.tabMain.Location = new System.Drawing.Point(3, 3);
|
||||
this.tabMain.Name = "tabMain";
|
||||
this.tabMain.SelectedIndex = 0;
|
||||
this.tabMain.Size = new System.Drawing.Size(593, 277);
|
||||
this.tabMain.TabIndex = 3;
|
||||
//
|
||||
// tpgSet1
|
||||
//
|
||||
this.tpgSet1.Controls.Add(this.ctrlController0);
|
||||
this.tpgSet1.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet1.Name = "tpgSet1";
|
||||
this.tpgSet1.Size = new System.Drawing.Size(585, 250);
|
||||
this.tpgSet1.TabIndex = 0;
|
||||
this.tpgSet1.Text = "Key Set #1";
|
||||
this.tpgSet1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlStandardController0
|
||||
//
|
||||
this.ctrlController0.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlController0.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlController0.Name = "ctrlStandardController0";
|
||||
this.ctrlController0.PortNumber = 0;
|
||||
this.ctrlController0.Size = new System.Drawing.Size(585, 250);
|
||||
this.ctrlController0.TabIndex = 0;
|
||||
//
|
||||
// tpgSet2
|
||||
//
|
||||
this.tpgSet2.Controls.Add(this.ctrlController1);
|
||||
this.tpgSet2.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet2.Name = "tpgSet2";
|
||||
this.tpgSet2.Size = new System.Drawing.Size(585, 252);
|
||||
this.tpgSet2.TabIndex = 1;
|
||||
this.tpgSet2.Text = "Key Set #2";
|
||||
this.tpgSet2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlStandardController1
|
||||
//
|
||||
this.ctrlController1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlController1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlController1.Name = "ctrlStandardController1";
|
||||
this.ctrlController1.PortNumber = 0;
|
||||
this.ctrlController1.Size = new System.Drawing.Size(585, 252);
|
||||
this.ctrlController1.TabIndex = 1;
|
||||
//
|
||||
// tpgSet3
|
||||
//
|
||||
this.tpgSet3.Controls.Add(this.ctrlController2);
|
||||
this.tpgSet3.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet3.Name = "tpgSet3";
|
||||
this.tpgSet3.Size = new System.Drawing.Size(585, 252);
|
||||
this.tpgSet3.TabIndex = 2;
|
||||
this.tpgSet3.Text = "Key Set #3";
|
||||
this.tpgSet3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlStandardController2
|
||||
//
|
||||
this.ctrlController2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlController2.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlController2.Name = "ctrlStandardController2";
|
||||
this.ctrlController2.PortNumber = 0;
|
||||
this.ctrlController2.Size = new System.Drawing.Size(585, 252);
|
||||
this.ctrlController2.TabIndex = 1;
|
||||
//
|
||||
// tpgSet4
|
||||
//
|
||||
this.tpgSet4.Controls.Add(this.ctrlController3);
|
||||
this.tpgSet4.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet4.Name = "tpgSet4";
|
||||
this.tpgSet4.Size = new System.Drawing.Size(585, 252);
|
||||
this.tpgSet4.TabIndex = 3;
|
||||
this.tpgSet4.Text = "Key Set #4";
|
||||
this.tpgSet4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlStandardController3
|
||||
//
|
||||
this.ctrlController3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlController3.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlController3.Name = "ctrlStandardController3";
|
||||
this.ctrlController3.PortNumber = 0;
|
||||
this.ctrlController3.Size = new System.Drawing.Size(585, 252);
|
||||
this.ctrlController3.TabIndex = 1;
|
||||
//
|
||||
// imageList
|
||||
//
|
||||
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
|
||||
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList.Images.SetKeyName(0, "Keyboard");
|
||||
this.imageList.Images.SetKeyName(1, "Controller");
|
||||
//
|
||||
// btnClear
|
||||
//
|
||||
this.btnClear.AutoSize = true;
|
||||
this.btnClear.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnClear.Name = "btnClear";
|
||||
this.btnClear.Size = new System.Drawing.Size(105, 23);
|
||||
this.btnClear.TabIndex = 3;
|
||||
this.btnClear.Text = "Clear Key Bindings";
|
||||
this.btnClear.UseVisualStyleBackColor = true;
|
||||
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
|
||||
//
|
||||
// flowLayoutPanel2
|
||||
//
|
||||
this.flowLayoutPanel2.Controls.Add(this.btnClear);
|
||||
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(264, 29);
|
||||
this.flowLayoutPanel2.TabIndex = 5;
|
||||
//
|
||||
// tlpMain
|
||||
//
|
||||
this.tlpMain.ColumnCount = 3;
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.Controls.Add(this.tabMain, 0, 1);
|
||||
this.tlpMain.Controls.Add(this.tlpStandardController, 0, 2);
|
||||
this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpMain.Location = new System.Drawing.Point(0, 31);
|
||||
this.tlpMain.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tlpMain.Name = "tlpMain";
|
||||
this.tlpMain.RowCount = 3;
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tlpMain.Size = new System.Drawing.Size(599, 329);
|
||||
this.tlpMain.TabIndex = 23;
|
||||
//
|
||||
// tlpStandardController
|
||||
//
|
||||
this.tlpStandardController.ColumnCount = 3;
|
||||
this.tlpMain.SetColumnSpan(this.tlpStandardController, 3);
|
||||
this.tlpStandardController.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpStandardController.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpStandardController.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpStandardController.Controls.Add(this.panel1, 2, 1);
|
||||
this.tlpStandardController.Controls.Add(this.trkTurboSpeed, 2, 0);
|
||||
this.tlpStandardController.Controls.Add(this.lblTurboSpeed, 1, 0);
|
||||
this.tlpStandardController.Controls.Add(this.btnSelectPreset, 0, 0);
|
||||
this.tlpStandardController.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpStandardController.Location = new System.Drawing.Point(0, 283);
|
||||
this.tlpStandardController.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tlpStandardController.Name = "tlpStandardController";
|
||||
this.tlpStandardController.RowCount = 2;
|
||||
this.tlpStandardController.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
|
||||
this.tlpStandardController.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpStandardController.Size = new System.Drawing.Size(599, 46);
|
||||
this.tlpStandardController.TabIndex = 6;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.lblTurboFast);
|
||||
this.panel1.Controls.Add(this.lblSlow);
|
||||
this.panel1.Location = new System.Drawing.Point(476, 32);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(120, 14);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// lblTurboFast
|
||||
//
|
||||
this.lblTurboFast.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblTurboFast.Location = new System.Drawing.Point(70, 0);
|
||||
this.lblTurboFast.Name = "lblTurboFast";
|
||||
this.lblTurboFast.Size = new System.Drawing.Size(47, 15);
|
||||
this.lblTurboFast.TabIndex = 1;
|
||||
this.lblTurboFast.Text = "Fast";
|
||||
this.lblTurboFast.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
this.lblTurboFast.Visible = false;
|
||||
//
|
||||
// lblSlow
|
||||
//
|
||||
this.lblSlow.AutoSize = true;
|
||||
this.lblSlow.Location = new System.Drawing.Point(3, 0);
|
||||
this.lblSlow.Name = "lblSlow";
|
||||
this.lblSlow.Size = new System.Drawing.Size(30, 13);
|
||||
this.lblSlow.TabIndex = 0;
|
||||
this.lblSlow.Text = "Slow";
|
||||
this.lblSlow.Visible = false;
|
||||
//
|
||||
// trkTurboSpeed
|
||||
//
|
||||
this.trkTurboSpeed.LargeChange = 2;
|
||||
this.trkTurboSpeed.Location = new System.Drawing.Point(479, 3);
|
||||
this.trkTurboSpeed.Maximum = 3;
|
||||
this.trkTurboSpeed.Name = "trkTurboSpeed";
|
||||
this.trkTurboSpeed.Size = new System.Drawing.Size(117, 26);
|
||||
this.trkTurboSpeed.TabIndex = 0;
|
||||
this.trkTurboSpeed.Visible = false;
|
||||
//
|
||||
// lblTurboSpeed
|
||||
//
|
||||
this.lblTurboSpeed.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblTurboSpeed.AutoSize = true;
|
||||
this.lblTurboSpeed.Location = new System.Drawing.Point(401, 9);
|
||||
this.lblTurboSpeed.Name = "lblTurboSpeed";
|
||||
this.lblTurboSpeed.Size = new System.Drawing.Size(72, 13);
|
||||
this.lblTurboSpeed.TabIndex = 1;
|
||||
this.lblTurboSpeed.Text = "Turbo Speed:";
|
||||
this.lblTurboSpeed.Visible = false;
|
||||
//
|
||||
// btnSelectPreset
|
||||
//
|
||||
this.btnSelectPreset.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.btnSelectPreset.AutoSize = true;
|
||||
this.btnSelectPreset.Image = global::Mesen.GUI.Properties.Resources.DownArrow;
|
||||
this.btnSelectPreset.Location = new System.Drawing.Point(3, 4);
|
||||
this.btnSelectPreset.Name = "btnSelectPreset";
|
||||
this.btnSelectPreset.Size = new System.Drawing.Size(105, 23);
|
||||
this.btnSelectPreset.TabIndex = 4;
|
||||
this.btnSelectPreset.Text = "Select Preset...";
|
||||
this.btnSelectPreset.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
|
||||
this.btnSelectPreset.UseVisualStyleBackColor = true;
|
||||
this.btnSelectPreset.Click += new System.EventHandler(this.btnSelectPreset_Click);
|
||||
//
|
||||
// mnuStripPreset
|
||||
//
|
||||
this.mnuStripPreset.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuKeyboard,
|
||||
this.toolStripMenuItem1,
|
||||
this.mnuXboxController,
|
||||
this.mnuPs4Controller,
|
||||
this.mnuSnes30Controller});
|
||||
this.mnuStripPreset.Name = "mnuStripPreset";
|
||||
this.mnuStripPreset.Size = new System.Drawing.Size(170, 98);
|
||||
//
|
||||
// mnuKeyboard
|
||||
//
|
||||
this.mnuKeyboard.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuWasdLayout,
|
||||
this.mnuArrowLayout});
|
||||
this.mnuKeyboard.Name = "mnuKeyboard";
|
||||
this.mnuKeyboard.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuKeyboard.Text = "Keyboard";
|
||||
//
|
||||
// mnuWasdLayout
|
||||
//
|
||||
this.mnuWasdLayout.Name = "mnuWasdLayout";
|
||||
this.mnuWasdLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuWasdLayout.Text = "WASD Layout";
|
||||
this.mnuWasdLayout.Click += new System.EventHandler(this.mnuWasdLayout_Click);
|
||||
//
|
||||
// mnuArrowLayout
|
||||
//
|
||||
this.mnuArrowLayout.Name = "mnuArrowLayout";
|
||||
this.mnuArrowLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuArrowLayout.Text = "Arrow Keys Layout";
|
||||
this.mnuArrowLayout.Click += new System.EventHandler(this.mnuArrowLayout_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(166, 6);
|
||||
//
|
||||
// mnuXboxController
|
||||
//
|
||||
this.mnuXboxController.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuXboxLayout1,
|
||||
this.mnuXboxLayout2});
|
||||
this.mnuXboxController.Name = "mnuXboxController";
|
||||
this.mnuXboxController.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuXboxController.Text = "Xbox Controller";
|
||||
//
|
||||
// mnuXboxLayout1
|
||||
//
|
||||
this.mnuXboxLayout1.Name = "mnuXboxLayout1";
|
||||
this.mnuXboxLayout1.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuXboxLayout1.Text = "Controller #1";
|
||||
this.mnuXboxLayout1.Click += new System.EventHandler(this.mnuXboxLayout1_Click);
|
||||
//
|
||||
// mnuXboxLayout2
|
||||
//
|
||||
this.mnuXboxLayout2.Name = "mnuXboxLayout2";
|
||||
this.mnuXboxLayout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuXboxLayout2.Text = "Controller #2";
|
||||
this.mnuXboxLayout2.Click += new System.EventHandler(this.mnuXboxLayout2_Click);
|
||||
//
|
||||
// mnuPs4Controller
|
||||
//
|
||||
this.mnuPs4Controller.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuPs4Layout1,
|
||||
this.mnuPs4Layout2});
|
||||
this.mnuPs4Controller.Name = "mnuPs4Controller";
|
||||
this.mnuPs4Controller.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuPs4Controller.Text = "PS4 Controller";
|
||||
//
|
||||
// mnuPs4Layout1
|
||||
//
|
||||
this.mnuPs4Layout1.Name = "mnuPs4Layout1";
|
||||
this.mnuPs4Layout1.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuPs4Layout1.Text = "Controller #1";
|
||||
this.mnuPs4Layout1.Click += new System.EventHandler(this.mnuPs4Layout1_Click);
|
||||
//
|
||||
// mnuPs4Layout2
|
||||
//
|
||||
this.mnuPs4Layout2.Name = "mnuPs4Layout2";
|
||||
this.mnuPs4Layout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuPs4Layout2.Text = "Controller #2";
|
||||
this.mnuPs4Layout2.Click += new System.EventHandler(this.mnuPs4Layout2_Click);
|
||||
//
|
||||
// mnuSnes30Controller
|
||||
//
|
||||
this.mnuSnes30Controller.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuSnes30Layout1,
|
||||
this.mnuSnes30Layout2});
|
||||
this.mnuSnes30Controller.Name = "mnuSnes30Controller";
|
||||
this.mnuSnes30Controller.Size = new System.Drawing.Size(169, 22);
|
||||
this.mnuSnes30Controller.Text = "SNES30 Controller";
|
||||
//
|
||||
// mnuSnes30Layout1
|
||||
//
|
||||
this.mnuSnes30Layout1.Name = "mnuSnes30Layout1";
|
||||
this.mnuSnes30Layout1.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuSnes30Layout1.Text = "Controller #1";
|
||||
this.mnuSnes30Layout1.Click += new System.EventHandler(this.mnuSnes30Layout1_Click);
|
||||
//
|
||||
// mnuSnes30Layout2
|
||||
//
|
||||
this.mnuSnes30Layout2.Name = "mnuSnes30Layout2";
|
||||
this.mnuSnes30Layout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuSnes30Layout2.Text = "Controller #2";
|
||||
this.mnuSnes30Layout2.Click += new System.EventHandler(this.mnuSnes30Layout2_Click);
|
||||
//
|
||||
// ctrlKeyBindingHint1
|
||||
//
|
||||
this.ctrlKeyBindingHint1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.ctrlKeyBindingHint1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlKeyBindingHint1.Name = "ctrlKeyBindingHint1";
|
||||
this.ctrlKeyBindingHint1.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||
this.ctrlKeyBindingHint1.Size = new System.Drawing.Size(599, 31);
|
||||
this.ctrlKeyBindingHint1.TabIndex = 24;
|
||||
//
|
||||
// frmControllerConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(599, 391);
|
||||
this.Controls.Add(this.tlpMain);
|
||||
this.Controls.Add(this.ctrlKeyBindingHint1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "frmControllerConfig";
|
||||
this.Text = "Standard Controller";
|
||||
this.Controls.SetChildIndex(this.ctrlKeyBindingHint1, 0);
|
||||
this.Controls.SetChildIndex(this.baseConfigPanel, 0);
|
||||
this.Controls.SetChildIndex(this.tlpMain, 0);
|
||||
this.baseConfigPanel.ResumeLayout(false);
|
||||
this.tabMain.ResumeLayout(false);
|
||||
this.tpgSet1.ResumeLayout(false);
|
||||
this.tpgSet2.ResumeLayout(false);
|
||||
this.tpgSet3.ResumeLayout(false);
|
||||
this.tpgSet4.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.PerformLayout();
|
||||
this.tlpMain.ResumeLayout(false);
|
||||
this.tlpStandardController.ResumeLayout(false);
|
||||
this.tlpStandardController.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.trkTurboSpeed)).EndInit();
|
||||
this.mnuStripPreset.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||
private System.Windows.Forms.Button btnClear;
|
||||
private System.Windows.Forms.TabControl tabMain;
|
||||
private System.Windows.Forms.TabPage tpgSet1;
|
||||
private System.Windows.Forms.TabPage tpgSet2;
|
||||
private System.Windows.Forms.TabPage tpgSet3;
|
||||
private System.Windows.Forms.TabPage tpgSet4;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpMain;
|
||||
private System.Windows.Forms.TrackBar trkTurboSpeed;
|
||||
private System.Windows.Forms.Label lblTurboSpeed;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label lblTurboFast;
|
||||
private System.Windows.Forms.Label lblSlow;
|
||||
private System.Windows.Forms.Button btnSelectPreset;
|
||||
private System.Windows.Forms.ContextMenuStrip mnuStripPreset;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuKeyboard;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuWasdLayout;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuArrowLayout;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuXboxController;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuXboxLayout1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuXboxLayout2;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSnes30Controller;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuPs4Controller;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuPs4Layout1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuPs4Layout2;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSnes30Layout1;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuSnes30Layout2;
|
||||
private System.Windows.Forms.ImageList imageList;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpStandardController;
|
||||
private ctrlStandardController ctrlController0;
|
||||
private ctrlStandardController ctrlController1;
|
||||
private ctrlStandardController ctrlController2;
|
||||
private ctrlStandardController ctrlController3;
|
||||
private ctrlKeyBindingHint ctrlKeyBindingHint1;
|
||||
}
|
||||
}
|
175
UI/Forms/Config/Controllers/frmControllerConfig.resx
Normal file
175
UI/Forms/Config/Controllers/frmControllerConfig.resx
Normal file
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>242, 17</value>
|
||||
</metadata>
|
||||
<data name="imageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAaABAAGgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAAQcO6wEHAbwO6wG8
|
||||
IAAB6wHvAe0BkgbtAZIB7QGSAe0B7wLrBPEC8Ai8AesgAAHsAfcB9AGSAfME8gHzAZIB8wGSAfMB9wHs
|
||||
AesOvAHrIAAB7AEHCPcB7wP3AQcB7AHrCP8C9ALzAfIB9AHrIAAB7AHxAe8B9AHvAfQB7wH0Ae8B9AHv
|
||||
A/MB7wHsAesB9AF0ASsBdAnyAfQB6yAAAe0BvAzvAbwB7QHrAf8DKwLyAQcC7AEHA/IB9AHrIAABkgEH
|
||||
Af8BBwH/AQcB/wEHAf8BBwH/AQcC/wEHAZIB6wH/AXQBKwF0AvMB7AHzAbwB7APzAfQB6yAAAZIB8QG8
|
||||
AfEBvAHxAbwB8QG8AfEBvAHxArwB8QGSAesB/wXzAewB8wG8AewD8wH0AesgAAHwDvcB8AHrAf8F8wHs
|
||||
AisBbgPzAfQB6yIAAf8B7AH/CwAB6wH/BPMBTAFSAlMBUgFMAvMB9AHrIwABBwG8Af8KAAHrBP8BmQFM
|
||||
BCsBUgGTAf8B9AHrIwAB/wG8COwBBwH/AQABvATrAysBUgIrAVMBKwLrAbwsAAH/AQcB8AYAAUwDUgFM
|
||||
ASsBUwFMMAAB9AGSBgABGgErAlIBTAErAVIBmTAAAf8B7AYAAf8CTAJSASsBTAH/OQAB/wGZAkwBmQH/
|
||||
JAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/0kAAccB/wYAAeMB/wYAAeABAQYA
|
||||
Af8B8QH4AQcEAAH/AfkB+AEHBAAB/wH5AfgBBwQAAv8B/AEPBAAL
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="mnuStripPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>107, 17</value>
|
||||
</metadata>
|
||||
</root>
|
149
UI/Forms/Config/KeyPresets.cs
Normal file
149
UI/Forms/Config/KeyPresets.cs
Normal file
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
|
||||
namespace Mesen.GUI.Config
|
||||
{
|
||||
public class KeyPresets
|
||||
{
|
||||
KeyMapping _wasdLayout;
|
||||
KeyMapping _arrowLayout;
|
||||
KeyMapping[] _xboxLayouts = new KeyMapping[2];
|
||||
KeyMapping[] _ps4Layouts = new KeyMapping[2];
|
||||
KeyMapping[] _snes30Layouts = new KeyMapping[2];
|
||||
|
||||
public KeyMapping WasdLayout { get { return _wasdLayout.Clone(); } }
|
||||
public KeyMapping ArrowLayout { get { return _arrowLayout.Clone(); } }
|
||||
public KeyMapping XboxLayout1 { get { return _xboxLayouts[0].Clone(); } }
|
||||
public KeyMapping XboxLayout2 { get { return _xboxLayouts[1].Clone(); } }
|
||||
public KeyMapping Ps4Layout1 { get { return _ps4Layouts[0].Clone(); } }
|
||||
public KeyMapping Ps4Layout2 { get { return _ps4Layouts[1].Clone(); } }
|
||||
public KeyMapping Snes30Layout1 { get { return _snes30Layouts[0].Clone(); } }
|
||||
public KeyMapping Snes30Layout2 { get { return _snes30Layouts[1].Clone(); } }
|
||||
|
||||
public KeyPresets()
|
||||
{
|
||||
_wasdLayout = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode("K"),
|
||||
B = InputApi.GetKeyCode("J"),
|
||||
X = InputApi.GetKeyCode(","),
|
||||
Y = InputApi.GetKeyCode("M"),
|
||||
Select = InputApi.GetKeyCode("O"),
|
||||
Start = InputApi.GetKeyCode("L"),
|
||||
L = InputApi.GetKeyCode("U"),
|
||||
R = InputApi.GetKeyCode("I"),
|
||||
Up = InputApi.GetKeyCode("W"),
|
||||
Down = InputApi.GetKeyCode("S"),
|
||||
Left = InputApi.GetKeyCode("A"),
|
||||
Right = InputApi.GetKeyCode("D")
|
||||
};
|
||||
|
||||
_arrowLayout = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode("S"),
|
||||
B = InputApi.GetKeyCode("A"),
|
||||
X = InputApi.GetKeyCode("X"),
|
||||
Y = InputApi.GetKeyCode("Z"),
|
||||
Select = InputApi.GetKeyCode("E"),
|
||||
Start = InputApi.GetKeyCode("D"),
|
||||
L = InputApi.GetKeyCode("Q"),
|
||||
R = InputApi.GetKeyCode("W"),
|
||||
Up = InputApi.GetKeyCode("Up Arrow"),
|
||||
Down = InputApi.GetKeyCode("Down Arrow"),
|
||||
Left = InputApi.GetKeyCode("Left Arrow"),
|
||||
Right = InputApi.GetKeyCode("Right Arrow")
|
||||
};
|
||||
|
||||
if(Program.IsMono) {
|
||||
//TODO test and update for Mono
|
||||
for(int i = 0; i < 2; i++) {
|
||||
string prefix = "Pad" + (i + 1).ToString() + " ";
|
||||
_xboxLayouts[i] = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode(prefix + "A"),
|
||||
B = InputApi.GetKeyCode(prefix + "X"),
|
||||
X = InputApi.GetKeyCode(prefix + "B"),
|
||||
Y = InputApi.GetKeyCode(prefix + "Y"),
|
||||
Select = InputApi.GetKeyCode(prefix + "Select"),
|
||||
Start = InputApi.GetKeyCode(prefix + "Start"),
|
||||
Up = InputApi.GetKeyCode(prefix + "Up"),
|
||||
Down = InputApi.GetKeyCode(prefix + "Down"),
|
||||
Left = InputApi.GetKeyCode(prefix + "Left"),
|
||||
Right = InputApi.GetKeyCode(prefix + "Right")
|
||||
};
|
||||
|
||||
_ps4Layouts[i] = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode(prefix + "B"),
|
||||
B = InputApi.GetKeyCode(prefix + "A"),
|
||||
X = InputApi.GetKeyCode(prefix + "C"),
|
||||
Y = InputApi.GetKeyCode(prefix + "X"),
|
||||
Select = InputApi.GetKeyCode(prefix + "L2"),
|
||||
Start = InputApi.GetKeyCode(prefix + "R2"),
|
||||
Up = InputApi.GetKeyCode(prefix + "Up"),
|
||||
Down = InputApi.GetKeyCode(prefix + "Down"),
|
||||
Left = InputApi.GetKeyCode(prefix + "Left"),
|
||||
Right = InputApi.GetKeyCode(prefix + "Right")
|
||||
};
|
||||
|
||||
_snes30Layouts[i] = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode(prefix + "Thumb"),
|
||||
B = InputApi.GetKeyCode(prefix + "Top2"),
|
||||
X = InputApi.GetKeyCode(prefix + "Trigger"),
|
||||
Y = InputApi.GetKeyCode(prefix + "Top"),
|
||||
Select = InputApi.GetKeyCode(prefix + "Base5"),
|
||||
Start = InputApi.GetKeyCode(prefix + "Base6"),
|
||||
Up = InputApi.GetKeyCode(prefix + "Y-"),
|
||||
Down = InputApi.GetKeyCode(prefix + "Y+"),
|
||||
Left = InputApi.GetKeyCode(prefix + "X-"),
|
||||
Right = InputApi.GetKeyCode(prefix + "X+")
|
||||
};
|
||||
}
|
||||
} else {
|
||||
for(int i = 0; i < 2; i++) {
|
||||
string prefix = "Pad" + (i + 1).ToString() + " ";
|
||||
_xboxLayouts[i] = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode(prefix + "B"),
|
||||
B = InputApi.GetKeyCode(prefix + "A"),
|
||||
X = InputApi.GetKeyCode(prefix + "Y"),
|
||||
Y = InputApi.GetKeyCode(prefix + "X"),
|
||||
Select = InputApi.GetKeyCode(prefix + "Back"),
|
||||
Start = InputApi.GetKeyCode(prefix + "Start"),
|
||||
L = InputApi.GetKeyCode(prefix + "L1"),
|
||||
R = InputApi.GetKeyCode(prefix + "R1"),
|
||||
Up = InputApi.GetKeyCode(prefix + "Up"),
|
||||
Down = InputApi.GetKeyCode(prefix + "Down"),
|
||||
Left = InputApi.GetKeyCode(prefix + "Left"),
|
||||
Right = InputApi.GetKeyCode(prefix + "Right")
|
||||
};
|
||||
|
||||
prefix = "Joy" + (i + 1).ToString() + " ";
|
||||
_ps4Layouts[i] = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode(prefix + "But3"),
|
||||
B = InputApi.GetKeyCode(prefix + "But2"),
|
||||
X = InputApi.GetKeyCode(prefix + "But4"),
|
||||
Y = InputApi.GetKeyCode(prefix + "But1"),
|
||||
Select = InputApi.GetKeyCode(prefix + "But9"),
|
||||
Start = InputApi.GetKeyCode(prefix + "But10"),
|
||||
L = InputApi.GetKeyCode(prefix + "But5"),
|
||||
R = InputApi.GetKeyCode(prefix + "But6"),
|
||||
Up = InputApi.GetKeyCode(prefix + "DPad Up"),
|
||||
Down = InputApi.GetKeyCode(prefix + "DPad Down"),
|
||||
Left = InputApi.GetKeyCode(prefix + "DPad Left"),
|
||||
Right = InputApi.GetKeyCode(prefix + "DPad Right")
|
||||
};
|
||||
|
||||
_snes30Layouts[i] = new KeyMapping() {
|
||||
A = InputApi.GetKeyCode(prefix + "But1"),
|
||||
B = InputApi.GetKeyCode(prefix + "But2"),
|
||||
X = InputApi.GetKeyCode(prefix + "But4"),
|
||||
Y = InputApi.GetKeyCode(prefix + "But5"),
|
||||
Select = InputApi.GetKeyCode(prefix + "But11"),
|
||||
Start = InputApi.GetKeyCode(prefix + "But12"),
|
||||
L = InputApi.GetKeyCode(prefix + "But7"),
|
||||
R = InputApi.GetKeyCode(prefix + "But8"),
|
||||
Up = InputApi.GetKeyCode(prefix + "Y+"),
|
||||
Down = InputApi.GetKeyCode(prefix + "Y-"),
|
||||
Left = InputApi.GetKeyCode(prefix + "X-"),
|
||||
Right = InputApi.GetKeyCode(prefix + "X+")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
UI/Forms/Config/frmAudioConfig.Designer.cs
generated
3
UI/Forms/Config/frmAudioConfig.Designer.cs
generated
|
@ -913,6 +913,9 @@
|
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(492, 407);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmAudioConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Audio Config";
|
||||
|
|
3
UI/Forms/Config/frmEmulationConfig.Designer.cs
generated
3
UI/Forms/Config/frmEmulationConfig.Designer.cs
generated
|
@ -291,6 +291,9 @@
|
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(414, 319);
|
||||
this.Controls.Add(this.tabMain);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmEmulationConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Emulation Config";
|
||||
|
|
388
UI/Forms/Config/frmInputConfig.Designer.cs
generated
Normal file
388
UI/Forms/Config/frmInputConfig.Designer.cs
generated
Normal file
|
@ -0,0 +1,388 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class frmInputConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmInputConfig));
|
||||
this.tabMain = new System.Windows.Forms.TabControl();
|
||||
this.tpgControllers = new System.Windows.Forms.TabPage();
|
||||
this.tlpControllers = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btnSetupP5 = new System.Windows.Forms.Button();
|
||||
this.cboPlayer5 = new System.Windows.Forms.ComboBox();
|
||||
this.lblPlayer5 = new System.Windows.Forms.Label();
|
||||
this.btnSetupP4 = new System.Windows.Forms.Button();
|
||||
this.btnSetupP3 = new System.Windows.Forms.Button();
|
||||
this.lblPlayer1 = new System.Windows.Forms.Label();
|
||||
this.lblPlayer2 = new System.Windows.Forms.Label();
|
||||
this.cboPlayer4 = new System.Windows.Forms.ComboBox();
|
||||
this.cboPlayer3 = new System.Windows.Forms.ComboBox();
|
||||
this.cboPlayer1 = new System.Windows.Forms.ComboBox();
|
||||
this.lblPlayer4 = new System.Windows.Forms.Label();
|
||||
this.cboPlayer2 = new System.Windows.Forms.ComboBox();
|
||||
this.lblPlayer3 = new System.Windows.Forms.Label();
|
||||
this.btnSetupP1 = new System.Windows.Forms.Button();
|
||||
this.btnSetupP2 = new System.Windows.Forms.Button();
|
||||
this.pnlConflictWarning = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.picWarning = new System.Windows.Forms.PictureBox();
|
||||
this.lblKeyBinding = new System.Windows.Forms.Label();
|
||||
this.tabMain.SuspendLayout();
|
||||
this.tpgControllers.SuspendLayout();
|
||||
this.tlpControllers.SuspendLayout();
|
||||
this.pnlConflictWarning.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picWarning)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(382, 29);
|
||||
//
|
||||
// tabMain
|
||||
//
|
||||
this.tabMain.Controls.Add(this.tpgControllers);
|
||||
this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabMain.Name = "tabMain";
|
||||
this.tabMain.SelectedIndex = 0;
|
||||
this.tabMain.Size = new System.Drawing.Size(382, 233);
|
||||
this.tabMain.TabIndex = 2;
|
||||
//
|
||||
// tpgControllers
|
||||
//
|
||||
this.tpgControllers.Controls.Add(this.tlpControllers);
|
||||
this.tpgControllers.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpgControllers.Name = "tpgControllers";
|
||||
this.tpgControllers.Size = new System.Drawing.Size(374, 207);
|
||||
this.tpgControllers.TabIndex = 3;
|
||||
this.tpgControllers.Text = "Controllers";
|
||||
this.tpgControllers.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tlpControllers
|
||||
//
|
||||
this.tlpControllers.ColumnCount = 3;
|
||||
this.tlpControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpControllers.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpControllers.Controls.Add(this.btnSetupP5, 2, 5);
|
||||
this.tlpControllers.Controls.Add(this.cboPlayer5, 1, 5);
|
||||
this.tlpControllers.Controls.Add(this.lblPlayer5, 0, 5);
|
||||
this.tlpControllers.Controls.Add(this.btnSetupP4, 2, 4);
|
||||
this.tlpControllers.Controls.Add(this.btnSetupP3, 2, 3);
|
||||
this.tlpControllers.Controls.Add(this.lblPlayer1, 0, 1);
|
||||
this.tlpControllers.Controls.Add(this.lblPlayer2, 0, 2);
|
||||
this.tlpControllers.Controls.Add(this.cboPlayer4, 1, 4);
|
||||
this.tlpControllers.Controls.Add(this.cboPlayer3, 1, 3);
|
||||
this.tlpControllers.Controls.Add(this.cboPlayer1, 1, 1);
|
||||
this.tlpControllers.Controls.Add(this.lblPlayer4, 0, 4);
|
||||
this.tlpControllers.Controls.Add(this.cboPlayer2, 1, 2);
|
||||
this.tlpControllers.Controls.Add(this.lblPlayer3, 0, 3);
|
||||
this.tlpControllers.Controls.Add(this.btnSetupP1, 2, 1);
|
||||
this.tlpControllers.Controls.Add(this.btnSetupP2, 2, 2);
|
||||
this.tlpControllers.Controls.Add(this.pnlConflictWarning, 0, 0);
|
||||
this.tlpControllers.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpControllers.Location = new System.Drawing.Point(0, 0);
|
||||
this.tlpControllers.Name = "tlpControllers";
|
||||
this.tlpControllers.RowCount = 6;
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tlpControllers.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tlpControllers.Size = new System.Drawing.Size(374, 207);
|
||||
this.tlpControllers.TabIndex = 0;
|
||||
//
|
||||
// btnSetupP5
|
||||
//
|
||||
this.btnSetupP5.AutoSize = true;
|
||||
this.btnSetupP5.Location = new System.Drawing.Point(309, 180);
|
||||
this.btnSetupP5.Name = "btnSetupP5";
|
||||
this.btnSetupP5.Size = new System.Drawing.Size(62, 23);
|
||||
this.btnSetupP5.TabIndex = 22;
|
||||
this.btnSetupP5.Text = "Setup";
|
||||
this.btnSetupP5.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSetupP5.UseVisualStyleBackColor = true;
|
||||
this.btnSetupP5.Visible = false;
|
||||
//
|
||||
// cboPlayer5
|
||||
//
|
||||
this.cboPlayer5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cboPlayer5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboPlayer5.FormattingEnabled = true;
|
||||
this.cboPlayer5.Location = new System.Drawing.Point(57, 180);
|
||||
this.cboPlayer5.Name = "cboPlayer5";
|
||||
this.cboPlayer5.Size = new System.Drawing.Size(246, 21);
|
||||
this.cboPlayer5.TabIndex = 21;
|
||||
this.cboPlayer5.Visible = false;
|
||||
//
|
||||
// lblPlayer5
|
||||
//
|
||||
this.lblPlayer5.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblPlayer5.AutoSize = true;
|
||||
this.lblPlayer5.Location = new System.Drawing.Point(3, 185);
|
||||
this.lblPlayer5.Name = "lblPlayer5";
|
||||
this.lblPlayer5.Size = new System.Drawing.Size(48, 13);
|
||||
this.lblPlayer5.TabIndex = 20;
|
||||
this.lblPlayer5.Text = "Player 5:";
|
||||
this.lblPlayer5.Visible = false;
|
||||
//
|
||||
// btnSetupP4
|
||||
//
|
||||
this.btnSetupP4.AutoSize = true;
|
||||
this.btnSetupP4.Location = new System.Drawing.Point(309, 151);
|
||||
this.btnSetupP4.Name = "btnSetupP4";
|
||||
this.btnSetupP4.Size = new System.Drawing.Size(62, 23);
|
||||
this.btnSetupP4.TabIndex = 12;
|
||||
this.btnSetupP4.Text = "Setup";
|
||||
this.btnSetupP4.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSetupP4.UseVisualStyleBackColor = true;
|
||||
this.btnSetupP4.Visible = false;
|
||||
this.btnSetupP4.Click += new System.EventHandler(this.btnSetup_Click);
|
||||
//
|
||||
// btnSetupP3
|
||||
//
|
||||
this.btnSetupP3.AutoSize = true;
|
||||
this.btnSetupP3.Location = new System.Drawing.Point(309, 122);
|
||||
this.btnSetupP3.Name = "btnSetupP3";
|
||||
this.btnSetupP3.Size = new System.Drawing.Size(62, 23);
|
||||
this.btnSetupP3.TabIndex = 11;
|
||||
this.btnSetupP3.Text = "Setup";
|
||||
this.btnSetupP3.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSetupP3.UseVisualStyleBackColor = true;
|
||||
this.btnSetupP3.Visible = false;
|
||||
this.btnSetupP3.Click += new System.EventHandler(this.btnSetup_Click);
|
||||
//
|
||||
// lblPlayer1
|
||||
//
|
||||
this.lblPlayer1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblPlayer1.AutoSize = true;
|
||||
this.lblPlayer1.Location = new System.Drawing.Point(3, 69);
|
||||
this.lblPlayer1.Name = "lblPlayer1";
|
||||
this.lblPlayer1.Size = new System.Drawing.Size(48, 13);
|
||||
this.lblPlayer1.TabIndex = 0;
|
||||
this.lblPlayer1.Text = "Player 1:";
|
||||
//
|
||||
// lblPlayer2
|
||||
//
|
||||
this.lblPlayer2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblPlayer2.AutoSize = true;
|
||||
this.lblPlayer2.Location = new System.Drawing.Point(3, 98);
|
||||
this.lblPlayer2.Name = "lblPlayer2";
|
||||
this.lblPlayer2.Size = new System.Drawing.Size(48, 13);
|
||||
this.lblPlayer2.TabIndex = 1;
|
||||
this.lblPlayer2.Text = "Player 2:";
|
||||
//
|
||||
// cboPlayer4
|
||||
//
|
||||
this.cboPlayer4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cboPlayer4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboPlayer4.FormattingEnabled = true;
|
||||
this.cboPlayer4.Location = new System.Drawing.Point(57, 151);
|
||||
this.cboPlayer4.Name = "cboPlayer4";
|
||||
this.cboPlayer4.Size = new System.Drawing.Size(246, 21);
|
||||
this.cboPlayer4.TabIndex = 8;
|
||||
this.cboPlayer4.Visible = false;
|
||||
//
|
||||
// cboPlayer3
|
||||
//
|
||||
this.cboPlayer3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cboPlayer3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboPlayer3.FormattingEnabled = true;
|
||||
this.cboPlayer3.Location = new System.Drawing.Point(57, 122);
|
||||
this.cboPlayer3.Name = "cboPlayer3";
|
||||
this.cboPlayer3.Size = new System.Drawing.Size(246, 21);
|
||||
this.cboPlayer3.TabIndex = 7;
|
||||
this.cboPlayer3.Visible = false;
|
||||
//
|
||||
// cboPlayer1
|
||||
//
|
||||
this.cboPlayer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cboPlayer1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboPlayer1.FormattingEnabled = true;
|
||||
this.cboPlayer1.Location = new System.Drawing.Point(57, 64);
|
||||
this.cboPlayer1.Name = "cboPlayer1";
|
||||
this.cboPlayer1.Size = new System.Drawing.Size(246, 21);
|
||||
this.cboPlayer1.TabIndex = 4;
|
||||
//
|
||||
// lblPlayer4
|
||||
//
|
||||
this.lblPlayer4.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblPlayer4.AutoSize = true;
|
||||
this.lblPlayer4.Location = new System.Drawing.Point(3, 156);
|
||||
this.lblPlayer4.Name = "lblPlayer4";
|
||||
this.lblPlayer4.Size = new System.Drawing.Size(48, 13);
|
||||
this.lblPlayer4.TabIndex = 3;
|
||||
this.lblPlayer4.Text = "Player 4:";
|
||||
this.lblPlayer4.Visible = false;
|
||||
//
|
||||
// cboPlayer2
|
||||
//
|
||||
this.cboPlayer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cboPlayer2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboPlayer2.FormattingEnabled = true;
|
||||
this.cboPlayer2.Location = new System.Drawing.Point(57, 93);
|
||||
this.cboPlayer2.Name = "cboPlayer2";
|
||||
this.cboPlayer2.Size = new System.Drawing.Size(246, 21);
|
||||
this.cboPlayer2.TabIndex = 6;
|
||||
//
|
||||
// lblPlayer3
|
||||
//
|
||||
this.lblPlayer3.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblPlayer3.AutoSize = true;
|
||||
this.lblPlayer3.Location = new System.Drawing.Point(3, 127);
|
||||
this.lblPlayer3.Name = "lblPlayer3";
|
||||
this.lblPlayer3.Size = new System.Drawing.Size(48, 13);
|
||||
this.lblPlayer3.TabIndex = 2;
|
||||
this.lblPlayer3.Text = "Player 3:";
|
||||
this.lblPlayer3.Visible = false;
|
||||
//
|
||||
// btnSetupP1
|
||||
//
|
||||
this.btnSetupP1.AutoSize = true;
|
||||
this.btnSetupP1.Location = new System.Drawing.Point(309, 64);
|
||||
this.btnSetupP1.Name = "btnSetupP1";
|
||||
this.btnSetupP1.Size = new System.Drawing.Size(62, 23);
|
||||
this.btnSetupP1.TabIndex = 9;
|
||||
this.btnSetupP1.Text = "Setup";
|
||||
this.btnSetupP1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSetupP1.UseVisualStyleBackColor = true;
|
||||
this.btnSetupP1.Click += new System.EventHandler(this.btnSetup_Click);
|
||||
//
|
||||
// btnSetupP2
|
||||
//
|
||||
this.btnSetupP2.AutoSize = true;
|
||||
this.btnSetupP2.Location = new System.Drawing.Point(309, 93);
|
||||
this.btnSetupP2.Name = "btnSetupP2";
|
||||
this.btnSetupP2.Size = new System.Drawing.Size(62, 23);
|
||||
this.btnSetupP2.TabIndex = 10;
|
||||
this.btnSetupP2.Text = "Setup";
|
||||
this.btnSetupP2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSetupP2.UseVisualStyleBackColor = true;
|
||||
this.btnSetupP2.Click += new System.EventHandler(this.btnSetup_Click);
|
||||
//
|
||||
// pnlConflictWarning
|
||||
//
|
||||
this.pnlConflictWarning.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.pnlConflictWarning.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.tlpControllers.SetColumnSpan(this.pnlConflictWarning, 3);
|
||||
this.pnlConflictWarning.Controls.Add(this.tableLayoutPanel1);
|
||||
this.pnlConflictWarning.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlConflictWarning.Location = new System.Drawing.Point(3, 3);
|
||||
this.pnlConflictWarning.Name = "pnlConflictWarning";
|
||||
this.pnlConflictWarning.Size = new System.Drawing.Size(368, 55);
|
||||
this.pnlConflictWarning.TabIndex = 19;
|
||||
this.pnlConflictWarning.Visible = false;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.picWarning, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblKeyBinding, 1, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(366, 53);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// picWarning
|
||||
//
|
||||
this.picWarning.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.picWarning.Image = global::Mesen.GUI.Properties.Resources.Warning;
|
||||
this.picWarning.Location = new System.Drawing.Point(3, 18);
|
||||
this.picWarning.Name = "picWarning";
|
||||
this.picWarning.Size = new System.Drawing.Size(16, 16);
|
||||
this.picWarning.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.picWarning.TabIndex = 0;
|
||||
this.picWarning.TabStop = false;
|
||||
//
|
||||
// lblKeyBinding
|
||||
//
|
||||
this.lblKeyBinding.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblKeyBinding.Location = new System.Drawing.Point(25, 0);
|
||||
this.lblKeyBinding.Name = "lblKeyBinding";
|
||||
this.lblKeyBinding.Size = new System.Drawing.Size(338, 53);
|
||||
this.lblKeyBinding.TabIndex = 1;
|
||||
this.lblKeyBinding.Text = resources.GetString("lblKeyBinding.Text");
|
||||
//
|
||||
// frmInputConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(382, 262);
|
||||
this.Controls.Add(this.tabMain);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmInputConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Input Config";
|
||||
this.Controls.SetChildIndex(this.baseConfigPanel, 0);
|
||||
this.Controls.SetChildIndex(this.tabMain, 0);
|
||||
this.tabMain.ResumeLayout(false);
|
||||
this.tpgControllers.ResumeLayout(false);
|
||||
this.tlpControllers.ResumeLayout(false);
|
||||
this.tlpControllers.PerformLayout();
|
||||
this.pnlConflictWarning.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picWarning)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TabControl tabMain;
|
||||
private System.Windows.Forms.TabPage tpgControllers;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpControllers;
|
||||
private System.Windows.Forms.Button btnSetupP4;
|
||||
private System.Windows.Forms.Button btnSetupP3;
|
||||
private System.Windows.Forms.Label lblPlayer1;
|
||||
private System.Windows.Forms.Label lblPlayer2;
|
||||
private System.Windows.Forms.ComboBox cboPlayer4;
|
||||
private System.Windows.Forms.ComboBox cboPlayer3;
|
||||
private System.Windows.Forms.ComboBox cboPlayer1;
|
||||
private System.Windows.Forms.Label lblPlayer4;
|
||||
private System.Windows.Forms.ComboBox cboPlayer2;
|
||||
private System.Windows.Forms.Label lblPlayer3;
|
||||
private System.Windows.Forms.Button btnSetupP1;
|
||||
private System.Windows.Forms.Button btnSetupP2;
|
||||
private System.Windows.Forms.Panel pnlConflictWarning;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.PictureBox picWarning;
|
||||
private System.Windows.Forms.Label lblKeyBinding;
|
||||
private System.Windows.Forms.Button btnSetupP5;
|
||||
private System.Windows.Forms.ComboBox cboPlayer5;
|
||||
private System.Windows.Forms.Label lblPlayer5;
|
||||
}
|
||||
}
|
141
UI/Forms/Config/frmInputConfig.cs
Normal file
141
UI/Forms/Config/frmInputConfig.cs
Normal file
|
@ -0,0 +1,141 @@
|
|||
using Mesen.GUI.Config;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
public partial class frmInputConfig : BaseConfigForm
|
||||
{
|
||||
public frmInputConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
if(DesignMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
InputConfig cfg = ConfigManager.Config.Input.Clone();
|
||||
Entity = cfg;
|
||||
|
||||
BaseConfigForm.InitializeComboBox((ComboBox)cboPlayer1, typeof(ControllerType));
|
||||
BaseConfigForm.InitializeComboBox((ComboBox)cboPlayer2, typeof(ControllerType));
|
||||
BaseConfigForm.InitializeComboBox((ComboBox)cboPlayer3, typeof(ControllerType));
|
||||
BaseConfigForm.InitializeComboBox((ComboBox)cboPlayer4, typeof(ControllerType));
|
||||
BaseConfigForm.InitializeComboBox((ComboBox)cboPlayer5, typeof(ControllerType));
|
||||
|
||||
cboPlayer1.SetEnumValue(cfg.Controllers[0].Type);
|
||||
cboPlayer2.SetEnumValue(cfg.Controllers[1].Type);
|
||||
cboPlayer3.SetEnumValue(cfg.Controllers[2].Type);
|
||||
cboPlayer4.SetEnumValue(cfg.Controllers[3].Type);
|
||||
cboPlayer5.SetEnumValue(cfg.Controllers[4].Type);
|
||||
}
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
ConfigManager.Config.Input = (InputConfig)this.Entity;
|
||||
|
||||
ConfigManager.Config.Input.Controllers[0].Type = cboPlayer1.GetEnumValue<ControllerType>();
|
||||
ConfigManager.Config.Input.Controllers[1].Type = cboPlayer2.GetEnumValue<ControllerType>();
|
||||
ConfigManager.Config.Input.Controllers[2].Type = cboPlayer3.GetEnumValue<ControllerType>();
|
||||
ConfigManager.Config.Input.Controllers[3].Type = cboPlayer4.GetEnumValue<ControllerType>();
|
||||
ConfigManager.Config.Input.Controllers[4].Type = cboPlayer5.GetEnumValue<ControllerType>();
|
||||
|
||||
ConfigManager.ApplyChanges();
|
||||
}
|
||||
|
||||
protected override bool ValidateInput()
|
||||
{
|
||||
btnSetupP1.Enabled = cboPlayer1.GetEnumValue<ControllerType>() == ControllerType.SnesController;
|
||||
btnSetupP2.Enabled = cboPlayer2.GetEnumValue<ControllerType>() == ControllerType.SnesController;
|
||||
return base.ValidateInput();
|
||||
}
|
||||
|
||||
private void btnSetup_Click(object sender, EventArgs e)
|
||||
{
|
||||
int index = 0;
|
||||
ControllerType type = ControllerType.None;
|
||||
string selectedText = "";
|
||||
if(sender == btnSetupP1) {
|
||||
type = cboPlayer1.GetEnumValue<ControllerType>();
|
||||
selectedText = cboPlayer1.SelectedItem.ToString();
|
||||
index = 0;
|
||||
} else if(sender == btnSetupP2) {
|
||||
type = cboPlayer2.GetEnumValue<ControllerType>();
|
||||
selectedText = cboPlayer2.SelectedItem.ToString();
|
||||
index = 1;
|
||||
} else if(sender == btnSetupP3) {
|
||||
type = cboPlayer3.GetEnumValue<ControllerType>();
|
||||
selectedText = cboPlayer3.SelectedItem.ToString();
|
||||
index = 2;
|
||||
} else if(sender == btnSetupP4) {
|
||||
type = cboPlayer4.GetEnumValue<ControllerType>();
|
||||
selectedText = cboPlayer4.SelectedItem.ToString();
|
||||
index = 3;
|
||||
} else if(sender == btnSetupP5) {
|
||||
type = cboPlayer4.GetEnumValue<ControllerType>();
|
||||
selectedText = cboPlayer5.SelectedItem.ToString();
|
||||
index = 4;
|
||||
}
|
||||
|
||||
BaseInputConfigForm frm = null;
|
||||
InputConfig cfg = (InputConfig)Entity;
|
||||
switch(type) {
|
||||
case ControllerType.SnesController:
|
||||
frm = new frmControllerConfig(cfg.Controllers[index], index);
|
||||
break;
|
||||
|
||||
case ControllerType.SuperScope:
|
||||
//frm = new frmSuperScopeConfig();
|
||||
break;
|
||||
|
||||
case ControllerType.SnesMouse:
|
||||
//frm = new frmMouseConfig();
|
||||
break;
|
||||
}
|
||||
|
||||
if(frm != null) {
|
||||
OpenSetupWindow(frm, (Button)sender, selectedText, index);
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenSetupWindow(BaseInputConfigForm frm, Button btn, string title, int port)
|
||||
{
|
||||
Point point = btn.PointToScreen(new Point(0, btn.Height));
|
||||
Rectangle screen = Screen.FromControl(btn).Bounds;
|
||||
|
||||
if(frm.Height + point.Y > screen.Bottom) {
|
||||
//Show on top instead
|
||||
point.Y -= btn.Height + frm.Height;
|
||||
|
||||
if(point.Y < 0) {
|
||||
point.Y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(frm.Width + point.X > screen.Right) {
|
||||
//Show on left instead
|
||||
point.X -= frm.Width - btn.Width;
|
||||
if(point.X < 0) {
|
||||
point.X = 0;
|
||||
}
|
||||
}
|
||||
|
||||
frm.Text = title;
|
||||
frm.StartPosition = FormStartPosition.Manual;
|
||||
frm.Top = point.Y;
|
||||
frm.Left = point.X;
|
||||
|
||||
if(frm.ShowDialog(this) == DialogResult.OK) {
|
||||
InputConfig cfg = (InputConfig)Entity;
|
||||
cfg.Controllers[port] = frm.Config;
|
||||
}
|
||||
frm.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
126
UI/Forms/Config/frmInputConfig.resx
Normal file
126
UI/Forms/Config/frmInputConfig.resx
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="lblKeyBinding.Text" xml:space="preserve">
|
||||
<value>Warning: Your current configuration contains conflicting key bindings - some physical buttons on your keyboard or gamepad are mapped to multiple buttons on the SNES controller. If this is not intentional, please review and correct your key bindings.</value>
|
||||
</data>
|
||||
</root>
|
3
UI/Forms/Config/frmVideoConfig.Designer.cs
generated
3
UI/Forms/Config/frmVideoConfig.Designer.cs
generated
|
@ -814,6 +814,9 @@
|
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(574, 437);
|
||||
this.Controls.Add(this.tabMain);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmVideoConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "frmVideoConfig";
|
||||
|
|
37
UI/Forms/frmMain.Designer.cs
generated
37
UI/Forms/frmMain.Designer.cs
generated
|
@ -101,6 +101,7 @@
|
|||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuAudioConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuVideoConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuInputConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuEmulationConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.mnuPreferences = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -168,49 +169,49 @@
|
|||
this.mnuOpen.Image = global::Mesen.GUI.Properties.Resources.Folder;
|
||||
this.mnuOpen.Name = "mnuOpen";
|
||||
this.mnuOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.mnuOpen.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuOpen.Size = new System.Drawing.Size(146, 22);
|
||||
this.mnuOpen.Text = "Open";
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(149, 6);
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// mnuSaveState
|
||||
//
|
||||
this.mnuSaveState.Name = "mnuSaveState";
|
||||
this.mnuSaveState.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuSaveState.Size = new System.Drawing.Size(146, 22);
|
||||
this.mnuSaveState.Text = "Save State";
|
||||
this.mnuSaveState.DropDownOpening += new System.EventHandler(this.mnuSaveState_DropDownOpening);
|
||||
//
|
||||
// mnuLoadState
|
||||
//
|
||||
this.mnuLoadState.Name = "mnuLoadState";
|
||||
this.mnuLoadState.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLoadState.Size = new System.Drawing.Size(146, 22);
|
||||
this.mnuLoadState.Text = "Load State";
|
||||
this.mnuLoadState.DropDownOpening += new System.EventHandler(this.mnuLoadState_DropDownOpening);
|
||||
//
|
||||
// toolStripMenuItem10
|
||||
//
|
||||
this.toolStripMenuItem10.Name = "toolStripMenuItem10";
|
||||
this.toolStripMenuItem10.Size = new System.Drawing.Size(149, 6);
|
||||
this.toolStripMenuItem10.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// mnuRecentFiles
|
||||
//
|
||||
this.mnuRecentFiles.Name = "mnuRecentFiles";
|
||||
this.mnuRecentFiles.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuRecentFiles.Size = new System.Drawing.Size(146, 22);
|
||||
this.mnuRecentFiles.Text = "Recent Files";
|
||||
//
|
||||
// toolStripMenuItem6
|
||||
//
|
||||
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
|
||||
this.toolStripMenuItem6.Size = new System.Drawing.Size(149, 6);
|
||||
this.toolStripMenuItem6.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// mnuExit
|
||||
//
|
||||
this.mnuExit.Image = global::Mesen.GUI.Properties.Resources.Exit;
|
||||
this.mnuExit.Name = "mnuExit";
|
||||
this.mnuExit.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuExit.Size = new System.Drawing.Size(146, 22);
|
||||
this.mnuExit.Text = "Exit";
|
||||
this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);
|
||||
//
|
||||
|
@ -231,7 +232,7 @@
|
|||
this.mnuPause.Enabled = false;
|
||||
this.mnuPause.Image = global::Mesen.GUI.Properties.Resources.MediaPause;
|
||||
this.mnuPause.Name = "mnuPause";
|
||||
this.mnuPause.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuPause.Size = new System.Drawing.Size(139, 22);
|
||||
this.mnuPause.Text = "Pause";
|
||||
//
|
||||
// mnuReset
|
||||
|
@ -239,7 +240,7 @@
|
|||
this.mnuReset.Enabled = false;
|
||||
this.mnuReset.Image = global::Mesen.GUI.Properties.Resources.Refresh;
|
||||
this.mnuReset.Name = "mnuReset";
|
||||
this.mnuReset.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuReset.Size = new System.Drawing.Size(139, 22);
|
||||
this.mnuReset.Text = "Reset";
|
||||
this.mnuReset.Visible = false;
|
||||
//
|
||||
|
@ -248,20 +249,20 @@
|
|||
this.mnuPowerCycle.Enabled = false;
|
||||
this.mnuPowerCycle.Image = global::Mesen.GUI.Properties.Resources.PowerCycle;
|
||||
this.mnuPowerCycle.Name = "mnuPowerCycle";
|
||||
this.mnuPowerCycle.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuPowerCycle.Size = new System.Drawing.Size(139, 22);
|
||||
this.mnuPowerCycle.Text = "Power Cycle";
|
||||
this.mnuPowerCycle.Visible = false;
|
||||
//
|
||||
// toolStripMenuItem24
|
||||
//
|
||||
this.toolStripMenuItem24.Name = "toolStripMenuItem24";
|
||||
this.toolStripMenuItem24.Size = new System.Drawing.Size(149, 6);
|
||||
this.toolStripMenuItem24.Size = new System.Drawing.Size(136, 6);
|
||||
//
|
||||
// mnuPowerOff
|
||||
//
|
||||
this.mnuPowerOff.Image = global::Mesen.GUI.Properties.Resources.MediaStop;
|
||||
this.mnuPowerOff.Name = "mnuPowerOff";
|
||||
this.mnuPowerOff.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuPowerOff.Size = new System.Drawing.Size(139, 22);
|
||||
this.mnuPowerOff.Text = "Power Off";
|
||||
//
|
||||
// optionsToolStripMenuItem
|
||||
|
@ -272,6 +273,7 @@
|
|||
this.mnuVideoFilter,
|
||||
this.toolStripMenuItem4,
|
||||
this.mnuAudioConfig,
|
||||
this.mnuInputConfig,
|
||||
this.mnuVideoConfig,
|
||||
this.mnuEmulationConfig,
|
||||
this.toolStripMenuItem3,
|
||||
|
@ -670,6 +672,14 @@
|
|||
this.mnuVideoConfig.Text = "Video";
|
||||
this.mnuVideoConfig.Click += new System.EventHandler(this.mnuVideoConfig_Click);
|
||||
//
|
||||
// mnuInputConfig
|
||||
//
|
||||
this.mnuInputConfig.Image = global::Mesen.GUI.Properties.Resources.Controller;
|
||||
this.mnuInputConfig.Name = "mnuInputConfig";
|
||||
this.mnuInputConfig.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuInputConfig.Text = "Input";
|
||||
this.mnuInputConfig.Click += new System.EventHandler(this.mnuInputConfig_Click);
|
||||
//
|
||||
// mnuEmulationConfig
|
||||
//
|
||||
this.mnuEmulationConfig.Image = global::Mesen.GUI.Properties.Resources.DipSwitches;
|
||||
|
@ -941,5 +951,6 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem mnuLoadState;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem10;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuEmulationConfig;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuInputConfig;
|
||||
}
|
||||
}
|
|
@ -198,6 +198,14 @@ namespace Mesen.GUI.Forms
|
|||
}
|
||||
ConfigManager.Config.Emulation.ApplyConfig();
|
||||
}
|
||||
|
||||
private void mnuInputConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
using(frmInputConfig frm = new frmInputConfig()) {
|
||||
frm.ShowDialog(sender, this);
|
||||
}
|
||||
ConfigManager.Config.Input.ApplyConfig();
|
||||
}
|
||||
|
||||
private void mnuPreferences_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace Mesen.GUI
|
|||
|
||||
[DllImport(DllPath)] public static extern void SetVideoConfig(VideoConfig config);
|
||||
[DllImport(DllPath)] public static extern void SetAudioConfig(AudioConfig config);
|
||||
[DllImport(DllPath)] public static extern void SetInputConfig(InputConfig config);
|
||||
[DllImport(DllPath)] public static extern void SetEmulationConfig(EmulationConfig config);
|
||||
|
||||
[DllImport(DllPath)] public static extern void SetPreferences(InteropPreferencesConfig config);
|
||||
|
|
47
UI/UI.csproj
47
UI/UI.csproj
|
@ -214,6 +214,7 @@
|
|||
<Compile Include="Config\ConfigAttributes.cs" />
|
||||
<Compile Include="Config\Configuration.cs" />
|
||||
<Compile Include="Config\ConfigManager.cs" />
|
||||
<Compile Include="Config\InputConfig.cs" />
|
||||
<Compile Include="Config\FileAssociationHelper.cs" />
|
||||
<Compile Include="Config\PreferencesConfig.cs" />
|
||||
<Compile Include="Config\Shortcuts\EmulatorShortcut.cs" />
|
||||
|
@ -473,18 +474,48 @@
|
|||
<Compile Include="Forms\BaseInputForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\BaseInputConfigControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\BaseInputConfigForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\ctrlEmulatorShortcuts.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\ctrlEmulatorShortcuts.designer.cs">
|
||||
<DependentUpon>ctrlEmulatorShortcuts.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlKeyBindingHint.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlKeyBindingHint.designer.cs">
|
||||
<DependentUpon>ctrlKeyBindingHint.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlStandardController.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlStandardController.designer.cs">
|
||||
<DependentUpon>ctrlStandardController.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\frmAudioConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\frmAudioConfig.Designer.cs">
|
||||
<DependentUpon>frmAudioConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmControllerConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmControllerConfig.designer.cs">
|
||||
<DependentUpon>frmControllerConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\frmInputConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\frmInputConfig.Designer.cs">
|
||||
<DependentUpon>frmInputConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\frmEmulationConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -509,6 +540,7 @@
|
|||
<Compile Include="Forms\Config\frmVideoConfig.Designer.cs">
|
||||
<DependentUpon>frmVideoConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\KeyPresets.cs" />
|
||||
<Compile Include="Forms\EntityBinder.cs" />
|
||||
<Compile Include="Forms\frmLogWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
@ -643,12 +675,27 @@
|
|||
<EmbeddedResource Include="Forms\BaseInputForm.resx">
|
||||
<DependentUpon>BaseInputForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\BaseInputConfigForm.resx">
|
||||
<DependentUpon>BaseInputConfigForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\ctrlEmulatorShortcuts.resx">
|
||||
<DependentUpon>ctrlEmulatorShortcuts.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\ctrlKeyBindingHint.resx">
|
||||
<DependentUpon>ctrlKeyBindingHint.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\ctrlStandardController.resx">
|
||||
<DependentUpon>ctrlStandardController.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\frmAudioConfig.resx">
|
||||
<DependentUpon>frmAudioConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\frmControllerConfig.resx">
|
||||
<DependentUpon>frmControllerConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\frmInputConfig.resx">
|
||||
<DependentUpon>frmInputConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\frmEmulationConfig.resx">
|
||||
<DependentUpon>frmEmulationConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Add table
Reference in a new issue