-
Автор темы
- #1
Код:
void otheresp::watermark()
{
if (!g_cfg.misc.watermark)
return;
int screen_x, screen_y;
g_csgo.m_engine()->GetScreenSize(screen_x, screen_y);
std::stringstream ss;
auto net_channel = g_csgo.m_engine()->GetNetChannelInfo();
char path[MAX_PATH], * name = NULL;
GetEnvironmentVariable((LPCTSTR)"USERPROFILE", (LPSTR)path, (DWORD)MAX_PATH);
name = &path[std::strlen(path) - 1];
for (; *name != '\\'; --name);
++name;
auto local_player = reinterpret_cast<C_BaseEntity*>(g_csgo.m_entitylist()->GetClientEntity(g_csgo.m_engine()->GetLocalPlayer()));
std::string outgoing = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_OUTGOING) * 1000)) : "0";
if (g_csgo.m_engine()->IsConnected())
{
ss << "devcore | " << name << " | latency: " << outgoing << " | 64tick";
}
else
{
ss << "devcore | " << name << " | disconnected";
}
int textsize = render::get().text_width(fonts[eventwatermark], ss.str().c_str());
render::get().rect_filled((screen_x - 9) - (textsize + 17), 6, textsize + 16, 18, Color::Black);
render::get().rect((screen_x - 9) - (textsize + 17), 6, textsize + 16, 18, Color(g_cfg.menu.menu_theme[0]));
render::get().text(fonts[eventwatermark], (screen_x - 9) - (textsize + 10), 9, Color::White, HFONT_OFF_SCREEN, ss.str().c_str());
// font = "Verdana", 13, 500, FONTFLAG_DROPSHADOW | FONTFLAG_ANTIALIAS
}
ss:
Последнее редактирование: