Пользователь
-
Автор темы
- #1
gamesense watermark
ss
ss
C++:
void misc::watermark()
{
if (!g_cfg.menu.watermark)
return;
auto game = crypt_str("game | ");
auto sense = crypt_str(" sense");
int fps = floor(1 / m_globals()->m_frametime);
auto text = game + g_ctx.username + crypt_str(" | ") + std::to_string(fps) + crypt_str("fps | ") + g_ctx.globals.time;
auto w = render::get().text_width(fonts[NAME], text.c_str()) + 8;
auto h = 18;
int width, height;
m_engine()->GetScreenSize(width, height);
auto x = width - 2;
auto y = 12;
x = x - w - 10;
render::get().rect_filled(x - 6, y - 6, w + 13, h + 14, Color(0, 0, 0, 255));
render::get().rect_filled(x - 5, y - 5, w + 11, h + 12, Color(34, 34, 34, 255));
render::get().rect_filled(x + 1, y, w, h + 1, Color(0, 0, 0, 255));
render::get().rect(x - 1, y - 1, w + 3, h + 3, Color(56, 56, 56, 255));
render::get().rect(x - 5, y - 5, w + 11, h + 12, Color(56, 56, 56, 255));
render::get().gradient(x + 2, y + 1, (w / 2) - 1, 1, Color(59, 175, 222, 255), Color(202, 70, 205, 255), GRADIENT_HORIZONTAL);
render::get().gradient(x + 1 + (w / 2), y + 1, (w / 2) - 1, 1, Color(202, 70, 205, 255), Color(201, 227, 58, 255), GRADIENT_HORIZONTAL);
render::get().gradient(x + 2, y + 2, (w / 2) - 1, 1, Color(59, 175, 222, 130), Color(202, 70, 205, 130), GRADIENT_HORIZONTAL);
render::get().gradient(x + 1 + (w / 2), y + 2, (w / 2) - 1, 1, Color(202, 70, 205, 130), Color(201, 227, 58, 130), GRADIENT_HORIZONTAL);
render::get().text(fonts[NAME], x + 4, y + 12, Color(0, 0, 0, 180), HFONT_CENTERED_Y, text.c_str());
render::get().text(fonts[NAME], x + 4, y + 11, Color(255, 255, 255, 255), HFONT_CENTERED_Y, text.c_str());
render::get().text(fonts[NAME], x + 13, y + 12, Color(0, 0, 0, 180), HFONT_CENTERED_Y, sense);
render::get().text(fonts[NAME], x + 13, y + 11, Color(160, 200, 80, 255), HFONT_CENTERED_Y, sense);
}