void Menu::draw()
{
if (!vars::bMenuOpen)
return;
int x, y;
interfaces::surface->getScreenSize(x, y);
// this is on the left, garbage scaling
// TODO: some proper, fast and easy scaling with using cvar hudscale iirc
int width = x * 0.16f;
int height = 15;
drawText(20, height + 15, Colors::Palevioletred, XOR("Bartis internal"));
// for your name, add raw localplayer check, game::localPlayer might be not fast enough, so check in body, it's due to few frames might be called faster
if (interfaces::engine->isInGame())
{
drawText(width, height, Colors::Yellow, game::localPlayer ? XOR("Hello Bartis :)") : XOR("Hello Undefined :)"));
height += 15;
drawText(width, height, Colors::Yellow, std::format(XOR("FAKE: {:.2f}"), globals::fakeAngle.y));
drawText(width + 100, height, Colors::Yellow, std::format(XOR("REAL: {:.2f}"), globals::realAngle.y));
auto diff = std::abs(globals::fakeAngle.y - globals::realAngle.y);
drawText(width + 200, height, (diff > 30) ? Colors::Green : Colors::Red, std::format(XOR("DIFF: {:.2f}"), globals::realAngle.y));
height += 15;
}
// must have something unique to catch index selected
// practise with static index for menu is just not good,
// maybe you want selected index option
drawBool(vars::names["bunnyhop"], width, height);
drawVec(vars::names["chams"], width, height);
drawVec(vars::names["esp"], width, height);
drawBool(vars::names["glow"], width, height);
drawBool(vars::names["soundesp"], width, height);
drawInt(vars::names["fov"], width, height);
drawBool(vars::names["thirdp"], width, height);
drawVec(vars::names["aimbot"], width, height);
drawInt(vars::names["aimbot_fov"], width, height);
drawInt(vars::names["smooth"], width, height);
drawInt(vars::names["rcs"], width, height);
drawVec(vars::names["xhair"], width, height);
drawBool(vars::names["triggerbot"], width, height);
drawInt(vars::names["triggerbot_delay"], width, height);
drawBool(vars::names["backtrack"], width, height);
drawInt(vars::names["backtrack_ms"], width, height);
width = x * 0.25f;
height = 15;
if (interfaces::engine->isInGame())
{
game::localPlayer
? render::text(width, height, fonts::tahoma, std::format(XOR("Local Player {:X}"), game::localPlayer->getLiteralAddress()), false, Colors::Yellow)
: render::text(width, height, fonts::tahoma, XOR("Local Player 0x0"), false, Colors::Yellow);
height += 30;
}
drawBool(vars::names["radar"], width, height);
drawBool(vars::names["local_info"], width, height);
drawBool(vars::names["esp_flags"], width, height);
drawBool(vars::names["esp_info"], width, height);
drawBool(vars::names["esp_skeleton"], width, height);
drawVec(vars::names["bt_chams"], width, height);
drawBool(vars::names["dl_light"], width, height);
drawBool(vars::names["nightmode"], width, height);
drawBool(vars::names["esp_lines"], width, height);
drawBool(vars::names["plots"], width, height);
drawVec(vars::names["arm_chams"], width, height);
drawVec(vars::names["weapon_chams"], width, height);
}