undo unnecessary newlines, slider range 50-150
This commit is contained in:
parent
504095cea9
commit
8928aa3008
|
@ -461,7 +461,7 @@ public:
|
|||
const int axis_x = params.Get("axis_x", 0);
|
||||
const int axis_y = params.Get("axis_y", 1);
|
||||
const float deadzone = std::clamp(params.Get("deadzone", 0.0f), 0.0f, .99f);
|
||||
const float range = std::clamp(params.Get("range", 0.0f), 0.0f, .99f) + 0.50f;
|
||||
const float range = std::clamp(params.Get("range", 0.0f), 0.50f, 1.50f);
|
||||
auto joystick = state.GetSDLJoystickByGUID(guid, port);
|
||||
|
||||
// This is necessary so accessing GetAxis with axis_x and axis_y won't crash
|
||||
|
|
|
@ -272,6 +272,8 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
ui->sliderRStickDeadzoneAndModifier};
|
||||
analog_map_deadzone_and_modifier_slider_label = {ui->labelLStickDeadzoneAndModifier,
|
||||
ui->labelRStickDeadzoneAndModifier};
|
||||
ui->sliderLStickRange->setRange(50, 150);
|
||||
ui->sliderRStickRange->setRange(50, 150);
|
||||
analog_map_range_slider = {ui->sliderLStickRange, ui->sliderRStickRange};
|
||||
analog_map_range_slider_label = {ui->labelLStickRange, ui->labelRStickRange};
|
||||
|
||||
|
@ -386,7 +388,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
const auto engine = analogs_param[analog_id].Get("engine", "");
|
||||
if (engine == "sdl" || engine == "gcpad") {
|
||||
analog_map_range_slider_label[analog_id]->setText(
|
||||
tr("Range: %1%").arg(slider_value + 50.0f));
|
||||
tr("Range: %1%").arg(slider_value));
|
||||
analogs_param[analog_id].Set("range", slider_value / 100.0f);
|
||||
}
|
||||
});
|
||||
|
@ -613,7 +615,7 @@ void ConfigureInputPlayer::UpdateButtonLabels() {
|
|||
}
|
||||
// QtSlider returns values from 0.0-0.99. We want range to be from 50% to 150%
|
||||
analog_stick_range->setValue(static_cast<int>(param.Get("range", 0.1f) * 100));
|
||||
if (analog_stick_range->value() == 0) {
|
||||
if (analog_stick_range->value() == 50) {
|
||||
analog_stick_range_label->setText(tr("Range: 50%"));
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -222,7 +222,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer name="RStick_verticalSpacer">
|
||||
|
@ -840,7 +839,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
||||
<item row="6" column="1" colspan="2">
|
||||
<layout class="QVBoxLayout" name="sliderLStickRangeVerticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
|
@ -868,7 +866,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<spacer name="LStick_verticalSpacer">
|
||||
|
|
Reference in New Issue