WIP: Web radar implementation in progress — currently broken
The web radar component is undergoing refactoring and is non-functional. Core memory reading and overlay systems remain operational.
This commit is contained in:
Vendored
+49
-33
@@ -224,23 +224,26 @@ static void lumin_kv(const char* label, const std::string& value, const c_vec4&
|
||||
|
||||
static void render_aim_tab(const visual_widget_filter& w, float section_height)
|
||||
{
|
||||
if (!g_menu)
|
||||
if (!g_menu || !g_menu->cfg)
|
||||
return;
|
||||
|
||||
begin_full_section("Aim Assistance", section_height);
|
||||
{
|
||||
lumin_heading("Combat Mode");
|
||||
w.checkbox("Combat Mode", "Hides loot and animals; shortens bullet trail fade for cleaner combat view", &g_menu->cfg->combatMode);
|
||||
gui->dummy(c_vec2(0, s_(6)));
|
||||
lumin_heading("Prediction");
|
||||
w.checkbox("Ballistic Dot", "Cyan dot showing where to aim to hit centre mass (accounts for gravity + drag)", g_menu->showBallisticDot);
|
||||
w.checkbox("Ballistic Dot", "Cyan dot showing where to aim to hit centre mass (accounts for gravity + drag)", &g_menu->cfg->showBallisticDot);
|
||||
gui->dummy(c_vec2(0, s_(6)));
|
||||
lumin_heading("Trails");
|
||||
w.checkbox("Bullet Trails", "Draw flight path of each bullet from origin to impact or despawn", g_menu->showBulletTrails);
|
||||
w.checkbox("Bullet Trails", "Draw flight path of each bullet from origin to impact or despawn", &g_menu->cfg->showBulletTrails);
|
||||
}
|
||||
end_visual_section();
|
||||
}
|
||||
|
||||
static void render_visuals_tab(const visual_widget_filter& w, float section_height)
|
||||
{
|
||||
if (!g_menu)
|
||||
if (!g_menu || !g_menu->cfg)
|
||||
return;
|
||||
|
||||
if (var->gui.sub_tab_stored == 1)
|
||||
@@ -249,14 +252,14 @@ static void render_visuals_tab(const visual_widget_filter& w, float section_heig
|
||||
gui->begin_group();
|
||||
{
|
||||
begin_visual_section("Players", section_height);
|
||||
w.checkbox("Show Players", "Show player ESP", g_menu->showPlayers);
|
||||
w.checkbox("Bounding Box", "Draw entity box", g_menu->showBox);
|
||||
w.checkbox("Skeleton", "Draw bone skeleton", g_menu->showSkeleton);
|
||||
w.checkbox("Head Circle", "Draw head highlight", g_menu->showHeadDot);
|
||||
w.checkbox("Weapon In Hand", "Show held weapon name", g_menu->showWeapon);
|
||||
w.checkbox("Health Bar", "Draw player health bar", g_menu->showHealthBar);
|
||||
w.checkbox("Health Number", "Draw numeric health", g_menu->showHealthNumber);
|
||||
w.checkbox("Corpses", "Show dead bodies", g_menu->showCorpses);
|
||||
w.checkbox("Show Players", "Show player ESP", &g_menu->cfg->showPlayers);
|
||||
w.checkbox("Bounding Box", "Draw entity box", &g_menu->cfg->showBox);
|
||||
w.checkbox("Skeleton", "Draw bone skeleton", &g_menu->cfg->showSkeleton);
|
||||
w.checkbox("Head Circle", "Draw head highlight", &g_menu->cfg->showHeadDot);
|
||||
w.checkbox("Weapon In Hand", "Show held weapon name", &g_menu->cfg->showWeapon);
|
||||
w.checkbox("Health Bar", "Draw player health bar", &g_menu->cfg->showHealthBar);
|
||||
w.checkbox("Health Number", "Draw numeric health", &g_menu->cfg->showHealthNumber);
|
||||
w.checkbox("Corpses", "Show dead bodies", &g_menu->cfg->showCorpses);
|
||||
w.checkbox("Skeleton Debug", "Label every named bone", g_menu->debugSkeleton);
|
||||
end_visual_section();
|
||||
}
|
||||
@@ -267,7 +270,7 @@ static void render_visuals_tab(const visual_widget_filter& w, float section_heig
|
||||
gui->begin_group();
|
||||
{
|
||||
begin_visual_section("Draw Distance", section_height);
|
||||
w.slider("Players", "Max player draw distance", g_menu->playerMaxDist, 50.f, 1000.f, "%.0f m");
|
||||
w.slider("Players", "Max player draw distance", &g_menu->cfg->playerMaxDist, 50.f, 1000.f, "%.0f m");
|
||||
end_visual_section();
|
||||
}
|
||||
gui->end_group();
|
||||
@@ -278,9 +281,14 @@ static void render_visuals_tab(const visual_widget_filter& w, float section_heig
|
||||
gui->begin_group();
|
||||
{
|
||||
begin_visual_section("Entities", section_height);
|
||||
w.checkbox("Animals", "Show animal ESP", g_menu->showAnimals);
|
||||
w.checkbox("Zombies", "Show infected ESP", g_menu->showZombies);
|
||||
w.checkbox("Items", "Show loot ESP", g_menu->showItems);
|
||||
// Animals and Items are suppressed in combat mode; grey them out.
|
||||
ImGui::BeginDisabled(g_menu->cfg->combatMode);
|
||||
w.checkbox("Animals", "Show animal ESP", &g_menu->cfg->showAnimals);
|
||||
ImGui::EndDisabled();
|
||||
w.checkbox("Zombies", "Show infected ESP", &g_menu->cfg->showZombies);
|
||||
ImGui::BeginDisabled(g_menu->cfg->combatMode);
|
||||
w.checkbox("Items", "Show loot ESP", &g_menu->cfg->showItems);
|
||||
ImGui::EndDisabled();
|
||||
end_visual_section();
|
||||
}
|
||||
gui->end_group();
|
||||
@@ -290,9 +298,13 @@ static void render_visuals_tab(const visual_widget_filter& w, float section_heig
|
||||
gui->begin_group();
|
||||
{
|
||||
begin_visual_section("Draw Distance", section_height);
|
||||
w.slider("Animals", "Max animal draw distance", g_menu->animalMaxDist, 50.f, 1000.f, "%.0f m");
|
||||
w.slider("Zombies", "Max zombie draw distance", g_menu->zombieMaxDist, 50.f, 500.f, "%.0f m");
|
||||
w.slider("Items", "Max loot draw distance", g_menu->itemMaxDist, 20.f, 200.f, "%.0f m");
|
||||
ImGui::BeginDisabled(g_menu->cfg->combatMode);
|
||||
w.slider("Animals", "Max animal draw distance", &g_menu->cfg->animalMaxDist, 50.f, 1000.f, "%.0f m");
|
||||
ImGui::EndDisabled();
|
||||
w.slider("Zombies", "Max zombie draw distance", &g_menu->cfg->zombieMaxDist, 50.f, 500.f, "%.0f m");
|
||||
ImGui::BeginDisabled(g_menu->cfg->combatMode);
|
||||
w.slider("Items", "Max loot draw distance", &g_menu->cfg->itemMaxDist, 20.f, 200.f, "%.0f m");
|
||||
ImGui::EndDisabled();
|
||||
end_visual_section();
|
||||
}
|
||||
gui->end_group();
|
||||
@@ -301,7 +313,7 @@ static void render_visuals_tab(const visual_widget_filter& w, float section_heig
|
||||
|
||||
static void render_loot_tab(const visual_widget_filter& w, float section_height)
|
||||
{
|
||||
if (!g_menu || !g_menu->itemCategories)
|
||||
if (!g_menu || !g_menu->cfg)
|
||||
return;
|
||||
|
||||
struct cat_t { const char* key; const char* label; };
|
||||
@@ -325,7 +337,9 @@ static void render_loot_tab(const visual_widget_filter& w, float section_height)
|
||||
{ "isOtherLoot", "Other" },
|
||||
} };
|
||||
|
||||
auto& cats = *g_menu->itemCategories;
|
||||
// Loot categories are irrelevant when combat mode suppresses all loot.
|
||||
ImGui::BeginDisabled(g_menu->cfg->combatMode);
|
||||
auto& cats = g_menu->cfg->itemCategories;
|
||||
|
||||
auto draw_category = [&](const cat_t& c)
|
||||
{
|
||||
@@ -357,6 +371,8 @@ static void render_loot_tab(const visual_widget_filter& w, float section_height)
|
||||
end_visual_section();
|
||||
}
|
||||
gui->end_group();
|
||||
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
|
||||
static constexpr const char* kRadarDomain = "radar.charliecharliekirky.christmas";
|
||||
@@ -438,20 +454,20 @@ static void render_info_tab(float section_height)
|
||||
|
||||
static void render_config_tab(float section_height)
|
||||
{
|
||||
if (!g_menu)
|
||||
if (!g_menu || !g_menu->cfg)
|
||||
return;
|
||||
|
||||
// Persistent text buffers backing the four resolution fields. Seeded once
|
||||
// from the live values, then treated as the source of truth (parsed back
|
||||
// into the int pointers every frame).
|
||||
// from the live cfg values; parsed back into cfg every frame so Apply picks
|
||||
// up whatever the user typed.
|
||||
static char ovr_w[8], ovr_h[8], rnd_w[8], rnd_h[8];
|
||||
static bool buffers_ready = false;
|
||||
if (!buffers_ready)
|
||||
{
|
||||
ImFormatString(ovr_w, IM_ARRAYSIZE(ovr_w), "%d", *g_menu->pendingW);
|
||||
ImFormatString(ovr_h, IM_ARRAYSIZE(ovr_h), "%d", *g_menu->pendingH);
|
||||
ImFormatString(rnd_w, IM_ARRAYSIZE(rnd_w), "%d", *g_menu->pendingRW);
|
||||
ImFormatString(rnd_h, IM_ARRAYSIZE(rnd_h), "%d", *g_menu->pendingRH);
|
||||
ImFormatString(ovr_w, IM_ARRAYSIZE(ovr_w), "%d", g_menu->cfg->overlayWidth);
|
||||
ImFormatString(ovr_h, IM_ARRAYSIZE(ovr_h), "%d", g_menu->cfg->overlayHeight);
|
||||
ImFormatString(rnd_w, IM_ARRAYSIZE(rnd_w), "%d", g_menu->cfg->renderWidth);
|
||||
ImFormatString(rnd_h, IM_ARRAYSIZE(rnd_h), "%d", g_menu->cfg->renderHeight);
|
||||
buffers_ready = true;
|
||||
}
|
||||
|
||||
@@ -463,8 +479,8 @@ static void render_config_tab(float section_height)
|
||||
widgets->text_field("Width", ovr_w, IM_ARRAYSIZE(ovr_w));
|
||||
widgets->text_field("Height", ovr_h, IM_ARRAYSIZE(ovr_h));
|
||||
gui->pop_id();
|
||||
*g_menu->pendingW = ImMax(0, atoi(ovr_w));
|
||||
*g_menu->pendingH = ImMax(0, atoi(ovr_h));
|
||||
g_menu->cfg->overlayWidth = ImMax(0, atoi(ovr_w));
|
||||
g_menu->cfg->overlayHeight = ImMax(0, atoi(ovr_h));
|
||||
if (widgets->primary_button("Apply Monitor Resolution") && g_menu->onApplyDisplayRes)
|
||||
g_menu->onApplyDisplayRes();
|
||||
|
||||
@@ -476,9 +492,9 @@ static void render_config_tab(float section_height)
|
||||
widgets->text_field("Width", rnd_w, IM_ARRAYSIZE(rnd_w));
|
||||
widgets->text_field("Height", rnd_h, IM_ARRAYSIZE(rnd_h));
|
||||
gui->pop_id();
|
||||
*g_menu->pendingRW = ImMax(0, atoi(rnd_w));
|
||||
*g_menu->pendingRH = ImMax(0, atoi(rnd_h));
|
||||
widgets->checkbox("Stretch to fill", "GPU stretches game to fill the monitor", g_menu->stretchToFill);
|
||||
g_menu->cfg->renderWidth = ImMax(0, atoi(rnd_w));
|
||||
g_menu->cfg->renderHeight = ImMax(0, atoi(rnd_h));
|
||||
widgets->checkbox("Stretch to fill", "GPU stretches game to fill the monitor", &g_menu->cfg->stretchToFill);
|
||||
if (widgets->primary_button("Apply Render Resolution") && g_menu->onApplyRenderRes)
|
||||
g_menu->onApplyRenderRes();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user