Input: Added UI to configure bandai microphone bindings
This commit is contained in:
parent
b69071497a
commit
51ac954f8c
26 changed files with 1222 additions and 49 deletions
|
@ -21,7 +21,7 @@ protected:
|
|||
uint16_t RegisterStartAddress() override { return 0x6000; }
|
||||
uint16_t RegisterEndAddress() override { return 0xFFFF; }
|
||||
bool AllowRegisterRead() override { return true; }
|
||||
ConsoleFeatures GetAvailableFeatures() override { return _mapperID == 157 ? ConsoleFeatures::BarcodeReader : ConsoleFeatures::None; }
|
||||
ConsoleFeatures GetAvailableFeatures() override { return _mapperID == 157 ? (ConsoleFeatures)((int)ConsoleFeatures::BarcodeReader | (int)ConsoleFeatures::DatachBarcodeReader) : ConsoleFeatures::None; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ protected:
|
|||
uint8_t ReadRegister(uint16_t addr) override
|
||||
{
|
||||
//Pretend EEPROM data is always 0
|
||||
return _barcodeReader->GetOutput() | MemoryManager::GetOpenBus(0xE7);
|
||||
return (_barcodeReader ? _barcodeReader->GetOutput() : 0) | MemoryManager::GetOpenBus(0xE7);
|
||||
}
|
||||
|
||||
void WriteRegister(uint16_t addr, uint8_t value) override
|
||||
|
|
|
@ -12,6 +12,7 @@ protected:
|
|||
uint16_t GetCHRPageSize() override { return 0x2000; }
|
||||
bool AllowRegisterRead() override { return true; }
|
||||
bool HasBusConflicts() override { return true; }
|
||||
ConsoleFeatures GetAvailableFeatures() { return ConsoleFeatures::BandaiMicrophone; }
|
||||
|
||||
void InitMapper() override
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "BaseControlDevice.h"
|
||||
#include "PPU.h"
|
||||
|
||||
class BandaiMicrophone : public BaseControlDevice
|
||||
{
|
||||
|
@ -14,11 +15,16 @@ protected:
|
|||
|
||||
void InternalSetStateFromInput() override
|
||||
{
|
||||
//Make sure the key bindings are properly updated (not ideal, but good enough)
|
||||
_keyMappings = EmulationSettings::GetControllerKeys(0).GetKeyMappingArray();
|
||||
|
||||
for(KeyMapping keyMapping : _keyMappings) {
|
||||
//TODO: Add proper key mappings
|
||||
SetPressedState(Buttons::A, keyMapping.A);
|
||||
SetPressedState(Buttons::B, keyMapping.B);
|
||||
SetPressedState(Buttons::Microphone, keyMapping.Microphone);
|
||||
SetPressedState(Buttons::A, keyMapping.BandaiMicrophoneButtons[0]);
|
||||
SetPressedState(Buttons::B, keyMapping.BandaiMicrophoneButtons[1]);
|
||||
if((PPU::GetFrameCount() % 2) == 0) {
|
||||
//Alternate between 1 and 0s (not sure if the game does anything with this data?)
|
||||
SetPressedState(Buttons::Microphone, keyMapping.BandaiMicrophoneButtons[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -310,10 +310,35 @@ struct KeyMapping
|
|||
uint32_t ExcitingBoxingButtons[8] = {};
|
||||
uint32_t JissenMahjongButtons[21] = {};
|
||||
uint32_t SuborKeyboardButtons[99] = {};
|
||||
uint32_t BandaiMicrophoneButtons[3] = {};
|
||||
|
||||
bool HasKeySet()
|
||||
{
|
||||
return true || A || B || Up || Down || Left || Right || Start || Select || TurboA || TurboB || TurboStart || TurboSelect || Microphone || LButton || RButton;
|
||||
if(A || B || Up || Down || Left || Right || Start || Select || TurboA || TurboB || TurboStart || TurboSelect || Microphone || LButton || RButton) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool hasKeyBinding = false;
|
||||
hasKeyBinding |= HasKeyBinding(PowerPadButtons, sizeof(PowerPadButtons) / sizeof(PowerPadButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(FamilyBasicKeyboardButtons, sizeof(FamilyBasicKeyboardButtons) / sizeof(FamilyBasicKeyboardButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(PartyTapButtons, sizeof(PartyTapButtons) / sizeof(PartyTapButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(PachinkoButtons, sizeof(PachinkoButtons) / sizeof(PachinkoButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(ExcitingBoxingButtons, sizeof(ExcitingBoxingButtons) / sizeof(ExcitingBoxingButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(JissenMahjongButtons, sizeof(JissenMahjongButtons) / sizeof(JissenMahjongButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(SuborKeyboardButtons, sizeof(SuborKeyboardButtons) / sizeof(SuborKeyboardButtons[0]));
|
||||
hasKeyBinding |= HasKeyBinding(BandaiMicrophoneButtons, sizeof(BandaiMicrophoneButtons) / sizeof(BandaiMicrophoneButtons[0]));
|
||||
return hasKeyBinding;
|
||||
}
|
||||
|
||||
private:
|
||||
bool HasKeyBinding(uint32_t* buttons, uint32_t count)
|
||||
{
|
||||
for(uint32_t i = 0; i < count; i++) {
|
||||
if(buttons[i] != 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -251,6 +251,8 @@ enum class ConsoleFeatures
|
|||
VsSystem = 4,
|
||||
BarcodeReader = 8,
|
||||
TapeRecorder = 16,
|
||||
BandaiMicrophone = 32,
|
||||
DatachBarcodeReader = 64
|
||||
};
|
||||
|
||||
enum class RecordMovieFrom
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace Mesen.GUI.Config
|
|||
public UInt32[] ExcitingBoxingButtons = new UInt32[8];
|
||||
public UInt32[] JissenMahjongButtons = new UInt32[21];
|
||||
public UInt32[] SuborKeyboardButtons = new UInt32[99];
|
||||
public UInt32[] BandaiMicrophoneButtons = new UInt32[3];
|
||||
|
||||
public KeyMappings()
|
||||
{
|
||||
|
@ -50,6 +51,7 @@ namespace Mesen.GUI.Config
|
|||
clone.ExcitingBoxingButtons = (UInt32[])this.ExcitingBoxingButtons.Clone();
|
||||
clone.JissenMahjongButtons = (UInt32[])this.JissenMahjongButtons.Clone();
|
||||
clone.SuborKeyboardButtons = (UInt32[])this.SuborKeyboardButtons.Clone();
|
||||
clone.BandaiMicrophoneButtons = (UInt32[])this.BandaiMicrophoneButtons.Clone();
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
@ -79,6 +81,7 @@ namespace Mesen.GUI.Config
|
|||
mapping.ExcitingBoxingButtons= ExcitingBoxingButtons;
|
||||
mapping.JissenMahjongButtons = JissenMahjongButtons;
|
||||
mapping.SuborKeyboardButtons = SuborKeyboardButtons;
|
||||
mapping.BandaiMicrophoneButtons = BandaiMicrophoneButtons;
|
||||
|
||||
return mapping;
|
||||
}
|
||||
|
@ -173,6 +176,7 @@ namespace Mesen.GUI.Config
|
|||
controllerInfo.Keys[0].PartyTapButtons = presets.PartyTap.PartyTapButtons;
|
||||
controllerInfo.Keys[0].PowerPadButtons = presets.PowerPad.PowerPadButtons;
|
||||
controllerInfo.Keys[0].SuborKeyboardButtons = presets.SuborKeyboard.SuborKeyboardButtons;
|
||||
controllerInfo.Keys[0].BandaiMicrophoneButtons = presets.BandaiMicrophone.BandaiMicrophoneButtons;
|
||||
|
||||
}
|
||||
Controllers.Add(controllerInfo);
|
||||
|
|
|
@ -34,6 +34,9 @@ namespace Mesen.GUI.Config
|
|||
KeyMappings _suborKeyboard;
|
||||
public KeyMappings SuborKeyboard { get { return _suborKeyboard.Clone(); } }
|
||||
|
||||
KeyMappings _bandaiMicrophone;
|
||||
public KeyMappings BandaiMicrophone { get { return _bandaiMicrophone.Clone(); } }
|
||||
|
||||
public KeyMappings WasdLayout { get { return _wasdLayout.Clone(); } }
|
||||
public KeyMappings ArrowLayout { get { return _arrowLayout.Clone(); } }
|
||||
public KeyMappings NestopiaLayout { get { return _nestopiaLayout.Clone(); } }
|
||||
|
@ -204,6 +207,14 @@ namespace Mesen.GUI.Config
|
|||
}
|
||||
};
|
||||
|
||||
_bandaiMicrophone = new KeyMappings() {
|
||||
BandaiMicrophoneButtons = new UInt32[3] {
|
||||
InteropEmu.GetKeyCode("1"),
|
||||
InteropEmu.GetKeyCode("2"),
|
||||
InteropEmu.GetKeyCode("3")
|
||||
}
|
||||
};
|
||||
|
||||
_excitingBoxing = new KeyMappings() {
|
||||
ExcitingBoxingButtons = new UInt32[8] {
|
||||
InteropEmu.GetKeyCode("Numpad 7"),
|
||||
|
|
|
@ -184,6 +184,8 @@
|
|||
<Control ID="btnSetupP4">Configuració</Control>
|
||||
<Control ID="btnSetupP3">Configuració</Control>
|
||||
<Control ID="btnSetupExp">Configuració</Control>
|
||||
<Control ID="btnSetupCartridge">Configuració</Control>
|
||||
<Control ID="lblCartridge">Cartridge:</Control>
|
||||
<Control ID="lblPlayer1">Jugador 1:</Control>
|
||||
<Control ID="lblPlayer2">Jugador 2:</Control>
|
||||
<Control ID="lblPlayer4">Jugador 4:</Control>
|
||||
|
@ -641,6 +643,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -657,6 +661,9 @@
|
|||
<Control ID="lblPress">Press</Control>
|
||||
<Control ID="lblRelease">Release</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">Microphone</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">Tots els fitxers (*.*)|*.*</Message>
|
||||
|
@ -678,6 +685,8 @@
|
|||
<Message ID="LastFolderUsed">Darrera carpeta utilitzada</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="Resume">Continua</Message>
|
||||
<Message ID="Pause">Pausa</Message>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<Message ID="LastFolderUsed">Last Folder Used</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="Resume">Resume</Message>
|
||||
<Message ID="Pause">Pause</Message>
|
||||
|
|
|
@ -183,6 +183,8 @@
|
|||
<Control ID="btnSetupP4">Configuración</Control>
|
||||
<Control ID="btnSetupP3">Configuración</Control>
|
||||
<Control ID="btnSetupExp">Configuración</Control>
|
||||
<Control ID="btnSetupCartridge">Configuración</Control>
|
||||
<Control ID="lblCartridge">Cartridge:</Control>
|
||||
<Control ID="lblPlayer1">Jugador 1:</Control>
|
||||
<Control ID="lblPlayer2">Jugador 2:</Control>
|
||||
<Control ID="lblPlayer4">Jugador 4:</Control>
|
||||
|
@ -659,6 +661,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -675,6 +679,9 @@
|
|||
<Control ID="lblPress">Press</Control>
|
||||
<Control ID="lblRelease">Release</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">Microphone</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">Todos los tipos de archivo (*.*)|*.*</Message>
|
||||
|
@ -696,6 +703,8 @@
|
|||
<Message ID="LastFolderUsed">Última carpeta usada</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="Resume">Continuar</Message>
|
||||
<Message ID="Pause">Pausa</Message>
|
||||
|
|
|
@ -184,10 +184,12 @@
|
|||
<Control ID="btnSetupP4">Configuration</Control>
|
||||
<Control ID="btnSetupP3">Configuration</Control>
|
||||
<Control ID="btnSetupExp">Configuration</Control>
|
||||
<Control ID="lblPlayer1">Joueur 1:</Control>
|
||||
<Control ID="lblPlayer2">Joueur 2:</Control>
|
||||
<Control ID="lblPlayer4">Joueur 4:</Control>
|
||||
<Control ID="lblPlayer3">Joueur 3:</Control>
|
||||
<Control ID="btnSetupCartridge">Configuration</Control>
|
||||
<Control ID="lblCartridge">Cartouche :</Control>
|
||||
<Control ID="lblPlayer1">Joueur 1 :</Control>
|
||||
<Control ID="lblPlayer2">Joueur 2 :</Control>
|
||||
<Control ID="lblPlayer4">Joueur 4 :</Control>
|
||||
<Control ID="lblPlayer3">Joueur 3 :</Control>
|
||||
<Control ID="btnSetupP1">Configuration</Control>
|
||||
<Control ID="btnSetupP2">Configuration</Control>
|
||||
<Control ID="lblNesType">Type de console :</Control>
|
||||
|
@ -671,6 +673,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -687,6 +691,9 @@
|
|||
<Control ID="lblPress">Appuyer</Control>
|
||||
<Control ID="lblRelease">Relâcher</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">Microphone</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">Tous les fichiers (*.*)|*.*</Message>
|
||||
|
@ -708,7 +715,9 @@
|
|||
<Message ID="LastFolderUsed">Dernier dossier utilisé</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mode souris activé - appuyez sur ESC ou pause pour y mettre fin.</Message>
|
||||
|
||||
<Message ID="BandaiMicrophone">Microphone Bandai</Message>
|
||||
<Message ID="DatachBarcodeReader">Lecteur code-barres Datach</Message>
|
||||
|
||||
<Message ID="Resume">Continuer</Message>
|
||||
<Message ID="Pause">Pause</Message>
|
||||
<Message ID="StartServer">Démarrer serveur</Message>
|
||||
|
|
|
@ -185,6 +185,8 @@
|
|||
<Control ID="btnSetupP4">設定</Control>
|
||||
<Control ID="btnSetupP3">設定</Control>
|
||||
<Control ID="btnSetupExp">設定</Control>
|
||||
<Control ID="btnSetupCartridge">設定</Control>
|
||||
<Control ID="lblCartridge">ロムカセット:</Control>
|
||||
<Control ID="lblPlayer1">プレーヤー 1:</Control>
|
||||
<Control ID="lblPlayer2">プレーヤー 2:</Control>
|
||||
<Control ID="lblPlayer4">プレーヤー 4:</Control>
|
||||
|
@ -655,6 +657,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -671,6 +675,9 @@
|
|||
<Control ID="lblPress">押す</Control>
|
||||
<Control ID="lblRelease">放す</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">マイク</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">すべてのファイル (*.*)|*.*</Message>
|
||||
|
@ -692,7 +699,9 @@
|
|||
<Message ID="LastFolderUsed">最後に使用したフォルダ</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">マウスモード有効。 無効にするにはESCやポースボタンを使ってください。</Message>
|
||||
|
||||
<Message ID="BandaiMicrophone">Bandaiマイクロフォン</Message>
|
||||
<Message ID="DatachBarcodeReader">Datachバーコードリーダー</Message>
|
||||
|
||||
<Message ID="Resume">再開</Message>
|
||||
<Message ID="Pause">ポーズ</Message>
|
||||
<Message ID="StartServer">サーバを起動する</Message>
|
||||
|
|
|
@ -183,6 +183,8 @@
|
|||
<Control ID="btnSetupP4">Configuração</Control>
|
||||
<Control ID="btnSetupP3">Configuração</Control>
|
||||
<Control ID="btnSetupExp">Configuração</Control>
|
||||
<Control ID="btnSetupCartridge">Configuração</Control>
|
||||
<Control ID="lblCartridge">Cartridge:</Control>
|
||||
<Control ID="lblPlayer1">Jogador 1:</Control>
|
||||
<Control ID="lblPlayer2">Jogador 2:</Control>
|
||||
<Control ID="lblPlayer4">Jogador 4:</Control>
|
||||
|
@ -657,6 +659,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -673,6 +677,9 @@
|
|||
<Control ID="lblPress">Press</Control>
|
||||
<Control ID="lblRelease">Release</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">Microphone</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">Todos os tipos de arquivo (*.*)|*.*</Message>
|
||||
|
@ -694,6 +701,8 @@
|
|||
<Message ID="LastFolderUsed">Última pasta usada</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="Resume">Continuar</Message>
|
||||
<Message ID="Pause">Pausar</Message>
|
||||
|
|
|
@ -183,6 +183,8 @@
|
|||
<Control ID="btnSetupP4">Настроить</Control>
|
||||
<Control ID="btnSetupP3">Настроить</Control>
|
||||
<Control ID="btnSetupExp">Настроить</Control>
|
||||
<Control ID="btnSetupCartridge">Настроить</Control>
|
||||
<Control ID="lblCartridge">Cartridge:</Control>
|
||||
<Control ID="lblPlayer1">Контроллер 1:</Control>
|
||||
<Control ID="lblPlayer2">Контроллер 2:</Control>
|
||||
<Control ID="lblPlayer4">Контроллер 4:</Control>
|
||||
|
@ -660,6 +662,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -676,6 +680,9 @@
|
|||
<Control ID="lblPress">Press</Control>
|
||||
<Control ID="lblRelease">Release</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">Microphone</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">Все файлы (*.*)|*.*</Message>
|
||||
|
@ -696,8 +703,10 @@
|
|||
<Message ID="ClearHistory">Clear History</Message>
|
||||
<Message ID="LastFolderUsed">Last Folder Used</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="Resume">Продолжить</Message>
|
||||
<Message ID="Pause">Пауза</Message>
|
||||
<Message ID="StartServer">Запустить сервер</Message>
|
||||
|
|
|
@ -183,6 +183,8 @@
|
|||
<Control ID="btnSetupP4">Налаштувати</Control>
|
||||
<Control ID="btnSetupP3">Налаштувати</Control>
|
||||
<Control ID="btnSetupExp">Налаштувати</Control>
|
||||
<Control ID="btnSetupCartridge">Налаштувати</Control>
|
||||
<Control ID="lblCartridge">Cartridge:</Control>
|
||||
<Control ID="lblPlayer1">Контролер 1:</Control>
|
||||
<Control ID="lblPlayer2">Контролер 2:</Control>
|
||||
<Control ID="lblPlayer4">Контролер 4:</Control>
|
||||
|
@ -660,6 +662,8 @@
|
|||
</Form>
|
||||
<Form ID="frmPachinkoConfig">
|
||||
</Form>
|
||||
<Form ID="frmBandaiMicrophone">
|
||||
</Form>
|
||||
</Forms>
|
||||
<UserControls>
|
||||
<UserControl ID="ctrlExcitingBoxingConfig">
|
||||
|
@ -676,6 +680,9 @@
|
|||
<Control ID="lblPress">Press</Control>
|
||||
<Control ID="lblRelease">Release</Control>
|
||||
</UserControl>
|
||||
<UserControl ID="ctrlBandaiMicrophone">
|
||||
<Control ID="lblMicrophone">Microphone</Control>
|
||||
</UserControl>
|
||||
</UserControls>
|
||||
<Messages>
|
||||
<Message ID="FilterAll">Всi файли (*.*)|*.*</Message>
|
||||
|
@ -697,7 +704,9 @@
|
|||
<Message ID="LastFolderUsed">Використовувана остання папка</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">Mouse mode enabled - press ESC or pause to release the cursor.</Message>
|
||||
|
||||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="Resume">Продовжити</Message>
|
||||
<Message ID="Pause">Пауза</Message>
|
||||
<Message ID="StartServer">Запустити сервер</Message>
|
||||
|
|
165
GUI.NET/Forms/Config/Controllers/ctrlBandaiMicrophone.Designer.cs
generated
Normal file
165
GUI.NET/Forms/Config/Controllers/ctrlBandaiMicrophone.Designer.cs
generated
Normal file
|
@ -0,0 +1,165 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class ctrlBandaiMicrophone
|
||||
{
|
||||
/// <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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btn1 = new System.Windows.Forms.Button();
|
||||
this.btn2 = new System.Windows.Forms.Button();
|
||||
this.btn3 = new System.Windows.Forms.Button();
|
||||
this.lblA = new System.Windows.Forms.Label();
|
||||
this.lblB = new System.Windows.Forms.Label();
|
||||
this.lblMicrophone = new System.Windows.Forms.Label();
|
||||
this.btnClearKeys = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 5;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.btn1, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.btn2, 2, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.btn3, 3, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblA, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblB, 2, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblMicrophone, 3, 2);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 4;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(292, 86);
|
||||
this.tableLayoutPanel1.TabIndex = 2;
|
||||
//
|
||||
// btn1
|
||||
//
|
||||
this.btn1.Location = new System.Drawing.Point(32, 4);
|
||||
this.btn1.Name = "btn1";
|
||||
this.btn1.Size = new System.Drawing.Size(61, 59);
|
||||
this.btn1.TabIndex = 30;
|
||||
this.btn1.Text = "B";
|
||||
this.btn1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn2
|
||||
//
|
||||
this.btn2.Location = new System.Drawing.Point(99, 4);
|
||||
this.btn2.Name = "btn2";
|
||||
this.btn2.Size = new System.Drawing.Size(61, 59);
|
||||
this.btn2.TabIndex = 34;
|
||||
this.btn2.Text = "B";
|
||||
this.btn2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn3
|
||||
//
|
||||
this.btn3.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.btn3.Location = new System.Drawing.Point(182, 4);
|
||||
this.btn3.Name = "btn3";
|
||||
this.btn3.Size = new System.Drawing.Size(61, 59);
|
||||
this.btn3.TabIndex = 32;
|
||||
this.btn3.Text = "B";
|
||||
this.btn3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblA
|
||||
//
|
||||
this.lblA.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lblA.AutoSize = true;
|
||||
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(54, 66);
|
||||
this.lblA.Name = "lblA";
|
||||
this.lblA.Size = new System.Drawing.Size(17, 18);
|
||||
this.lblA.TabIndex = 31;
|
||||
this.lblA.Text = "A";
|
||||
//
|
||||
// lblB
|
||||
//
|
||||
this.lblB.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lblB.AutoSize = true;
|
||||
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(120, 66);
|
||||
this.lblB.Name = "lblB";
|
||||
this.lblB.Size = new System.Drawing.Size(19, 18);
|
||||
this.lblB.TabIndex = 45;
|
||||
this.lblB.Text = "B";
|
||||
//
|
||||
// lblMicrophone
|
||||
//
|
||||
this.lblMicrophone.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lblMicrophone.AutoSize = true;
|
||||
this.lblMicrophone.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblMicrophone.Location = new System.Drawing.Point(166, 66);
|
||||
this.lblMicrophone.Name = "lblMicrophone";
|
||||
this.lblMicrophone.Size = new System.Drawing.Size(93, 18);
|
||||
this.lblMicrophone.TabIndex = 44;
|
||||
this.lblMicrophone.Text = "Microphone";
|
||||
//
|
||||
// btnClearKeys
|
||||
//
|
||||
this.btnClearKeys.AutoSize = true;
|
||||
this.btnClearKeys.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnClearKeys.Name = "btnClearKeys";
|
||||
this.btnClearKeys.Size = new System.Drawing.Size(105, 23);
|
||||
this.btnClearKeys.TabIndex = 3;
|
||||
this.btnClearKeys.Text = "Clear Key Bindings";
|
||||
this.btnClearKeys.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlBandaiMicrophone
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "ctrlBandaiMicrophone";
|
||||
this.Size = new System.Drawing.Size(292, 86);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Button btn1;
|
||||
private System.Windows.Forms.Button btn2;
|
||||
private System.Windows.Forms.Button btn3;
|
||||
private System.Windows.Forms.Label lblA;
|
||||
private System.Windows.Forms.Label lblB;
|
||||
private System.Windows.Forms.Label lblMicrophone;
|
||||
private System.Windows.Forms.Button btnClearKeys;
|
||||
}
|
||||
}
|
42
GUI.NET/Forms/Config/Controllers/ctrlBandaiMicrophone.cs
Normal file
42
GUI.NET/Forms/Config/Controllers/ctrlBandaiMicrophone.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
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 ctrlBandaiMicrophone : BaseInputConfigControl
|
||||
{
|
||||
private List<Button> _keyIndexes;
|
||||
|
||||
public ctrlBandaiMicrophone()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_keyIndexes = new List<Button>() {
|
||||
btn1, btn2, btn3
|
||||
};
|
||||
}
|
||||
|
||||
public override void Initialize(KeyMappings mappings)
|
||||
{
|
||||
for(int i = 0; i < _keyIndexes.Count; i++) {
|
||||
InitButton(_keyIndexes[i], mappings.BandaiMicrophoneButtons[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateKeyMappings(KeyMappings mappings)
|
||||
{
|
||||
for(int i = 0; i < _keyIndexes.Count; i++) {
|
||||
mappings.BandaiMicrophoneButtons[i] = (UInt32)_keyIndexes[i].Tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
GUI.NET/Forms/Config/Controllers/ctrlBandaiMicrophone.resx
Normal file
120
GUI.NET/Forms/Config/Controllers/ctrlBandaiMicrophone.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>
|
413
GUI.NET/Forms/Config/Controllers/frmBandaiMicrophone.Designer.cs
generated
Normal file
413
GUI.NET/Forms/Config/Controllers/frmBandaiMicrophone.Designer.cs
generated
Normal file
|
@ -0,0 +1,413 @@
|
|||
namespace Mesen.GUI.Forms.Config
|
||||
{
|
||||
partial class frmBandaiMicrophone
|
||||
{
|
||||
/// <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(frmBandaiMicrophone));
|
||||
this.imageList = new System.Windows.Forms.ImageList(this.components);
|
||||
this.btnClear = new System.Windows.Forms.Button();
|
||||
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnSetDefault = new System.Windows.Forms.Button();
|
||||
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tabMain = new System.Windows.Forms.TabControl();
|
||||
this.tpgSet1 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBandaiMicrophone1 = new Mesen.GUI.Forms.Config.ctrlBandaiMicrophone();
|
||||
this.tpgSet2 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBandaiMicrophone2 = new Mesen.GUI.Forms.Config.ctrlBandaiMicrophone();
|
||||
this.tpgSet3 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBandaiMicrophone3 = new Mesen.GUI.Forms.Config.ctrlBandaiMicrophone();
|
||||
this.tpgSet4 = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBandaiMicrophone4 = new Mesen.GUI.Forms.Config.ctrlBandaiMicrophone();
|
||||
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.mnuFceuxLayout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuNestopiaLayout = 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.flowLayoutPanel2.SuspendLayout();
|
||||
this.tlpMain.SuspendLayout();
|
||||
this.tabMain.SuspendLayout();
|
||||
this.tpgSet1.SuspendLayout();
|
||||
this.tpgSet2.SuspendLayout();
|
||||
this.tpgSet3.SuspendLayout();
|
||||
this.tpgSet4.SuspendLayout();
|
||||
this.mnuStripPreset.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Controls.Add(this.flowLayoutPanel2);
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 199);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(496, 29);
|
||||
this.baseConfigPanel.Controls.SetChildIndex(this.flowLayoutPanel2, 0);
|
||||
//
|
||||
// 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.Controls.Add(this.btnSetDefault);
|
||||
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;
|
||||
//
|
||||
// btnSetDefault
|
||||
//
|
||||
this.btnSetDefault.AutoSize = true;
|
||||
this.btnSetDefault.Location = new System.Drawing.Point(114, 3);
|
||||
this.btnSetDefault.Name = "btnSetDefault";
|
||||
this.btnSetDefault.Size = new System.Drawing.Size(113, 23);
|
||||
this.btnSetDefault.TabIndex = 4;
|
||||
this.btnSetDefault.Text = "Set Default Bindings";
|
||||
this.btnSetDefault.UseVisualStyleBackColor = true;
|
||||
this.btnSetDefault.Click += new System.EventHandler(this.btnSetDefault_Click);
|
||||
//
|
||||
// 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.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(496, 168);
|
||||
this.tlpMain.TabIndex = 23;
|
||||
//
|
||||
// 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(490, 162);
|
||||
this.tabMain.TabIndex = 3;
|
||||
//
|
||||
// tpgSet1
|
||||
//
|
||||
this.tpgSet1.Controls.Add(this.ctrlBandaiMicrophone1);
|
||||
this.tpgSet1.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet1.Name = "tpgSet1";
|
||||
this.tpgSet1.Size = new System.Drawing.Size(482, 135);
|
||||
this.tpgSet1.TabIndex = 0;
|
||||
this.tpgSet1.Text = "Key Set #1";
|
||||
this.tpgSet1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlBandaiMicrophone1
|
||||
//
|
||||
this.ctrlBandaiMicrophone1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlBandaiMicrophone1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlBandaiMicrophone1.Name = "ctrlBandaiMicrophone1";
|
||||
this.ctrlBandaiMicrophone1.Size = new System.Drawing.Size(482, 135);
|
||||
this.ctrlBandaiMicrophone1.TabIndex = 0;
|
||||
//
|
||||
// tpgSet2
|
||||
//
|
||||
this.tpgSet2.Controls.Add(this.ctrlBandaiMicrophone2);
|
||||
this.tpgSet2.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet2.Name = "tpgSet2";
|
||||
this.tpgSet2.Size = new System.Drawing.Size(482, 135);
|
||||
this.tpgSet2.TabIndex = 1;
|
||||
this.tpgSet2.Text = "Key Set #2";
|
||||
this.tpgSet2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlBandaiMicrophone2
|
||||
//
|
||||
this.ctrlBandaiMicrophone2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlBandaiMicrophone2.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlBandaiMicrophone2.Name = "ctrlBandaiMicrophone2";
|
||||
this.ctrlBandaiMicrophone2.Size = new System.Drawing.Size(482, 135);
|
||||
this.ctrlBandaiMicrophone2.TabIndex = 1;
|
||||
//
|
||||
// tpgSet3
|
||||
//
|
||||
this.tpgSet3.Controls.Add(this.ctrlBandaiMicrophone3);
|
||||
this.tpgSet3.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet3.Name = "tpgSet3";
|
||||
this.tpgSet3.Size = new System.Drawing.Size(482, 135);
|
||||
this.tpgSet3.TabIndex = 2;
|
||||
this.tpgSet3.Text = "Key Set #3";
|
||||
this.tpgSet3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlBandaiMicrophone3
|
||||
//
|
||||
this.ctrlBandaiMicrophone3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlBandaiMicrophone3.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlBandaiMicrophone3.Name = "ctrlBandaiMicrophone3";
|
||||
this.ctrlBandaiMicrophone3.Size = new System.Drawing.Size(482, 135);
|
||||
this.ctrlBandaiMicrophone3.TabIndex = 1;
|
||||
//
|
||||
// tpgSet4
|
||||
//
|
||||
this.tpgSet4.Controls.Add(this.ctrlBandaiMicrophone4);
|
||||
this.tpgSet4.Location = new System.Drawing.Point(4, 23);
|
||||
this.tpgSet4.Name = "tpgSet4";
|
||||
this.tpgSet4.Size = new System.Drawing.Size(482, 135);
|
||||
this.tpgSet4.TabIndex = 3;
|
||||
this.tpgSet4.Text = "Key Set #4";
|
||||
this.tpgSet4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ctrlBandaiMicrophone4
|
||||
//
|
||||
this.ctrlBandaiMicrophone4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ctrlBandaiMicrophone4.Location = new System.Drawing.Point(0, 0);
|
||||
this.ctrlBandaiMicrophone4.Name = "ctrlBandaiMicrophone4";
|
||||
this.ctrlBandaiMicrophone4.Size = new System.Drawing.Size(482, 135);
|
||||
this.ctrlBandaiMicrophone4.TabIndex = 1;
|
||||
//
|
||||
// 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.mnuFceuxLayout,
|
||||
this.mnuNestopiaLayout});
|
||||
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";
|
||||
//
|
||||
// mnuArrowLayout
|
||||
//
|
||||
this.mnuArrowLayout.Name = "mnuArrowLayout";
|
||||
this.mnuArrowLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuArrowLayout.Text = "Arrow Keys Layout";
|
||||
//
|
||||
// mnuFceuxLayout
|
||||
//
|
||||
this.mnuFceuxLayout.Name = "mnuFceuxLayout";
|
||||
this.mnuFceuxLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuFceuxLayout.Text = "FCEUX Default";
|
||||
//
|
||||
// mnuNestopiaLayout
|
||||
//
|
||||
this.mnuNestopiaLayout.Name = "mnuNestopiaLayout";
|
||||
this.mnuNestopiaLayout.Size = new System.Drawing.Size(172, 22);
|
||||
this.mnuNestopiaLayout.Text = "Nestopia Default";
|
||||
//
|
||||
// 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";
|
||||
//
|
||||
// mnuXboxLayout2
|
||||
//
|
||||
this.mnuXboxLayout2.Name = "mnuXboxLayout2";
|
||||
this.mnuXboxLayout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuXboxLayout2.Text = "Controller #2";
|
||||
//
|
||||
// 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";
|
||||
//
|
||||
// mnuPs4Layout2
|
||||
//
|
||||
this.mnuPs4Layout2.Name = "mnuPs4Layout2";
|
||||
this.mnuPs4Layout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuPs4Layout2.Text = "Controller #2";
|
||||
//
|
||||
// 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";
|
||||
//
|
||||
// mnuSnes30Layout2
|
||||
//
|
||||
this.mnuSnes30Layout2.Name = "mnuSnes30Layout2";
|
||||
this.mnuSnes30Layout2.Size = new System.Drawing.Size(143, 22);
|
||||
this.mnuSnes30Layout2.Text = "Controller #2";
|
||||
//
|
||||
// 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(496, 31);
|
||||
this.ctrlKeyBindingHint1.TabIndex = 24;
|
||||
//
|
||||
// frmBandaiMicrophone
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(496, 228);
|
||||
this.Controls.Add(this.tlpMain);
|
||||
this.Controls.Add(this.ctrlKeyBindingHint1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "frmBandaiMicrophone";
|
||||
this.Text = "Bandai Microphone";
|
||||
this.Controls.SetChildIndex(this.ctrlKeyBindingHint1, 0);
|
||||
this.Controls.SetChildIndex(this.baseConfigPanel, 0);
|
||||
this.Controls.SetChildIndex(this.tlpMain, 0);
|
||||
this.baseConfigPanel.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.ResumeLayout(false);
|
||||
this.flowLayoutPanel2.PerformLayout();
|
||||
this.tlpMain.ResumeLayout(false);
|
||||
this.tabMain.ResumeLayout(false);
|
||||
this.tpgSet1.ResumeLayout(false);
|
||||
this.tpgSet2.ResumeLayout(false);
|
||||
this.tpgSet3.ResumeLayout(false);
|
||||
this.tpgSet4.ResumeLayout(false);
|
||||
this.mnuStripPreset.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||
private System.Windows.Forms.Button btnClear;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpMain;
|
||||
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.ToolStripMenuItem mnuFceuxLayout;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuNestopiaLayout;
|
||||
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.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 ctrlKeyBindingHint ctrlKeyBindingHint1;
|
||||
private System.Windows.Forms.Button btnSetDefault;
|
||||
private ctrlBandaiMicrophone ctrlBandaiMicrophone1;
|
||||
private ctrlBandaiMicrophone ctrlBandaiMicrophone2;
|
||||
private ctrlBandaiMicrophone ctrlBandaiMicrophone3;
|
||||
private ctrlBandaiMicrophone ctrlBandaiMicrophone4;
|
||||
}
|
||||
}
|
43
GUI.NET/Forms/Config/Controllers/frmBandaiMicrophone.cs
Normal file
43
GUI.NET/Forms/Config/Controllers/frmBandaiMicrophone.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
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 frmBandaiMicrophone : BaseInputConfigForm
|
||||
{
|
||||
public frmBandaiMicrophone(ControllerInfo controllerInfo)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if(!this.DesignMode) {
|
||||
SetMainTab(this.tabMain);
|
||||
|
||||
Entity = controllerInfo;
|
||||
|
||||
ctrlBandaiMicrophone1.Initialize(controllerInfo.Keys[0]);
|
||||
ctrlBandaiMicrophone2.Initialize(controllerInfo.Keys[1]);
|
||||
ctrlBandaiMicrophone3.Initialize(controllerInfo.Keys[2]);
|
||||
ctrlBandaiMicrophone4.Initialize(controllerInfo.Keys[3]);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearCurrentTab();
|
||||
}
|
||||
|
||||
private void btnSetDefault_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetControllerControl().Initialize(Presets.BandaiMicrophone);
|
||||
}
|
||||
}
|
||||
}
|
175
GUI.NET/Forms/Config/Controllers/frmBandaiMicrophone.resx
Normal file
175
GUI.NET/Forms/Config/Controllers/frmBandaiMicrophone.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>
|
58
GUI.NET/Forms/Config/frmInputConfig.Designer.cs
generated
58
GUI.NET/Forms/Config/frmInputConfig.Designer.cs
generated
|
@ -54,6 +54,9 @@
|
|||
this.picWarning = new System.Windows.Forms.PictureBox();
|
||||
this.lblKeyBinding = new System.Windows.Forms.Label();
|
||||
this.btnSetupExp = new System.Windows.Forms.Button();
|
||||
this.lblCartridge = new System.Windows.Forms.Label();
|
||||
this.cboCartridge = new System.Windows.Forms.ComboBox();
|
||||
this.btnSetupCartridge = new System.Windows.Forms.Button();
|
||||
this.tpgAdvanced = new System.Windows.Forms.TabPage();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.grpDisplayInput = new System.Windows.Forms.GroupBox();
|
||||
|
@ -83,7 +86,7 @@
|
|||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 308);
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 242);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(370, 29);
|
||||
//
|
||||
// tabMain
|
||||
|
@ -94,7 +97,7 @@
|
|||
this.tabMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabMain.Name = "tabMain";
|
||||
this.tabMain.SelectedIndex = 0;
|
||||
this.tabMain.Size = new System.Drawing.Size(370, 308);
|
||||
this.tabMain.Size = new System.Drawing.Size(370, 242);
|
||||
this.tabMain.TabIndex = 11;
|
||||
//
|
||||
// tpgControllers
|
||||
|
@ -102,7 +105,7 @@
|
|||
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(362, 282);
|
||||
this.tpgControllers.Size = new System.Drawing.Size(362, 216);
|
||||
this.tpgControllers.TabIndex = 0;
|
||||
this.tpgControllers.Text = "Controllers";
|
||||
this.tpgControllers.UseVisualStyleBackColor = true;
|
||||
|
@ -133,10 +136,13 @@
|
|||
this.tlpControllers.Controls.Add(this.chkAutoConfigureInput, 0, 2);
|
||||
this.tlpControllers.Controls.Add(this.pnlConflictWarning, 0, 0);
|
||||
this.tlpControllers.Controls.Add(this.btnSetupExp, 2, 6);
|
||||
this.tlpControllers.Controls.Add(this.lblCartridge, 0, 9);
|
||||
this.tlpControllers.Controls.Add(this.cboCartridge, 1, 9);
|
||||
this.tlpControllers.Controls.Add(this.btnSetupCartridge, 2, 9);
|
||||
this.tlpControllers.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpControllers.Location = new System.Drawing.Point(0, 0);
|
||||
this.tlpControllers.Name = "tlpControllers";
|
||||
this.tlpControllers.RowCount = 10;
|
||||
this.tlpControllers.RowCount = 11;
|
||||
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.Absolute, 25F));
|
||||
|
@ -146,8 +152,9 @@
|
|||
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.Size = new System.Drawing.Size(362, 282);
|
||||
this.tlpControllers.Size = new System.Drawing.Size(362, 216);
|
||||
this.tlpControllers.TabIndex = 0;
|
||||
//
|
||||
// btnSetupP4
|
||||
|
@ -411,12 +418,44 @@
|
|||
this.btnSetupExp.Visible = false;
|
||||
this.btnSetupExp.Click += new System.EventHandler(this.btnSetup_Click);
|
||||
//
|
||||
// lblCartridge
|
||||
//
|
||||
this.lblCartridge.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblCartridge.AutoSize = true;
|
||||
this.lblCartridge.Location = new System.Drawing.Point(3, 289);
|
||||
this.lblCartridge.Name = "lblCartridge";
|
||||
this.lblCartridge.Size = new System.Drawing.Size(52, 13);
|
||||
this.lblCartridge.TabIndex = 21;
|
||||
this.lblCartridge.Text = "Cartridge:";
|
||||
//
|
||||
// cboCartridge
|
||||
//
|
||||
this.cboCartridge.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.cboCartridge.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboCartridge.FormattingEnabled = true;
|
||||
this.cboCartridge.Location = new System.Drawing.Point(90, 284);
|
||||
this.cboCartridge.Name = "cboCartridge";
|
||||
this.cboCartridge.Size = new System.Drawing.Size(201, 21);
|
||||
this.cboCartridge.TabIndex = 23;
|
||||
//
|
||||
// btnSetupCartridge
|
||||
//
|
||||
this.btnSetupCartridge.AutoSize = true;
|
||||
this.btnSetupCartridge.Location = new System.Drawing.Point(297, 284);
|
||||
this.btnSetupCartridge.Name = "btnSetupCartridge";
|
||||
this.btnSetupCartridge.Size = new System.Drawing.Size(62, 23);
|
||||
this.btnSetupCartridge.TabIndex = 24;
|
||||
this.btnSetupCartridge.Text = "Setup";
|
||||
this.btnSetupCartridge.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSetupCartridge.UseVisualStyleBackColor = true;
|
||||
this.btnSetupCartridge.Click += new System.EventHandler(this.btnSetupCartridge_Click);
|
||||
//
|
||||
// tpgAdvanced
|
||||
//
|
||||
this.tpgAdvanced.Controls.Add(this.tableLayoutPanel2);
|
||||
this.tpgAdvanced.Location = new System.Drawing.Point(4, 22);
|
||||
this.tpgAdvanced.Name = "tpgAdvanced";
|
||||
this.tpgAdvanced.Size = new System.Drawing.Size(362, 282);
|
||||
this.tpgAdvanced.Size = new System.Drawing.Size(362, 313);
|
||||
this.tpgAdvanced.TabIndex = 5;
|
||||
this.tpgAdvanced.Text = "Advanced";
|
||||
this.tpgAdvanced.UseVisualStyleBackColor = true;
|
||||
|
@ -432,7 +471,7 @@
|
|||
this.tableLayoutPanel2.RowCount = 2;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(362, 282);
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(362, 313);
|
||||
this.tableLayoutPanel2.TabIndex = 0;
|
||||
//
|
||||
// grpDisplayInput
|
||||
|
@ -562,7 +601,7 @@
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.ClientSize = new System.Drawing.Size(370, 337);
|
||||
this.ClientSize = new System.Drawing.Size(370, 271);
|
||||
this.Controls.Add(this.tabMain);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
|
@ -634,5 +673,8 @@
|
|||
private System.Windows.Forms.Label lblKeyBinding;
|
||||
private System.Windows.Forms.PictureBox picWarning;
|
||||
private System.Windows.Forms.Button btnSetupExp;
|
||||
private System.Windows.Forms.Label lblCartridge;
|
||||
private System.Windows.Forms.ComboBox cboCartridge;
|
||||
private System.Windows.Forms.Button btnSetupCartridge;
|
||||
}
|
||||
}
|
|
@ -13,6 +13,8 @@ namespace Mesen.GUI.Forms.Config
|
|||
{
|
||||
public partial class frmInputConfig : BaseConfigForm
|
||||
{
|
||||
private bool _hasCartridgeInput = false;
|
||||
|
||||
public frmInputConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -42,10 +44,32 @@ namespace Mesen.GUI.Forms.Config
|
|||
AddBinding("DisplayInputPosition", cboDisplayInputPosition);
|
||||
AddBinding("DisplayInputHorizontally", chkDisplayInputHorizontally);
|
||||
|
||||
UpdateConflictWarning();
|
||||
|
||||
//Sort expansion port dropdown alphabetically, but keep the "None" option at the top
|
||||
SortDropdown(cboExpansionPort, ResourceHelper.GetEnumText(InteropEmu.ExpansionPortDevice.None));
|
||||
|
||||
UpdateCartridgeInputUi();
|
||||
UpdateConflictWarning();
|
||||
}
|
||||
|
||||
private void UpdateCartridgeInputUi()
|
||||
{
|
||||
ConsoleFeatures features = InteropEmu.GetAvailableFeatures();
|
||||
bool hasCartridgeInput = features.HasFlag(ConsoleFeatures.BandaiMicrophone) || features.HasFlag(ConsoleFeatures.DatachBarcodeReader);
|
||||
_hasCartridgeInput = hasCartridgeInput;
|
||||
lblCartridge.Visible = hasCartridgeInput;
|
||||
cboCartridge.Visible = hasCartridgeInput;
|
||||
btnSetupCartridge.Visible = hasCartridgeInput;
|
||||
btnSetupCartridge.Enabled = features.HasFlag(ConsoleFeatures.BandaiMicrophone);
|
||||
if(hasCartridgeInput) {
|
||||
if(features.HasFlag(ConsoleFeatures.BandaiMicrophone)) {
|
||||
cboCartridge.Items.Add(ResourceHelper.GetMessage("BandaiMicrophone"));
|
||||
cboCartridge.SelectedIndex = 0;
|
||||
} else if(features.HasFlag(ConsoleFeatures.DatachBarcodeReader)) {
|
||||
cboCartridge.Items.Add(ResourceHelper.GetMessage("DatachBarcodeReader"));
|
||||
cboCartridge.SelectedIndex = 0;
|
||||
}
|
||||
this.Height += (int)(30 * _yFactor);
|
||||
}
|
||||
}
|
||||
|
||||
private void SortDropdown(ComboBox dropdown, string optionAtTop)
|
||||
|
@ -361,31 +385,41 @@ namespace Mesen.GUI.Forms.Config
|
|||
}
|
||||
|
||||
if(frm != null) {
|
||||
Button btn = (Button)sender;
|
||||
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(frm.Width + point.X > screen.Right) {
|
||||
//Show on left instead
|
||||
point.X -= frm.Width - btn.Width;
|
||||
}
|
||||
|
||||
frm.Text = selectedText;
|
||||
frm.StartPosition = FormStartPosition.Manual;
|
||||
frm.Top = point.Y;
|
||||
frm.Left = point.X;
|
||||
if(frm.ShowDialog(this) == DialogResult.OK) {
|
||||
UpdateConflictWarning();
|
||||
}
|
||||
frm.Dispose();
|
||||
OpenSetupWindow(frm, (Button)sender, selectedText);
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenSetupWindow(Form frm, Button btn, string title)
|
||||
{
|
||||
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(frm.Width + point.X > screen.Right) {
|
||||
//Show on left instead
|
||||
point.X -= frm.Width - btn.Width;
|
||||
}
|
||||
|
||||
frm.Text = title;
|
||||
frm.StartPosition = FormStartPosition.Manual;
|
||||
frm.Top = point.Y;
|
||||
frm.Left = point.X;
|
||||
if(frm.ShowDialog(this) == DialogResult.OK) {
|
||||
UpdateConflictWarning();
|
||||
}
|
||||
frm.Dispose();
|
||||
}
|
||||
|
||||
private void btnSetupCartridge_Click(object sender, EventArgs e)
|
||||
{
|
||||
Form frm = new frmBandaiMicrophone(((InputInfo)Entity).Controllers[0]);
|
||||
OpenSetupWindow(frm, (Button)sender, cboCartridge.SelectedItem.ToString());
|
||||
}
|
||||
|
||||
private void UpdateConflictWarning()
|
||||
{
|
||||
bool needWarning = false;
|
||||
|
@ -424,7 +458,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
|
||||
if(pnlConflictWarning.Visible != needWarning) {
|
||||
pnlConflictWarning.Visible = needWarning;
|
||||
this.Height = (int)((needWarning ? 360 : 310) * _yFactor);
|
||||
this.Height = (int)(((needWarning ? 360 : 310) + (_hasCartridgeInput ? 30 : 0)) * _yFactor);
|
||||
}
|
||||
if(portConflicts[0] == (btnSetupP1.Image == null)) {
|
||||
btnSetupP1.Image = portConflicts[0] ? Properties.Resources.Warning : null;
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace Mesen.GUI.Forms
|
|||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].PartyTapButtons = presets.PartyTap.PartyTapButtons;
|
||||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].PowerPadButtons = presets.PowerPad.PowerPadButtons;
|
||||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].SuborKeyboardButtons = presets.SuborKeyboard.SuborKeyboardButtons;
|
||||
ConfigManager.Config.InputInfo.Controllers[0].Keys[0].BandaiMicrophoneButtons = presets.BandaiMicrophone.BandaiMicrophoneButtons;
|
||||
}
|
||||
|
||||
ConfigManager.Config.MesenVersion = InteropEmu.GetMesenVersion();
|
||||
|
|
|
@ -655,6 +655,12 @@
|
|||
<Compile Include="Forms\Config\Controllers\ctrlPachinkoConfig.Designer.cs">
|
||||
<DependentUpon>ctrlPachinkoConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlBandaiMicrophone.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\ctrlBandaiMicrophone.Designer.cs">
|
||||
<DependentUpon>ctrlBandaiMicrophone.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmPachinkoConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -667,6 +673,12 @@
|
|||
<Compile Include="Forms\Config\Controllers\frmMouseConfig.Designer.cs">
|
||||
<DependentUpon>frmMouseConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmBandaiMicrophone.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\Controllers\frmBandaiMicrophone.Designer.cs">
|
||||
<DependentUpon>frmBandaiMicrophone.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Config\ctrlDipSwitch.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -1162,6 +1174,9 @@
|
|||
<EmbeddedResource Include="Forms\Config\Controllers\ctrlPachinkoConfig.resx">
|
||||
<DependentUpon>ctrlPachinkoConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\ctrlBandaiMicrophone.resx">
|
||||
<DependentUpon>ctrlBandaiMicrophone.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\frmPachinkoConfig.resx">
|
||||
<DependentUpon>frmPachinkoConfig.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -1169,6 +1184,10 @@
|
|||
<EmbeddedResource Include="Forms\Config\Controllers\frmMouseConfig.resx">
|
||||
<DependentUpon>frmMouseConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\Controllers\frmBandaiMicrophone.resx">
|
||||
<DependentUpon>frmBandaiMicrophone.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Config\ctrlDipSwitch.resx">
|
||||
<DependentUpon>ctrlDipSwitch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -934,6 +934,9 @@ namespace Mesen.GUI
|
|||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 99)]
|
||||
public UInt32[] SuborKeyboardButtons;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
public UInt32[] BandaiMicrophoneButtons;
|
||||
}
|
||||
|
||||
public enum StereoFilter
|
||||
|
@ -1900,6 +1903,8 @@ namespace Mesen.GUI
|
|||
VsSystem = 4,
|
||||
BarcodeReader = 8,
|
||||
TapeRecorder = 16,
|
||||
BandaiMicrophone = 32,
|
||||
DatachBarcodeReader = 64,
|
||||
}
|
||||
|
||||
public enum ScreenRotation
|
||||
|
|
Loading…
Add table
Reference in a new issue