From fc326115fa154bc19f3f10d7c2c4e57710ef1e0d Mon Sep 17 00:00:00 2001 From: spl3g Date: Sun, 9 Nov 2025 20:43:50 +0300 Subject: Move to sokol (broke the wave screen) --- src/custom_elements.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/custom_elements.h (limited to 'src/custom_elements.h') diff --git a/src/custom_elements.h b/src/custom_elements.h new file mode 100644 index 0000000..cd36b6a --- /dev/null +++ b/src/custom_elements.h @@ -0,0 +1,32 @@ +#ifndef CUSTOM_ELEMENTS_H_ +#define CUSTOM_ELEMENTS_H_ + +#include "clay.h" + +typedef enum { + CUSTOM_ELEMENT_TYPE_CIRCLE, + CUSTOM_ELEMENT_TYPE_WAVE_SCREEN, +} CustomElementType; + +typedef struct { + float start_angle; + float value; +} CircleData; + +typedef struct { + float *point_buffer; + size_t buffer_len; +} WaveScreenData; + +typedef struct { + CustomElementType type; + + union { + CircleData circle; + WaveScreenData wave_screen; + }; +} CustomElementData; + +void handle_custom(Clay_BoundingBox bbox, Clay_CustomRenderData *config); + +#endif // CUSTOM_ELEMENTS_H_ -- cgit v1.2.3