Input GUI: Add tab to remap controls

This commit is contained in:
Steven Cherry 2016-06-11 10:46:36 -05:00
parent e74d322724
commit 93308de8ec
9 changed files with 1217 additions and 6 deletions

View File

@ -22,6 +22,7 @@ set(SRCS
configure_debug.cpp configure_debug.cpp
configure_dialog.cpp configure_dialog.cpp
configure_general.cpp configure_general.cpp
configure_input.cpp
game_list.cpp game_list.cpp
hotkeys.cpp hotkeys.cpp
main.cpp main.cpp
@ -52,6 +53,7 @@ set(HEADERS
configure_debug.h configure_debug.h
configure_dialog.h configure_dialog.h
configure_general.h configure_general.h
configure_input.h
game_list.h game_list.h
game_list_p.h game_list_p.h
hotkeys.h hotkeys.h
@ -69,6 +71,7 @@ set(UIS
configure_audio.ui configure_audio.ui
configure_debug.ui configure_debug.ui
configure_general.ui configure_general.ui
configure_input.ui
hotkeys.ui hotkeys.ui
main.ui main.ui
) )

View File

@ -2,15 +2,12 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <QSettings>
#include <QString>
#include <QStringList>
#include "citra_qt/config.h" #include "citra_qt/config.h"
#include "citra_qt/ui_settings.h" #include "citra_qt/ui_settings.h"
#include "common/file_util.h" #include "common/file_util.h"
#include "core/settings.h"
Config::Config() { Config::Config() {
// TODO: Don't hardcode the path; let the frontend decide where to put the config files. // TODO: Don't hardcode the path; let the frontend decide where to put the config files.
@ -21,7 +18,7 @@ Config::Config() {
Reload(); Reload();
} }
static const std::array<QVariant, Settings::NativeInput::NUM_INPUTS> defaults = { const std::array<QVariant, Settings::NativeInput::NUM_INPUTS> defaults = {
// directly mapped keys // directly mapped keys
Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X,
Qt::Key_Q, Qt::Key_W, Qt::Key_1, Qt::Key_2, Qt::Key_Q, Qt::Key_W, Qt::Key_1, Qt::Key_2,

View File

@ -5,6 +5,10 @@
#pragma once #pragma once
#include <string> #include <string>
#include "core/settings.h"
#include <QSettings>
#include <QString>
#include <QStringList>
class QSettings; class QSettings;
@ -21,3 +25,4 @@ public:
void Reload(); void Reload();
void Save(); void Save();
}; };
extern const std::array<QVariant, Settings::NativeInput::NUM_INPUTS> defaults;

View File

@ -24,7 +24,7 @@
<string>General</string> <string>General</string>
</attribute> </attribute>
</widget> </widget>
<widget class="QWidget" name="inputTab"> <widget class="ConfigureInput" name="inputTab">
<attribute name="title"> <attribute name="title">
<string>Input</string> <string>Input</string>
</attribute> </attribute>
@ -69,6 +69,12 @@
<header>configure_debug.h</header> <header>configure_debug.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ConfigureInput</class>
<extends>QWidget</extends>
<header>configure_input.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections> <connections>

View File

@ -27,4 +27,5 @@ void ConfigureDialog::applyConfiguration() {
ui->generalTab->applyConfiguration(); ui->generalTab->applyConfiguration();
ui->audioTab->applyConfiguration(); ui->audioTab->applyConfiguration();
ui->debugTab->applyConfiguration(); ui->debugTab->applyConfiguration();
ui->inputTab->applyConfiguration();
} }

View File

@ -0,0 +1,178 @@
// Copyright 2016 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "configure_input.h"
ConfigureInput::ConfigureInput(QWidget *parent) :
QWidget(parent),
ui(new Ui::ConfigureInput)
{
ui->setupUi(this);
//Initialize mapping of input enum to UI button.
input_mapping = {
{ std::make_pair(Settings::NativeInput::Values::A, ui->btnFaceA) },
{ std::make_pair(Settings::NativeInput::Values::B, ui->btnFaceB) },
{ std::make_pair(Settings::NativeInput::Values::X, ui->btnFaceX) },
{ std::make_pair(Settings::NativeInput::Values::Y, ui->btnFaceY) },
{ std::make_pair(Settings::NativeInput::Values::L, ui->btnShdrL) },
{ std::make_pair(Settings::NativeInput::Values::R, ui->btnShdrR) },
{ std::make_pair(Settings::NativeInput::Values::ZL, ui->btnShdrZL) },
{ std::make_pair(Settings::NativeInput::Values::ZR, ui->btnShdrZR) },
{ std::make_pair(Settings::NativeInput::Values::START, ui->btnStart) },
{ std::make_pair(Settings::NativeInput::Values::SELECT, ui->btnSelect) },
{ std::make_pair(Settings::NativeInput::Values::HOME, ui->btnHome) },
{ std::make_pair(Settings::NativeInput::Values::DUP, ui->btnDirUp) },
{ std::make_pair(Settings::NativeInput::Values::DDOWN, ui->btnDirDown) },
{ std::make_pair(Settings::NativeInput::Values::DLEFT, ui->btnDirLeft) },
{ std::make_pair(Settings::NativeInput::Values::DRIGHT, ui->btnDirRight) },
{ std::make_pair(Settings::NativeInput::Values::CUP, ui->btnStickUp) },
{ std::make_pair(Settings::NativeInput::Values::CDOWN, ui->btnStickDown) },
{ std::make_pair(Settings::NativeInput::Values::CLEFT, ui->btnStickLeft) },
{ std::make_pair(Settings::NativeInput::Values::CRIGHT, ui->btnStickRight) },
{ std::make_pair(Settings::NativeInput::Values::CIRCLE_UP, ui->btnCircleUp) },
{ std::make_pair(Settings::NativeInput::Values::CIRCLE_DOWN, ui->btnCircleDown) },
{ std::make_pair(Settings::NativeInput::Values::CIRCLE_LEFT, ui->btnCircleLeft) },
{ std::make_pair(Settings::NativeInput::Values::CIRCLE_RIGHT, ui->btnCircleRight) },
};
//Attach handle click method to each button click.
for (auto &ent1 : input_mapping) {
connect(ent1.second, &QPushButton::released, this, &ConfigureInput::HandleClick);
}
connect(ui->btnRestoreDefaults, &QPushButton::released, this, &ConfigureInput::RestoreDefaults);
setFocusPolicy(Qt::ClickFocus);
this->setConfiguration();
}
ConfigureInput::~ConfigureInput()
{
}
///Event handler for all button released() event.
void ConfigureInput::HandleClick()
{
QPushButton* sender = qobject_cast<QPushButton*>(QObject::sender());
sender->setText("[waiting]");
sender->setFocus();
grabKeyboard();
grabMouse();
changingButton = sender;
}
///Save all button configurations to settings file
void ConfigureInput::applyConfiguration()
{
for (int i = 0; i < Settings::NativeInput::NUM_INPUTS - 1; ++i) {
int value = GetKeyValue(input_mapping[Settings::NativeInput::Values(i)]->text());
Settings::values.input_mappings[Settings::NativeInput::All[i]] = value;
}
Settings::Apply();
}
///Load configuration settings into button text
void ConfigureInput::setConfiguration()
{
for (int i = 0; i < Settings::NativeInput::NUM_INPUTS - 1; ++i) {
QString keyValue = GetKeyName(Settings::values.input_mappings[i]);
input_mapping[Settings::NativeInput::Values(i)]->setText(keyValue);
}
}
///Handle key press event for input tab when a button is 'waiting'.
void ConfigureInput::keyPressEvent(QKeyEvent *event)
{
if (changingButton != nullptr && event->key() > 0)
{
keysPressed.push_back(event->key());
//Can't save Modifier + Keys yet as input. Will re-enable after settings refactor
/*if (event->key() == Qt::Key_Shift)
return;
else if (event->key() == Qt::Key_Control)
return;
else if (event->key() == Qt::Key_Alt)
return;
else if (event->key() == Qt::Key_Meta)
return;
else*/
SetKey();
}
}
///Set button text to name of key pressed.
void ConfigureInput::SetKey()
{
QString keyValue = "";
for (int i : keysPressed) // Will only contain one key until settings refactor
{
keyValue += GetKeyName(i);
}
//RemoveDuplicates(keyValue);
changingButton->setText(keyValue);
keysPressed.clear();
releaseKeyboard();
releaseMouse();
changingButton = nullptr;
}
///Convert key ASCII value to its' letter/name
QString ConfigureInput::GetKeyName(int key_code)
{
if (key_code == Qt::Key_Shift)
return tr("Shift");
else if (key_code == Qt::Key_Control)
return tr("Ctrl");
else if (key_code == Qt::Key_Alt)
return tr("Alt");
else if (key_code == Qt::Key_Meta)
return "";
else if (key_code == -1)
return "";
return QKeySequence(key_code).toString();
}
///Convert letter/name of key to its ASCII value.
int ConfigureInput::GetKeyValue(QString text)
{
if (text == "Shift")
return Qt::Key_Shift;
else if (text == "Ctrl")
return Qt::Key_Control;
else if (text == "Alt")
return Qt::Key_Alt;
else if (text == "Meta")
return -1;
else if (text == "")
return -1;
return QKeySequence(text)[0];
}
///Check all inputs for duplicate keys. Clears out any other button with same key as new button.
void ConfigureInput::RemoveDuplicates(QString newValue)
{
for (int i = 0; i < Settings::NativeInput::NUM_INPUTS - 1; ++i) {
if (changingButton != input_mapping[Settings::NativeInput::Values(i)]) {
QString oldValue = input_mapping[Settings::NativeInput::Values(i)]->text();
if (newValue == oldValue)
input_mapping[Settings::NativeInput::Values(i)]->setText("");
}
}
}
///Restore all buttons to their default values.
void ConfigureInput::RestoreDefaults() {
for (int i = 0; i < Settings::NativeInput::NUM_INPUTS - 1; ++i)
{
QString keyValue = GetKeyName(defaults[i].toInt());
input_mapping[Settings::NativeInput::Values(i)]->setText(keyValue);
}
}

View File

@ -0,0 +1,45 @@
// Copyright 2016 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include <QKeyEvent>
#include <QObject>
#include <QPushButton>
#include <QSettings>
#include <QString>
#include <QWidget>
#include "citra_qt/config.h"
#include "core/settings.h"
#include "ui_configure_input.h"
namespace Ui {
class ConfigureInput;
}
class ConfigureInput : public QWidget
{
Q_OBJECT
public:
explicit ConfigureInput(QWidget *parent = 0);
~ConfigureInput();
void applyConfiguration();
private:
std::unique_ptr<Ui::ConfigureInput> ui;
std::map<Settings::NativeInput::Values, QPushButton*> input_mapping;
std::vector<int> keysPressed;
QPushButton* changingButton = nullptr; /// button currently waiting for key press.
void HandleClick();
void setConfiguration();
void SetKey();
void RemoveDuplicates(QString newValue);
void RestoreDefaults();
virtual void keyPressEvent(QKeyEvent *event);
QString GetKeyName(int key_code);
int GetKeyValue(QString text);
};

View File

@ -0,0 +1,975 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfigureInput</class>
<widget class="QWidget" name="ConfigureInput">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>457</height>
</rect>
</property>
<property name="windowTitle">
<string>ConfigureInput</string>
</property>
<widget class="QGroupBox" name="faceButtons">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>181</width>
<height>130</height>
</rect>
</property>
<property name="title">
<string>Face Buttons</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>A:</string>
</property>
</widget>
<widget class="QPushButton" name="btnFaceA">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_2" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>B:</string>
</property>
</widget>
<widget class="QPushButton" name="btnFaceB">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_3" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>X:</string>
</property>
</widget>
<widget class="QPushButton" name="btnFaceX">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_4" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Y:</string>
</property>
</widget>
<widget class="QPushButton" name="btnFaceY">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="faceButtons_2">
<property name="geometry">
<rect>
<x>200</x>
<y>0</y>
<width>181</width>
<height>130</height>
</rect>
</property>
<property name="title">
<string>Directional Pad</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="widget_5" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Up:</string>
</property>
</widget>
<widget class="QPushButton" name="btnDirUp">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_8" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Left:</string>
</property>
</widget>
<widget class="QPushButton" name="btnDirLeft">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_7" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Right:</string>
</property>
</widget>
<widget class="QPushButton" name="btnDirRight">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_6" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Down:</string>
</property>
</widget>
<widget class="QPushButton" name="btnDirDown">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="faceButtons_3">
<property name="geometry">
<rect>
<x>10</x>
<y>140</y>
<width>181</width>
<height>130</height>
</rect>
</property>
<property name="title">
<string>Shoulder Buttons</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="widget_9" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_9">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>L:</string>
</property>
</widget>
<widget class="QPushButton" name="btnShdrL">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_10" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_10">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ZR:</string>
</property>
</widget>
<widget class="QPushButton" name="btnShdrZR">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_11" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>R:</string>
</property>
</widget>
<widget class="QPushButton" name="btnShdrR">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_12" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_12">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ZL:</string>
</property>
</widget>
<widget class="QPushButton" name="btnShdrZL">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="faceButtons_4">
<property name="geometry">
<rect>
<x>200</x>
<y>140</y>
<width>181</width>
<height>130</height>
</rect>
</property>
<property name="title">
<string>Circle Pad</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="widget_13" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Left:</string>
</property>
</widget>
<widget class="QPushButton" name="btnCircleLeft">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_14" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_14">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Down:</string>
</property>
</widget>
<widget class="QPushButton" name="btnCircleDown">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_15" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Right:</string>
</property>
</widget>
<widget class="QPushButton" name="btnCircleRight">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_16" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_16">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Up:</string>
</property>
</widget>
<widget class="QPushButton" name="btnCircleUp">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="faceButtons_5">
<property name="geometry">
<rect>
<x>10</x>
<y>280</y>
<width>181</width>
<height>130</height>
</rect>
</property>
<property name="title">
<string>C-Stick</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="widget_17" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_17">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Left:</string>
</property>
</widget>
<widget class="QPushButton" name="btnStickLeft">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_18" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_18">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Down:</string>
</property>
</widget>
<widget class="QPushButton" name="btnStickDown">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_19" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_19">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Right:</string>
</property>
</widget>
<widget class="QPushButton" name="btnStickRight">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_20" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_20">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Up:</string>
</property>
</widget>
<widget class="QPushButton" name="btnStickUp">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="faceButtons_6">
<property name="geometry">
<rect>
<x>200</x>
<y>280</y>
<width>181</width>
<height>130</height>
</rect>
</property>
<property name="title">
<string>System Buttons</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="widget_21" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_21">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Start:</string>
</property>
</widget>
<widget class="QPushButton" name="btnStart">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_23" native="true">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_23">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Select:</string>
</property>
</widget>
<widget class="QPushButton" name="btnSelect">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_24" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>71</width>
<height>50</height>
</rect>
</property>
<widget class="QLabel" name="label_24">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Home:</string>
</property>
</widget>
<widget class="QPushButton" name="btnHome">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>71</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string />
</property>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="btnRestoreDefaults">
<property name="geometry">
<rect>
<x>270</x>
<y>420</y>
<width>110</width>
<height>28</height>
</rect>
</property>
<property name="text">
<string>Restore Defaults</string>
</property>
</widget>
</widget>
<layoutdefault spacing="6" margin="11" />
<resources />
<connections />
</ui>

View File

@ -513,6 +513,7 @@ void GMainWindow::OnConfigure() {
if (result == QDialog::Accepted) if (result == QDialog::Accepted)
{ {
configureDialog.applyConfiguration(); configureDialog.applyConfiguration();
render_window->ReloadSetKeymaps();
config->Save(); config->Save();
} }
} }