Add support for building against Qt 6

This commit is contained in:
spycrab
2022-05-02 22:39:33 -07:00
committed by Shawn Hoffman
parent f8c603a2dd
commit 004e8a80b2
24 changed files with 545 additions and 84 deletions
+2 -2
View File
@@ -502,8 +502,8 @@ void RenderWidget::PassEventToImGui(const QEvent* event)
// coordinates (as if the screen was standard dpi). We need to update the mouse position in
// native coordinates, as the UI (and game) is rendered at native resolution.
const float scale = devicePixelRatio();
ImGui::GetIO().MousePos.x = static_cast<const QMouseEvent*>(event)->x() * scale;
ImGui::GetIO().MousePos.y = static_cast<const QMouseEvent*>(event)->y() * scale;
ImGui::GetIO().MousePos.x = static_cast<const QMouseEvent*>(event)->pos().x() * scale;
ImGui::GetIO().MousePos.y = static_cast<const QMouseEvent*>(event)->pos().y() * scale;
}
break;