1개월 전 · Jul 25, 2026 4:39 AM
Draw an interactive FOV circle and customizable crosshair with Dear ImGui:
CPP
void DrawHUDOverlay(float fovRadius, ColorRGB crossColor) {
ImVec2 screenCenter = ImVec2(ImGui::GetIO().DisplaySize.x / 2.0f, ImGui::GetIO().DisplaySize.y / 2.0f);
ImDrawList* drawList = ImGui::GetBackgroundDrawList();
// Draw FOV boundary circle
drawList->AddCircle(screenCenter, fovRadius, IM_COL32(255, 255, 255, 120), 64, 1.5f);
// Draw Dot Crosshair with shadow outline
drawList->AddCircleFilled(screenCenter, 3.5f, IM_COL32(0, 0, 0, 200));
drawList->AddCircleFilled(screenCenter, 2.0f, IM_COL32(crossColor.r, crossColor.g, crossColor.b, 255));
}