mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Use official names for GameCube controller sticks
Main Stick is changed to Control Stick and C-Stick is changed to C Stick. A new ui_name variable is added to ControlGroup so that the UI strings in DolphinWX can be updated without breaking backwards compatibility with config INIs and other things that use names as IDs.
This commit is contained in:
@ -94,20 +94,20 @@
|
||||
<string name="button_x">Xボタン</string>
|
||||
<string name="button_y">Yボタン</string>
|
||||
<string name="button_z">Zボタン</string>
|
||||
<string name="dpad_up">D-Pad: ↑</string>
|
||||
<string name="dpad_down">D-Pad: ↓</string>
|
||||
<string name="dpad_left">D-Pad: ←</string>
|
||||
<string name="dpad_right">D-Pad: →</string>
|
||||
<string name="dpad_up">十字キー: ↑</string>
|
||||
<string name="dpad_down">十字キー: ↓</string>
|
||||
<string name="dpad_left">十字キー: ←</string>
|
||||
<string name="dpad_right">十字キー: →</string>
|
||||
<string name="main_stick_up">コントロールスティック: ↑</string>
|
||||
<string name="main_stick_down">コントロールスティック: ↓</string>
|
||||
<string name="main_stick_left">コントロールスティック: ←</string>
|
||||
<string name="main_stick_right">コントロールスティック: →</string>
|
||||
<string name="c_stick_up">C-スティック: ↑</string>
|
||||
<string name="c_stick_down">C-スティック: ↓</string>
|
||||
<string name="c_stick_left">C-スティック: ←</string>
|
||||
<string name="c_stick_right">C-スティック: →</string>
|
||||
<string name="trigger_left">左のトリガー</string>
|
||||
<string name="trigger_right">右のトリガー</string>
|
||||
<string name="c_stick_up">Cスティック: ↑</string>
|
||||
<string name="c_stick_down">Cスティック: ↓</string>
|
||||
<string name="c_stick_left">Cスティック: ←</string>
|
||||
<string name="c_stick_right">Cスティック: →</string>
|
||||
<string name="trigger_left">Lトリガー</string>
|
||||
<string name="trigger_right">Rトリガー</string>
|
||||
<!-- Wiimote (+ extension) only buttons -->
|
||||
<string name="button_one">ボタン1</string>
|
||||
<string name="button_two">ボタン2</string>
|
||||
|
@ -100,10 +100,10 @@
|
||||
<string name="dpad_down">D-Pad Down</string>
|
||||
<string name="dpad_left">D-Pad Left</string>
|
||||
<string name="dpad_right">D-Pad Right</string>
|
||||
<string name="main_stick_up">Main Stick Up</string>
|
||||
<string name="main_stick_down">Main Stick Down</string>
|
||||
<string name="main_stick_left">Main Stick Left</string>
|
||||
<string name="main_stick_right">Main Stick Right</string>
|
||||
<string name="main_stick_up">Control Stick Up</string>
|
||||
<string name="main_stick_down">Control Stick Down</string>
|
||||
<string name="main_stick_left">Control Stick Left</string>
|
||||
<string name="main_stick_right">Control Stick Right</string>
|
||||
<string name="c_stick_up">C Stick Up</string>
|
||||
<string name="c_stick_down">C Stick Down</string>
|
||||
<string name="c_stick_left">C Stick Left</string>
|
||||
|
@ -60,8 +60,8 @@ GCPad::GCPad(const unsigned int index) : m_index(index)
|
||||
m_buttons->controls.emplace_back(new ControlGroup::Input(named_buttons[i]));
|
||||
|
||||
// sticks
|
||||
groups.emplace_back(m_main_stick = new AnalogStick(_trans("Main Stick"), DEFAULT_PAD_STICK_RADIUS));
|
||||
groups.emplace_back(m_c_stick = new AnalogStick(_trans("C-Stick"), DEFAULT_PAD_STICK_RADIUS));
|
||||
groups.emplace_back(m_main_stick = new AnalogStick("Main Stick", _trans("Control Stick"), DEFAULT_PAD_STICK_RADIUS));
|
||||
groups.emplace_back(m_c_stick = new AnalogStick("C-Stick", _trans("C Stick"), DEFAULT_PAD_STICK_RADIUS));
|
||||
|
||||
// triggers
|
||||
groups.emplace_back(m_triggers = new MixedTriggers(_trans("Triggers")));
|
||||
@ -151,7 +151,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
|
||||
set_control(m_dpad, 2, "F"); // Left
|
||||
set_control(m_dpad, 3, "H"); // Right
|
||||
|
||||
// C-Stick
|
||||
// C Stick
|
||||
set_control(m_c_stick, 0, "I"); // Up
|
||||
set_control(m_c_stick, 1, "K"); // Down
|
||||
set_control(m_c_stick, 2, "J"); // Left
|
||||
@ -159,7 +159,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
|
||||
#ifdef _WIN32
|
||||
set_control(m_c_stick, 4, "LCONTROL"); // Modifier
|
||||
|
||||
// Main Stick
|
||||
// Control Stick
|
||||
set_control(m_main_stick, 0, "UP"); // Up
|
||||
set_control(m_main_stick, 1, "DOWN"); // Down
|
||||
set_control(m_main_stick, 2, "LEFT"); // Left
|
||||
@ -169,7 +169,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
|
||||
#elif __APPLE__
|
||||
set_control(m_c_stick, 4, "Left Control"); // Modifier
|
||||
|
||||
// Main Stick
|
||||
// Control Stick
|
||||
set_control(m_main_stick, 0, "Up Arrow"); // Up
|
||||
set_control(m_main_stick, 1, "Down Arrow"); // Down
|
||||
set_control(m_main_stick, 2, "Left Arrow"); // Left
|
||||
@ -180,7 +180,7 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
|
||||
|
||||
set_control(m_c_stick, 4, "Control_L"); // Modifier
|
||||
|
||||
// Main Stick
|
||||
// Control Stick
|
||||
set_control(m_main_stick, 0, "Up"); // Up
|
||||
set_control(m_main_stick, 1, "Down"); // Down
|
||||
set_control(m_main_stick, 2, "Left"); // Left
|
||||
|
@ -946,7 +946,7 @@ ControlGroupsSizer::ControlGroupsSizer(ControllerEmu* const controller, wxWindow
|
||||
{
|
||||
ControlGroupBox* control_group_box = new ControlGroupBox(group.get(), parent, eventsink);
|
||||
wxStaticBoxSizer *control_group =
|
||||
new wxStaticBoxSizer(wxVERTICAL, parent, wxGetTranslation(StrToWxStr(group->name)));
|
||||
new wxStaticBoxSizer(wxVERTICAL, parent, wxGetTranslation(StrToWxStr(group->ui_name)));
|
||||
control_group->Add(control_group_box);
|
||||
|
||||
const size_t grp_size = group->controls.size() + group->settings.size();
|
||||
|
@ -143,7 +143,11 @@ void ControllerEmu::SaveConfig(IniFile::Section *sec, const std::string& base)
|
||||
}
|
||||
|
||||
ControllerEmu::AnalogStick::AnalogStick(const char* const _name, ControlState default_radius)
|
||||
: ControlGroup(_name, GROUP_TYPE_STICK)
|
||||
: AnalogStick(_name, _name, GROUP_TYPE_STICK)
|
||||
{}
|
||||
|
||||
ControllerEmu::AnalogStick::AnalogStick(const char* const _name, const char* const _ui_name, ControlState default_radius)
|
||||
: ControlGroup(_name, _ui_name, GROUP_TYPE_STICK)
|
||||
{
|
||||
for (auto& named_direction : named_directions)
|
||||
controls.emplace_back(new Input(named_direction));
|
||||
|
@ -145,13 +145,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
ControlGroup(const std::string& _name, const unsigned int _type = GROUP_TYPE_OTHER) : name(_name), type(_type) {}
|
||||
ControlGroup(const std::string& _name, const unsigned int _type = GROUP_TYPE_OTHER)
|
||||
: name(_name), ui_name(_name), type(_type) {}
|
||||
ControlGroup(const std::string& _name, const std::string& _ui_name, const unsigned int _type = GROUP_TYPE_OTHER)
|
||||
: name(_name), ui_name(_ui_name), type(_type) {}
|
||||
virtual ~ControlGroup() {}
|
||||
|
||||
virtual void LoadConfig(IniFile::Section *sec, const std::string& defdev = "", const std::string& base = "" );
|
||||
virtual void SaveConfig(IniFile::Section *sec, const std::string& defdev = "", const std::string& base = "" );
|
||||
|
||||
const std::string name;
|
||||
const std::string ui_name;
|
||||
const unsigned int type;
|
||||
|
||||
std::vector<std::unique_ptr<Control>> controls;
|
||||
@ -164,6 +168,7 @@ public:
|
||||
public:
|
||||
// The GameCube controller and Wiimote attachments have a different default radius
|
||||
AnalogStick(const char* const _name, ControlState default_radius);
|
||||
AnalogStick(const char* const _name, const char* const _ui_name, ControlState default_radius);
|
||||
|
||||
void GetState(ControlState* const x, ControlState* const y)
|
||||
{
|
||||
|
Reference in New Issue
Block a user