Merge pull request #42 from Shichiha/patch-1

tracer middle
This commit is contained in:
Callow 2022-06-12 15:51:37 +03:00 committed by GitHub
commit 2a34e06015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 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)
{

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

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