Skip to content

Commit

Permalink
Revert TASInputWindow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pokechu22 committed Jan 28, 2021
1 parent 8153977 commit 9639e95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Source/Core/DolphinQt/TAS/TASInputWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ QGroupBox* TASInputWindow::CreateStickInputs(QString name, QSpinBox*& x_value, Q
return box;
}

QBoxLayout* TASInputWindow::CreateSliderValuePairLayout(QString name, QSpinBox*& value,
int default_, int max, Qt::Key shortcut_key,
QBoxLayout* TASInputWindow::CreateSliderValuePairLayout(QString name, QSpinBox*& value, int default_, u16 max,
Qt::Key shortcut_key,
QWidget* shortcut_widget, bool invert)
{
const QKeySequence shortcut_key_sequence = QKeySequence(Qt::ALT + shortcut_key);
Expand All @@ -136,13 +136,13 @@ QBoxLayout* TASInputWindow::CreateSliderValuePairLayout(QString name, QSpinBox*&

// The shortcut_widget argument needs to specify the container widget that will be hidden/shown.
// This is done to avoid ambigous shortcuts
QSpinBox* TASInputWindow::CreateSliderValuePair(QBoxLayout* layout, int default_, int max,
QSpinBox* TASInputWindow::CreateSliderValuePair(QBoxLayout* layout, int default_, u16 max,
QKeySequence shortcut_key_sequence,
Qt::Orientation orientation,
QWidget* shortcut_widget, bool invert)
{
auto* value = new QSpinBox();
value->setRange(0, max);
value->setRange(0, 99999);
value->setValue(default_);
connect(value, qOverload<int>(&QSpinBox::valueChanged), [value, max](int i) {
if (i > max)
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/DolphinQt/TAS/TASInputWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class TASInputWindow : public QDialog
TASCheckBox* CreateButton(const QString& name);
QGroupBox* CreateStickInputs(QString name, QSpinBox*& x_value, QSpinBox*& y_value, u16 max_x,
u16 max_y, Qt::Key x_shortcut_key, Qt::Key y_shortcut_key);
QBoxLayout* CreateSliderValuePairLayout(QString name, QSpinBox*& value, int default_, int max,
QBoxLayout* CreateSliderValuePairLayout(QString name, QSpinBox*& value, int default_, u16 max,
Qt::Key shortcut_key, QWidget* shortcut_widget,
bool invert = false);
QSpinBox* CreateSliderValuePair(QBoxLayout* layout, int default_, int max,
QSpinBox* CreateSliderValuePair(QBoxLayout* layout, int default_, u16 max,
QKeySequence shortcut_key_sequence, Qt::Orientation orientation,
QWidget* shortcut_widget, bool invert = false);
template <typename UX>
Expand Down

0 comments on commit 9639e95

Please sign in to comment.