aboutsummaryrefslogtreecommitdiff
path: root/nuklear/demo/gdi
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-01-09 23:13:51 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-01-09 23:13:51 +0100
commitefae5be164f0649d8b9aa3d2a9cd6e2717c97f63 (patch)
treedb0b3d4c931f3eefabb3f94cd574359f7ea20e1c /nuklear/demo/gdi
parentda1ddef447e89da972d7969a0d1c43a663129e41 (diff)
parentea55493350b8741ecfea974381df7ea467056537 (diff)
downloadsherlock.lv2-efae5be164f0649d8b9aa3d2a9cd6e2717c97f63.tar.xz
Merge commit 'ea55493350b8741ecfea974381df7ea467056537'
Diffstat (limited to 'nuklear/demo/gdi')
-rw-r--r--nuklear/demo/gdi/main.c51
1 files changed, 37 insertions, 14 deletions
diff --git a/nuklear/demo/gdi/main.c b/nuklear/demo/gdi/main.c
index c91ebb4..1755b9c 100644
--- a/nuklear/demo/gdi/main.c
+++ b/nuklear/demo/gdi/main.c
@@ -24,17 +24,32 @@
*
* ===============================================================*/
/* This are some code examples to provide a small overview of what can be
- * done with this library. To try out an example uncomment the include
- * and the corresponding function. */
-#define UNUSED(a) (void)a
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#define MAX(a,b) ((a) < (b) ? (b) : (a))
-#define LEN(a) (sizeof(a)/sizeof(a)[0])
-
-/*#include "../style.c"*/
-/*#include "../calculator.c"*/
-/*#include "../overview.c"*/
-/*#include "../node_editor.c"*/
+ * done with this library. To try out an example uncomment the defines */
+/*#define INCLUDE_ALL */
+/*#define INCLUDE_STYLE */
+/*#define INCLUDE_CALCULATOR */
+/*#define INCLUDE_OVERVIEW */
+/*#define INCLUDE_NODE_EDITOR */
+
+#ifdef INCLUDE_ALL
+ #define INCLUDE_STYLE
+ #define INCLUDE_CALCULATOR
+ #define INCLUDE_OVERVIEW
+ #define INCLUDE_NODE_EDITOR
+#endif
+
+#ifdef INCLUDE_STYLE
+ #include "../style.c"
+#endif
+#ifdef INCLUDE_CALCULATOR
+ #include "../calculator.c"
+#endif
+#ifdef INCLUDE_OVERVIEW
+ #include "../overview.c"
+#endif
+#ifdef INCLUDE_NODE_EDITOR
+ #include "../node_editor.c"
+#endif
/* ===============================================================
*
@@ -94,10 +109,12 @@ int main(void)
ctx = nk_gdi_init(font, dc, WINDOW_WIDTH, WINDOW_HEIGHT);
/* style.c */
+ #ifdef INCLUDE_STYLE
/*set_style(ctx, THEME_WHITE);*/
/*set_style(ctx, THEME_RED);*/
/*set_style(ctx, THEME_BLUE);*/
/*set_style(ctx, THEME_DARK);*/
+ #endif
while (running)
{
@@ -144,9 +161,15 @@ int main(void)
nk_end(ctx);
/* -------------- EXAMPLES ---------------- */
- /*calculator(ctx);*/
- /*overview(ctx);*/
- /*node_editor(ctx);*/
+ #ifdef INCLUDE_CALCULATOR
+ calculator(ctx);
+ #endif
+ #ifdef INCLUDE_OVERVIEW
+ overview(ctx);
+ #endif
+ #ifdef INCLUDE_NODE_EDITOR
+ node_editor(ctx);
+ #endif
/* ----------------------------------------- */
/* Draw */