mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-26 09:28:59 +02:00
more qt fixes
This commit is contained in:
parent
082854b202
commit
81230b00ea
8 changed files with 39 additions and 34 deletions
|
|
@ -29,7 +29,7 @@ const std::array<std::string, ConfigureRingController::ANALOG_SUB_BUTTONS_NUM>
|
|||
|
||||
namespace {
|
||||
|
||||
QString GetKeyName(int key_code) {
|
||||
QString GetRingconKeyName(int key_code) {
|
||||
switch (key_code) {
|
||||
case Qt::Key_Shift:
|
||||
return QObject::tr("Shift");
|
||||
|
|
@ -44,7 +44,7 @@ QString GetKeyName(int key_code) {
|
|||
}
|
||||
}
|
||||
|
||||
QString GetButtonName(Common::Input::ButtonNames button_name) {
|
||||
QString GetRingconButtonName(Common::Input::ButtonNames button_name) {
|
||||
switch (button_name) {
|
||||
case Common::Input::ButtonNames::ButtonLeft:
|
||||
return QObject::tr("Left");
|
||||
|
|
@ -397,11 +397,11 @@ QString ConfigureRingController::ButtonToText(const Common::ParamPackage& param)
|
|||
|
||||
const QString toggle = QString::fromStdString(param.Get("toggle", false) ? "~" : "");
|
||||
const QString inverted = QString::fromStdString(param.Get("inverted", false) ? "!" : "");
|
||||
const auto common_button_name = input_subsystem->GetButtonName(param);
|
||||
const auto common_button_name = input_subsystem->GetRingconButtonName(param);
|
||||
|
||||
// Retrieve the names from Qt
|
||||
if (param.Get("engine", "") == "keyboard") {
|
||||
const QString button_str = GetKeyName(param.Get("code", 0));
|
||||
const QString button_str = GetRingconKeyName(param.Get("code", 0));
|
||||
return QObject::tr("%1%2").arg(toggle, button_str);
|
||||
}
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ QString ConfigureRingController::ButtonToText(const Common::ParamPackage& param)
|
|||
}
|
||||
}
|
||||
|
||||
QString button_name = GetButtonName(common_button_name);
|
||||
QString button_name = GetRingconButtonName(common_button_name);
|
||||
if (param.Has("hat")) {
|
||||
return QObject::tr("%1%2Hat %3").arg(toggle, inverted, button_name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue