mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-02 07:37:10 +02:00
more qt fixes
This commit is contained in:
parent
d8e1880794
commit
777c36e79f
8 changed files with 38 additions and 33 deletions
|
|
@ -39,7 +39,7 @@ const std::array<std::string, ConfigureInputPlayer::ANALOG_SUB_BUTTONS_NUM>
|
|||
|
||||
namespace {
|
||||
|
||||
QString GetKeyName(int key_code) {
|
||||
QString GetInputKeyName(int key_code) {
|
||||
switch (key_code) {
|
||||
case Qt::Key_Shift:
|
||||
return QObject::tr("Shift");
|
||||
|
|
@ -54,7 +54,7 @@ QString GetKeyName(int key_code) {
|
|||
}
|
||||
}
|
||||
|
||||
QString GetButtonName(Common::Input::ButtonNames button_name) {
|
||||
QString GetInputButtonName(Common::Input::ButtonNames button_name) {
|
||||
switch (button_name) {
|
||||
case Common::Input::ButtonNames::ButtonLeft:
|
||||
return QObject::tr("Left");
|
||||
|
|
@ -187,11 +187,11 @@ QString ConfigureInputPlayer::ButtonToText(const Common::ParamPackage& param) {
|
|||
const QString inverted = QString::fromStdString(param.Get("inverted", false) ? "!" : "");
|
||||
const QString invert = QString::fromStdString(param.Get("invert", "+") == "-" ? "-" : "");
|
||||
const QString turbo = QString::fromStdString(param.Get("turbo", false) ? "$" : "");
|
||||
const auto common_button_name = input_subsystem->GetButtonName(param);
|
||||
const auto common_button_name = input_subsystem->GetInputButtonName(param);
|
||||
|
||||
// Retrieve the names from Qt
|
||||
if (param.Get("engine", "") == "keyboard") {
|
||||
const QString button_str = GetKeyName(param.Get("code", 0));
|
||||
const QString button_str = GetInputKeyName(param.Get("code", 0));
|
||||
return QObject::tr("%1%2%3%4").arg(turbo, toggle, inverted, button_str);
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ QString ConfigureInputPlayer::ButtonToText(const Common::ParamPackage& param) {
|
|||
}
|
||||
}
|
||||
|
||||
QString button_name = GetButtonName(common_button_name);
|
||||
QString button_name = GetInputButtonName(common_button_name);
|
||||
if (param.Has("hat")) {
|
||||
return QObject::tr("%1%2%3Hat %4").arg(turbo, toggle, inverted, button_name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue