aboutsummaryrefslogtreecommitdiffstats
path: root/ui/button.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/button.hpp')
-rw-r--r--ui/button.hpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/ui/button.hpp b/ui/button.hpp
deleted file mode 100644
index 4a0a9f5..0000000
--- a/ui/button.hpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef MBUOY_UI_BUTTON_HPP
-#define MBUOY_UI_BUTTON_HPP
-
-#include "attr/dimensions.hpp"
-#include "attr/ondraw.hpp"
-#include "attr/position.hpp"
-#include "attr/string.hpp"
-#include "find.hpp"
-#include "port.hpp"
-
-namespace mbuoy {
-
-template<auto... Attr>
-struct button
-{
- static constexpr auto point = find<position>(Attr...);
- static constexpr auto dims = find<dimensions>(Attr...);
- static constexpr auto text = find<const char *>(Attr...);
- static constexpr auto draw = find<ondraw>(Attr...);
-
- static consteval void init(unsigned char *(&ptr)) {
- *ptr++ = 0; // pressed?
- }
-
- static void render() {
- (*draw)(*point, *dims);
- }
-
- static consteval int size() {
- return 1;
- }
-};
-
-} // namespace mbuoy
-
-#endif // MBUOY_UI_BUTTON_HPP
-