aboutsummaryrefslogtreecommitdiff
path: root/teensy/teensy_ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'teensy/teensy_ui.c')
-rw-r--r--teensy/teensy_ui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/teensy/teensy_ui.c b/teensy/teensy_ui.c
index d9ce33b..662c487 100644
--- a/teensy/teensy_ui.c
+++ b/teensy/teensy_ui.c
@@ -1,6 +1,7 @@
#include "teensy_ui.h"
#include <assert.h>
+#include <stdarg.h>
#include "teensy_list.h"
@@ -287,8 +288,13 @@ void tyui_end_window(void)
uictx.active = &uictx.root;
}
-void tyui_text(const char *text)
+void tyui_text(const char *fmt, ...)
{
+ va_list args;
+ va_start(args, fmt);
+ char *text = ty_format_args(fmt, args);
+ va_end(args);
+
text_cmd(text, next_pos(TEXT_HEIGHT));
}