designer1337 / csgo-cheat-base

simple csgo internal base.
MIT License
245 stars 48 forks source link

draw gradient? #124

Open kubadusiek opened 2 years ago

kubadusiek commented 2 years ago

can someone help me with gradient, idk how to do it.

maecry commented 2 years ago

renderer.cpp

void render::draw_fade(std::int32_t x, std::int32_t y, std::int32_t width, std::int32_t height, color color1, color color2, bool horizontal) {
    interfaces::surface->set_drawing_color(color1.r, color1.g, color1.b, color1.a);
    interfaces::surface->draw_filled_rect_fade(x, y, x + width, y + height, 255, 0, horizontal);

    interfaces::surface->set_drawing_color(color2.r, color2.g, color2.b, color2.a);
    interfaces::surface->draw_filled_rect_fade(x, y, x + width, y + height, 0, 255, horizontal);
}

renderer.hpp

    void draw_fade(std::int32_t x, std::int32_t y, std::int32_t width, std::int32_t height, color color1, color color2, bool horizontal);