From eecfe87f8d23b358c31d6b8289f96ba61ad6de01 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Fri, 22 May 2026 11:49:49 -0400 Subject: tyui sliders --- teensy/teensy_ui.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'teensy/teensy_ui.h') diff --git a/teensy/teensy_ui.h b/teensy/teensy_ui.h index da7691f..8efc7bd 100644 --- a/teensy/teensy_ui.h +++ b/teensy/teensy_ui.h @@ -14,6 +14,8 @@ #define tyui_begin_window(title, rect, id) \ tyui_begin_window_ex(title, rect, id, 0, NULL) #define tyui_text(...) tyui_text_ex(TYUI_ALIGN_LEFT, __VA_ARGS__) +#define tyui_slider(min, max, value_ptr) \ + tyui_slider_ex(min, max, value_ptr, true, TYUI_ALIGN_CENTER) typedef uint8_t tyui_Align; enum { @@ -37,6 +39,7 @@ typedef struct { int padding; int control_padding; int frame_size; + int grabber_size; } tyui_Style; typedef uint8_t tyui_Id; @@ -58,6 +61,13 @@ void tyui_end_window(void); bool tyui_button(const char *text); void tyui_text_ex(tyui_Align align, const char *fmt, ...); +void tyui_slider_ex( + float min, + float max, + float *value_ptr, + bool show_value, + tyui_Align value_align +); void tyui_draw(void); -- cgit v1.3-2-g0d8e