mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
Merge pull request #5347 from JosJuice/do-not-translate-button-names
Don't translate button names
This commit is contained in:
@ -968,16 +968,16 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin
|
||||
for (const auto& control : group->controls)
|
||||
{
|
||||
wxStaticText* const label =
|
||||
new wxStaticText(parent, wxID_ANY, wxGetTranslation(StrToWxStr(control->name)));
|
||||
new wxStaticText(parent, wxID_ANY, wxGetTranslation(StrToWxStr(control->ui_name)));
|
||||
|
||||
ControlButton* const control_button =
|
||||
new ControlButton(parent, control->control_ref.get(), control->name, 80);
|
||||
new ControlButton(parent, control->control_ref.get(), control->ui_name, 80);
|
||||
control_button->SetFont(small_font);
|
||||
|
||||
control_buttons.push_back(control_button);
|
||||
if (std::find(exclude_groups.begin(), exclude_groups.end(), control_group->name) ==
|
||||
exclude_groups.end() &&
|
||||
std::find(exclude_buttons.begin(), exclude_buttons.end(), control->name) ==
|
||||
std::find(exclude_buttons.begin(), exclude_buttons.end(), control->ui_name) ==
|
||||
exclude_buttons.end())
|
||||
eventsink->control_buttons.push_back(control_button);
|
||||
|
||||
|
@ -139,7 +139,7 @@ static void DrawButton(const std::vector<unsigned int>& bitmasks, unsigned int b
|
||||
gc->DrawRectangle(n * 12, (row == 0) ? 0 : (row * 11), 14, 12);
|
||||
|
||||
// text
|
||||
const std::string name = g->control_group->controls[(row * 8) + n]->name;
|
||||
const std::string name = g->control_group->controls[(row * 8) + n]->ui_name;
|
||||
// Matrix transformation needs to be disabled so we don't draw scaled/zoomed text.
|
||||
wxGraphicsMatrix old_matrix = gc->GetTransform();
|
||||
gc->SetTransform(null_matrix);
|
||||
@ -399,7 +399,7 @@ static void DrawControlGroupBox(wxGraphicsContext* gc, ControlGroupBox* g)
|
||||
// text
|
||||
// We don't want the text to be scaled/zoomed
|
||||
gc->SetTransform(null_matrix);
|
||||
gc->DrawText(StrToWxStr(g->control_group->controls[n]->name), 3 * g->m_scale,
|
||||
gc->DrawText(StrToWxStr(g->control_group->controls[n]->ui_name), 3 * g->m_scale,
|
||||
(n * 12 + 1) * g->m_scale);
|
||||
gc->SetTransform(scale_matrix);
|
||||
}
|
||||
@ -437,9 +437,9 @@ static void DrawControlGroupBox(wxGraphicsContext* gc, ControlGroupBox* g)
|
||||
// text
|
||||
// We don't want the text to be scaled/zoomed
|
||||
gc->SetTransform(null_matrix);
|
||||
gc->DrawText(StrToWxStr(g->control_group->controls[n + trigger_count]->name), 3 * g->m_scale,
|
||||
(n * 12 + 1) * g->m_scale);
|
||||
gc->DrawText(StrToWxStr(std::string(1, g->control_group->controls[n]->name[0])),
|
||||
gc->DrawText(StrToWxStr(g->control_group->controls[n + trigger_count]->ui_name),
|
||||
3 * g->m_scale, (n * 12 + 1) * g->m_scale);
|
||||
gc->DrawText(StrToWxStr(std::string(1, g->control_group->controls[n]->ui_name[0])),
|
||||
(64 + 3) * g->m_scale, (n * 12 + 1) * g->m_scale);
|
||||
gc->SetTransform(scale_matrix);
|
||||
}
|
||||
|
@ -86,9 +86,9 @@ void TASInputDlg::CreateBaseLayout()
|
||||
m_controls[0] = &m_main_stick.x_cont;
|
||||
m_controls[1] = &m_main_stick.y_cont;
|
||||
|
||||
m_a = CreateButton(_("A"));
|
||||
m_a = CreateButton("A");
|
||||
m_a.checkbox->SetClientData(&m_a);
|
||||
m_b = CreateButton(_("B"));
|
||||
m_b = CreateButton("B");
|
||||
m_b.checkbox->SetClientData(&m_b);
|
||||
m_dpad_up = CreateButton(_("Up"));
|
||||
m_dpad_up.checkbox->SetClientData(&m_dpad_up);
|
||||
@ -140,15 +140,15 @@ void TASInputDlg::CreateWiiLayout(int num)
|
||||
wxStaticBoxSizer* const axisBox =
|
||||
CreateAccelLayout(&m_x_cont, &m_y_cont, &m_z_cont, _("Orientation"));
|
||||
|
||||
m_plus = CreateButton(_("+"));
|
||||
m_plus = CreateButton("+");
|
||||
m_plus.checkbox->SetClientData(&m_plus);
|
||||
m_minus = CreateButton(_("-"));
|
||||
m_minus = CreateButton("-");
|
||||
m_minus.checkbox->SetClientData(&m_minus);
|
||||
m_one = CreateButton(_("1"));
|
||||
m_one = CreateButton("1");
|
||||
m_one.checkbox->SetClientData(&m_one);
|
||||
m_two = CreateButton(_("2"));
|
||||
m_two = CreateButton("2");
|
||||
m_two.checkbox->SetClientData(&m_two);
|
||||
m_home = CreateButton(_("Home"));
|
||||
m_home = CreateButton("HOME");
|
||||
m_home.checkbox->SetClientData(&m_home);
|
||||
|
||||
m_cc_szr = CreateCCLayout();
|
||||
@ -188,9 +188,9 @@ void TASInputDlg::CreateWiiLayout(int num)
|
||||
wxStaticBoxSizer* const nunchukaxisBox =
|
||||
CreateAccelLayout(&m_nx_cont, &m_ny_cont, &m_nz_cont, _("Nunchuk orientation"));
|
||||
|
||||
m_c = CreateButton(_("C"));
|
||||
m_c = CreateButton("C");
|
||||
m_c.checkbox->SetClientData(&m_c);
|
||||
m_z = CreateButton(_("Z"));
|
||||
m_z = CreateButton("Z");
|
||||
m_z.checkbox->SetClientData(&m_z);
|
||||
|
||||
for (Control* const control : m_controls)
|
||||
@ -246,9 +246,8 @@ void TASInputDlg::FinishLayout()
|
||||
|
||||
wxBoxSizer* TASInputDlg::CreateCCLayout()
|
||||
{
|
||||
const std::array<wxString, 15> button_names{{_("Down"), _("Up"), _("Left"), _("Right"), _("A"),
|
||||
_("B"), _("X"), _("Y"), _("+"), _("-"), _("L"),
|
||||
_("R"), _("ZR"), _("ZL"), _("Home")}};
|
||||
const std::array<wxString, 15> button_names{{_("Down"), _("Up"), _("Left"), _("Right"), "A", "B",
|
||||
"X", "Y", "+", "-", "L", "R", "ZR", "ZL", "HOME"}};
|
||||
for (size_t i = 0; i < button_names.size(); ++i)
|
||||
{
|
||||
m_cc_buttons[i] = CreateButton(button_names[i]);
|
||||
@ -386,17 +385,18 @@ void TASInputDlg::CreateGCLayout()
|
||||
control->slider->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnRightClickSlider, this);
|
||||
}
|
||||
|
||||
m_x = CreateButton(_("X"));
|
||||
m_x = CreateButton("X");
|
||||
m_x.checkbox->SetClientData(&m_x);
|
||||
m_y = CreateButton(_("Y"));
|
||||
m_y = CreateButton("Y");
|
||||
m_y.checkbox->SetClientData(&m_y);
|
||||
m_l = CreateButton(_("L"));
|
||||
m_l = CreateButton("L");
|
||||
m_l.checkbox->SetClientData(&m_l);
|
||||
m_r = CreateButton(_("R"));
|
||||
m_r = CreateButton("R");
|
||||
m_r.checkbox->SetClientData(&m_r);
|
||||
m_z = CreateButton(_("Z"));
|
||||
m_z = CreateButton("Z");
|
||||
m_z.checkbox->SetClientData(&m_z);
|
||||
m_start = CreateButton(_("Start"));
|
||||
// i18n: The START/PAUSE button on GameCube controllers
|
||||
m_start = CreateButton(_("START"));
|
||||
m_start.checkbox->SetClientData(&m_start);
|
||||
|
||||
const int space5 = FromDIP(5);
|
||||
|
Reference in New Issue
Block a user