You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
641 B
C++

#include "view.hpp"
#include "ui/button.hpp"
#include "ui/label.hpp"
void drawButton(const mbuoy::position& pos, const mbuoy::dimensions& dim)
{
std::printf("[%d, %d, %d, %d]: button\n", pos.x, pos.y, dim.width, dim.height);
}
int main()
{
auto test = mbuoy::view<
mbuoy::label<
mbuoy::string("Hey"),
mbuoy::position(10, 100)>{},
mbuoy::label<
mbuoy::string("there"),
mbuoy::position(10, 120)>{},
mbuoy::button<
mbuoy::position(10, 120),
mbuoy::dimensions(40, 40),
mbuoy::ondraw(drawButton)>{}
>;
test.render();
}