12 lines
580 B
C++
12 lines
580 B
C++
|
#include "gui.hpp"
|
||
|
|
||
|
std::shared_ptr<SDLPP::RectangleRender>
|
||
|
createButton(double x, double y, double w, double h,
|
||
|
std::shared_ptr<SDLPP::Renderer> &r, const std::string &text,
|
||
|
const std::string &color, const std::string &outline_color,
|
||
|
const std::string &background_color,
|
||
|
std::function<void(void *)> click_fun, void *input) {
|
||
|
auto button = std::make_shared<Button>(
|
||
|
x, y, w, h, r, text, color, outline_color, background_color, click_fun, input);
|
||
|
return std::static_pointer_cast<SDLPP::RectangleRender>(button);
|
||
|
}
|