mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 12:11:04 +00:00
Fixup: Add ":" to button label
This commit is contained in:
parent
8cfb4b13f2
commit
5d1df42a01
@ -9,15 +9,6 @@
|
|||||||
|
|
||||||
using namespace Settings::NativeInput;
|
using namespace Settings::NativeInput;
|
||||||
|
|
||||||
std::map<Values, std::string> ButtonNameMap({
|
|
||||||
{ A, "A" }, { B, "B" }, { X, "X" }, { Y, "Y" },
|
|
||||||
{ L, "L" }, { R, "R" }, { ZL, "ZL" }, { ZR, "ZR" },
|
|
||||||
{ DLEFT, "D-Left" }, { DRIGHT, "D-Right" }, { DUP, "D-Up" }, { DDOWN, "D-Down" },
|
|
||||||
{ SLEFT, "S-Left" }, { SRIGHT, "S-Right" }, { SUP, "S-Up" }, { SDOWN, "S-Down" },
|
|
||||||
{ CLEFT, "C-Left" }, { CRIGHT, "C-Right" }, { CUP, "C-Up" }, { CDOWN, "C-Down" },
|
|
||||||
{ START, "Start" }, { SELECT, "Select" }, { HOME, "Home" } }
|
|
||||||
);
|
|
||||||
|
|
||||||
QLineEditKeyConfig::QLineEditKeyConfig(Values button, QWidget* parent)
|
QLineEditKeyConfig::QLineEditKeyConfig(Values button, QWidget* parent)
|
||||||
: QLineEdit(parent), button(button) {}
|
: QLineEdit(parent), button(button) {}
|
||||||
|
|
||||||
|
@ -11,9 +11,6 @@
|
|||||||
|
|
||||||
class QKeyEvent;
|
class QKeyEvent;
|
||||||
|
|
||||||
/// Map a button to its name
|
|
||||||
extern std::map<Settings::NativeInput::Values, std::string> ButtonNameMap;
|
|
||||||
|
|
||||||
/// The LineEdits used for button configuration
|
/// The LineEdits used for button configuration
|
||||||
class QLineEditKeyConfig : public QLineEdit {
|
class QLineEditKeyConfig : public QLineEdit {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -24,6 +24,15 @@ GInputsDialog::GInputsDialog(QWidget* parent) : QDialog(parent) {
|
|||||||
lineEdits[i]->setFocusPolicy(Qt::ClickFocus);
|
lineEdits[i]->setFocusPolicy(Qt::ClickFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string labelArray[] = {
|
||||||
|
"A:", "B:", "X:", "Y:",
|
||||||
|
"L:", "R:", "ZL:", "ZR:",
|
||||||
|
"D-Left:", "D-Right:", "D-Up:", "D-Down:",
|
||||||
|
"S-Left:", "S-Right:", "S-Up:", "S-Down:",
|
||||||
|
"C-Left:", "C-Right:", "C-Up:", "C-Down:",
|
||||||
|
"Start:", "Select:", "Home:"
|
||||||
|
};
|
||||||
|
|
||||||
// put the lineEdits and their labels into a grid
|
// put the lineEdits and their labels into a grid
|
||||||
QGridLayout* grid = new QGridLayout();
|
QGridLayout* grid = new QGridLayout();
|
||||||
size_t size = lineEdits.size();
|
size_t size = lineEdits.size();
|
||||||
@ -32,7 +41,7 @@ GInputsDialog::GInputsDialog(QWidget* parent) : QDialog(parent) {
|
|||||||
int row = i % NUM_ROW;
|
int row = i % NUM_ROW;
|
||||||
int labelColumn = (int)i / NUM_ROW * 2;
|
int labelColumn = (int)i / NUM_ROW * 2;
|
||||||
QLineEditKeyConfig* lineEdit = lineEdits[i];
|
QLineEditKeyConfig* lineEdit = lineEdits[i];
|
||||||
QLabel* label = new QLabel(tr(ButtonNameMap[lineEdit->button].c_str()));
|
QLabel* label = new QLabel(tr(labelArray[lineEdit->button].c_str()));
|
||||||
grid->addWidget(label, row, labelColumn);
|
grid->addWidget(label, row, labelColumn);
|
||||||
grid->addWidget(lineEdit, row, labelColumn + 1);
|
grid->addWidget(lineEdit, row, labelColumn + 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user