ControllerEmu::Cursor: Add input radius/shape settings to IR Cursor mappings to allow use of round inputs in absolute mode. Make relative input option obey the center/width/height settings. Make the mapping indicator pretty and actually show what the relative/center/w/h settings are doing.

This commit is contained in:
Jordan Woyak
2018-12-30 09:10:32 -06:00
parent 247fa8c628
commit 7a00f55cfa
10 changed files with 292 additions and 211 deletions

View File

@ -76,8 +76,8 @@ void ReshapableInput::AddReshapingSettings(ControlState default_radius, ControlS
numeric_settings.emplace_back(std::make_unique<NumericSetting>(_trans("Dead Zone"), 0, 0, 50));
}
ReshapableInput::StateData ReshapableInput::Reshape(ControlState x, ControlState y,
ControlState modifier)
ReshapableInput::ReshapeData ReshapableInput::Reshape(ControlState x, ControlState y,
ControlState modifier)
{
// TODO: make the AtAngle functions work with negative angles:
const ControlState ang = std::atan2(y, x) + MathUtil::TAU;