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.

33 lines
589 B
C++

#ifndef MBUOY_UI_LABEL_HPP
#define MBUOY_UI_LABEL_HPP
#include "attr/position.hpp"
#include "attr/string.hpp"
#include "find.hpp"
#include "port.hpp"
namespace mbuoy {
template<auto... Attr>
struct label
{
static constexpr auto point = find<position>(Attr...);
static constexpr auto text = find<const char *>(Attr...);
static consteval void init(unsigned char *(&ptr)) {
}
static void render() {
port::puts(point->x, point->y, *text);
}
static consteval int size() {
return 0;
}
};
} // namespace mbuoy
#endif // MBUOY_UI_LABEL_HPP