Update missed ImVec2 references

This commit is contained in:
Luke Street 2021-05-30 08:05:37 -04:00
parent 4cd2932023
commit 23f92d450a
1 changed files with 18 additions and 18 deletions

View File

@ -613,7 +613,7 @@ void ImGuiConsole::ShowDebugOverlay() {
float x = input.ALeftX(); float x = input.ALeftX();
float y = -input.ALeftY(); float y = -input.ALeftY();
dl->AddCircleFilled(leftStickCenter + (zeus::CVector2f{x, y} * leftStickRadius), leftStickRadius / 3, red); dl->AddCircleFilled(leftStickCenter + (zeus::CVector2f{x, y} * leftStickRadius), leftStickRadius / 3, red);
dl->AddLine(leftStickCenter, leftStickCenter + ImVec2(x * leftStickRadius, y * leftStickRadius), dl->AddLine(leftStickCenter, leftStickCenter + zeus::CVector2f(x * leftStickRadius, y * leftStickRadius),
IM_COL32(255, 244, 0, 255), 1.5f); IM_COL32(255, 244, 0, 255), 1.5f);
} }
@ -623,37 +623,37 @@ void ImGuiConsole::ShowDebugOverlay() {
float x = input.ARightX(); float x = input.ARightX();
float y = -input.ARightY(); float y = -input.ARightY();
dl->AddCircleFilled(rightStickCenter + (zeus::CVector2f{x, y} * rightStickRadius), rightStickRadius / 3, red); dl->AddCircleFilled(rightStickCenter + (zeus::CVector2f{x, y} * rightStickRadius), rightStickRadius / 3, red);
dl->AddLine(rightStickCenter, rightStickCenter + ImVec2(x * rightStickRadius, y * rightStickRadius), dl->AddLine(rightStickCenter, rightStickCenter + zeus::CVector2f(x * rightStickRadius, y * rightStickRadius),
IM_COL32(255, 244, 0, 255), 1.5f); IM_COL32(255, 244, 0, 255), 1.5f);
} }
// dpad // dpad
{ {
constexpr float halfWidth = dpadWidth / 2; constexpr float halfWidth = dpadWidth / 2;
dl->AddRectFilled(dpadCenter + ImVec2(-halfWidth, -dpadRadius), dpadCenter + ImVec2(halfWidth, dpadRadius), dl->AddRectFilled(dpadCenter + zeus::CVector2f(-halfWidth, -dpadRadius), dpadCenter + zeus::CVector2f(halfWidth, dpadRadius),
stickGray); stickGray);
dl->AddRectFilled(dpadCenter + ImVec2(-dpadRadius, -halfWidth), dpadCenter + ImVec2(dpadRadius, halfWidth), dl->AddRectFilled(dpadCenter + zeus::CVector2f(-dpadRadius, -halfWidth), dpadCenter + zeus::CVector2f(dpadRadius, halfWidth),
stickGray); stickGray);
if (input.DDPUp()) { if (input.DDPUp()) {
dl->AddRectFilled(dpadCenter + ImVec2(-halfWidth, -dpadRadius), dl->AddRectFilled(dpadCenter + zeus::CVector2f(-halfWidth, -dpadRadius),
dpadCenter + ImVec2(halfWidth, -dpadRadius / 2), red); dpadCenter + zeus::CVector2f(halfWidth, -dpadRadius / 2), red);
} }
if (input.DDPDown()) { if (input.DDPDown()) {
dl->AddRectFilled(dpadCenter + ImVec2(-halfWidth, dpadRadius), dl->AddRectFilled(dpadCenter + zeus::CVector2f(-halfWidth, dpadRadius),
dpadCenter + ImVec2(halfWidth, dpadRadius / 2), red); dpadCenter + zeus::CVector2f(halfWidth, dpadRadius / 2), red);
} }
if (input.DDPLeft()) { if (input.DDPLeft()) {
dl->AddRectFilled(dpadCenter + ImVec2(-dpadRadius, -halfWidth), dl->AddRectFilled(dpadCenter + zeus::CVector2f(-dpadRadius, -halfWidth),
dpadCenter + ImVec2(-dpadRadius / 2, halfWidth), red); dpadCenter + zeus::CVector2f(-dpadRadius / 2, halfWidth), red);
} }
if (input.DDPRight()) { if (input.DDPRight()) {
dl->AddRectFilled(dpadCenter + ImVec2(dpadRadius, -halfWidth), dl->AddRectFilled(dpadCenter + zeus::CVector2f(dpadRadius, -halfWidth),
dpadCenter + ImVec2(dpadRadius / 2, halfWidth), red); dpadCenter + zeus::CVector2f(dpadRadius / 2, halfWidth), red);
} }
} }
@ -675,23 +675,23 @@ void ImGuiConsole::ShowDebugOverlay() {
dl->AddCircleFilled(yButtonCenter, yButtonRadius, input.DY() ? red : stickGray); dl->AddCircleFilled(yButtonCenter, yButtonRadius, input.DY() ? red : stickGray);
// z // z
dl->AddRectFilled(zButtonCenter - ImVec2{zButtonHalfWidth, zButtonHalfHeight}, dl->AddRectFilled(zButtonCenter - zeus::CVector2f{zButtonHalfWidth, zButtonHalfHeight},
zButtonCenter + ImVec2{zButtonHalfWidth, zButtonHalfHeight}, zButtonCenter + zeus::CVector2f{zButtonHalfWidth, zButtonHalfHeight},
input.DZ() ? IM_COL32(128, 0, 128, 255) : stickGray, 16); input.DZ() ? IM_COL32(128, 0, 128, 255) : stickGray, 16);
} }
// triggers // triggers
{ {
float halfTriggerWidth = triggerWidth / 2; float halfTriggerWidth = triggerWidth / 2;
zeus::CVector2f lStart = lCenter - ImVec2(halfTriggerWidth, 0); zeus::CVector2f lStart = lCenter - zeus::CVector2f(halfTriggerWidth, 0);
zeus::CVector2f lEnd = lCenter + ImVec2(halfTriggerWidth, triggerHeight); zeus::CVector2f lEnd = lCenter + zeus::CVector2f(halfTriggerWidth, triggerHeight);
float lValue = triggerWidth * input.ALTrigger(); float lValue = triggerWidth * input.ALTrigger();
dl->AddRectFilled(lStart, lStart + zeus::CVector2f(lValue, triggerHeight), input.DL() ? red : stickGray); dl->AddRectFilled(lStart, lStart + zeus::CVector2f(lValue, triggerHeight), input.DL() ? red : stickGray);
dl->AddRectFilled(lStart + zeus::CVector2f(lValue, 0), lEnd, darkGray); dl->AddRectFilled(lStart + zeus::CVector2f(lValue, 0), lEnd, darkGray);
zeus::CVector2f rStart = rCenter - ImVec2(halfTriggerWidth, 0); zeus::CVector2f rStart = rCenter - zeus::CVector2f(halfTriggerWidth, 0);
zeus::CVector2f rEnd = rCenter + ImVec2(halfTriggerWidth, triggerHeight); zeus::CVector2f rEnd = rCenter + zeus::CVector2f(halfTriggerWidth, triggerHeight);
float rValue = triggerWidth * input.ARTrigger(); float rValue = triggerWidth * input.ARTrigger();
dl->AddRectFilled(rEnd - zeus::CVector2f(rValue, triggerHeight), rEnd, input.DR() ? red : stickGray); dl->AddRectFilled(rEnd - zeus::CVector2f(rValue, triggerHeight), rEnd, input.DR() ? red : stickGray);