Open kubadusiek opened 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);
can someone help me with gradient, idk how to do it.