summaryrefslogtreecommitdiff
path: root/sources/text.h
diff options
context:
space:
mode:
authorHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-28 21:07:01 +0300
committerHenrique Alves <henrique.alves@itsjungle.xyz>2024-04-28 21:07:01 +0300
commitf6e3396a5a653c3ae124afcd74bac5c9c7e50ae1 (patch)
tree99bc7592c4184363c4d6a985d6c6dbc07688d71a /sources/text.h
parent0d0db3e51ec95ab94befad01cbec0860acf8ffe1 (diff)
downloadgamejam-slgj-2024-f6e3396a5a653c3ae124afcd74bac5c9c7e50ae1.tar.gz
gamejam-slgj-2024-f6e3396a5a653c3ae124afcd74bac5c9c7e50ae1.tar.bz2
gamejam-slgj-2024-f6e3396a5a653c3ae124afcd74bac5c9c7e50ae1.zip
(wip) Basic textbox API
Diffstat (limited to 'sources/text.h')
-rw-r--r--sources/text.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/sources/text.h b/sources/text.h
index a0e3497..0759d2f 100644
--- a/sources/text.h
+++ b/sources/text.h
@@ -4,11 +4,17 @@
#include <stdlib.h>
static s7_pointer rl_draw_text(s7_scheme *s7, s7_pointer args) {
- printf("%s\n", s7_string(s7_car(args)));
- DrawText(s7_string(s7_car(args)), 200, 80, 20, RED);
+ Color *c = (Color *)s7_c_object_value(s7_car(s7_cddddr(args)));
+
+ DrawText(s7_string(s7_car(args)),
+ s7_integer(s7_cadr(args)),
+ s7_integer(s7_caddr(args)),
+ s7_integer(s7_cadddr(args)),
+ *c);
+
return(NULL);
}
static void rl_text_define_methods(s7_scheme *s7) {
- s7_define_function(s7, "rl-draw-text", rl_draw_text, 1, 0, false, "test");
+ s7_define_function(s7, "rl-draw-text", rl_draw_text, 5, 0, false, "test");
}