tracer middle

This commit is contained in:
Shichiha 2022-05-27 15:41:30 +09:00
parent ab5b730e51
commit 1fc7af8f4c
3 changed files with 10 additions and 1 deletions

View File

@ -29,6 +29,7 @@ namespace cheat::feature
NF(f_ArrowRadius, "Arrow Radius", "ESP", 100.0f),
NF(f_OutlineThickness, "Outline Thickness", "ESP", 1.0f),
NF(f_TracerSize, "Tracer Size", "ESP", 1.0f),
NF(f_MiddleScreenTracer, "Middle Screen Tracer", "ESP", false),
NF(f_DrawDistance, "Draw Distance", "ESP", false),
NF(f_DrawName, "Draw Name", "ESP", false),
@ -71,6 +72,7 @@ namespace cheat::feature
ConfigWidget(f_Fill);
ConfigWidget(f_FillTransparency, 0.01f, 0.0f, 1.0f, "Transparency of filled part.");
ConfigWidget(f_MiddleScreenTracer, "Draw tracer from middle part of the screen.");
if (f_DrawTracerMode.value() == DrawTracerMode::OffscreenArrows &&
BeginGroupPanel("Arrow tracer options", ImVec2(-1, 0), true))

View File

@ -38,6 +38,7 @@ namespace cheat::feature
config::Field<float> f_ArrowRadius;
config::Field<float> f_OutlineThickness;
config::Field<float> f_TracerSize;
config::Field<bool> f_MiddleScreenTracer;
config::Field<int> f_FontSize;
config::Field<bool> f_FontOutline;

View File

@ -388,7 +388,13 @@ namespace cheat::feature::esp::render
return;
auto draw = ImGui::GetBackgroundDrawList();
draw->AddLine(s_AvatarPosition, *screenPos, color);
ImRect screen_rect = { 0.0f, 0.0f, ImGui::GetIO().DisplaySize.x, ImGui::GetIO().DisplaySize.y };
auto screen_center = screen_rect.GetCenter();
auto& esp = ESP::GetInstance();
if (!esp.f_MiddleScreenTracer)
draw->AddLine(s_AvatarPosition, *screenPos, color);
else
draw->AddLine(screen_center, *screenPos, color);
}
#define PI 3.14159265358979323846