core/hid: Remove usage of native types, fix a couple of errors with motion
This commit is contained in:
parent
a17550be98
commit
71f9b90dd9
11 changed files with 631 additions and 427 deletions
|
@ -357,7 +357,8 @@ void PlayerControlPreview::DrawLeftController(QPainter& p, const QPointF center)
|
|||
DrawCircle(p, center + QPoint(26, 71), 5);
|
||||
|
||||
// Draw battery
|
||||
DrawBattery(p, center + QPoint(-170, -140), battery_values[Core::HID::DeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(-170, -140),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
|
||||
}
|
||||
|
||||
void PlayerControlPreview::DrawRightController(QPainter& p, const QPointF center) {
|
||||
|
@ -483,7 +484,8 @@ void PlayerControlPreview::DrawRightController(QPainter& p, const QPointF center
|
|||
DrawSymbol(p, center + QPoint(-26, 66), Symbol::House, 5);
|
||||
|
||||
// Draw battery
|
||||
DrawBattery(p, center + QPoint(110, -140), battery_values[Core::HID::DeviceIndex::RightIndex]);
|
||||
DrawBattery(p, center + QPoint(110, -140),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::RightIndex]);
|
||||
}
|
||||
|
||||
void PlayerControlPreview::DrawDualController(QPainter& p, const QPointF center) {
|
||||
|
@ -619,8 +621,10 @@ void PlayerControlPreview::DrawDualController(QPainter& p, const QPointF center)
|
|||
DrawSymbol(p, center + QPoint(50, 60), Symbol::House, 4.2f);
|
||||
|
||||
// Draw battery
|
||||
DrawBattery(p, center + QPoint(-100, -160), battery_values[Core::HID::DeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(40, -160), battery_values[Core::HID::DeviceIndex::RightIndex]);
|
||||
DrawBattery(p, center + QPoint(-100, -160),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(40, -160),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::RightIndex]);
|
||||
}
|
||||
|
||||
void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF center) {
|
||||
|
@ -721,8 +725,10 @@ void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF cen
|
|||
DrawSymbol(p, center + QPoint(161, 37), Symbol::House, 2.75f);
|
||||
|
||||
// Draw battery
|
||||
DrawBattery(p, center + QPoint(-200, 110), battery_values[Core::HID::DeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(130, 110), battery_values[Core::HID::DeviceIndex::RightIndex]);
|
||||
DrawBattery(p, center + QPoint(-200, 110),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(130, 110),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::RightIndex]);
|
||||
}
|
||||
|
||||
void PlayerControlPreview::DrawProController(QPainter& p, const QPointF center) {
|
||||
|
@ -812,7 +818,8 @@ void PlayerControlPreview::DrawProController(QPainter& p, const QPointF center)
|
|||
DrawSymbol(p, center + QPoint(29, -56), Symbol::House, 3.9f);
|
||||
|
||||
// Draw battery
|
||||
DrawBattery(p, center + QPoint(-30, -160), battery_values[Core::HID::DeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(-30, -160),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
|
||||
}
|
||||
|
||||
void PlayerControlPreview::DrawGCController(QPainter& p, const QPointF center) {
|
||||
|
@ -868,7 +875,8 @@ void PlayerControlPreview::DrawGCController(QPainter& p, const QPointF center) {
|
|||
DrawCircleButton(p, center + QPoint(0, -44), button_values[Plus], 8);
|
||||
|
||||
// Draw battery
|
||||
DrawBattery(p, center + QPoint(-30, -165), battery_values[Core::HID::DeviceIndex::LeftIndex]);
|
||||
DrawBattery(p, center + QPoint(-30, -165),
|
||||
battery_values[Core::HID::EmulatedDeviceIndex::LeftIndex]);
|
||||
}
|
||||
|
||||
constexpr std::array<float, 13 * 2> symbol_a = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue