2022-08-05 14:23:39 -05:00
|
|
|
#ifndef NUKE_H
|
|
|
|
#define NUKE_H
|
|
|
|
|
2023-09-05 09:38:52 -05:00
|
|
|
#include "render.h"
|
2023-09-18 12:35:40 -05:00
|
|
|
|
|
|
|
#define NK_INCLUDE_STANDARD_IO
|
|
|
|
#define NK_KEYSTATE_BASED_INPUT
|
|
|
|
#define NK_INCLUDE_FIXED_TYPES
|
|
|
|
#define NK_INCLUDE_STANDARD_VARARGS
|
|
|
|
#define NK_INCLUDE_FONT_BAKING
|
|
|
|
#define NK_INCLUDE_DEFAULT_FONT
|
|
|
|
#define NK_INCLUDE_STANDARD_BOOL
|
|
|
|
#define NK_INCLUDE_DEFAULT_ALLOCATOR
|
|
|
|
#define NK_INCLUDE_STANDARD_IO
|
|
|
|
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
|
2023-09-18 21:55:37 -05:00
|
|
|
|
2023-09-18 12:35:40 -05:00
|
|
|
#include "sokol/sokol_gfx.h"
|
2023-09-18 21:55:37 -05:00
|
|
|
#include "sokol/sokol_app.h"
|
|
|
|
#include "nuklear.h"
|
2023-09-18 12:35:40 -05:00
|
|
|
#include "sokol/sokol_nuklear.h"
|
|
|
|
|
2022-11-03 16:58:03 -05:00
|
|
|
struct window;
|
2022-08-05 14:23:39 -05:00
|
|
|
|
2022-11-03 16:58:03 -05:00
|
|
|
void nuke_init(struct window *win);
|
2022-08-05 14:23:39 -05:00
|
|
|
void nuke_start();
|
|
|
|
void nuke_end();
|
|
|
|
|
2023-09-05 09:38:52 -05:00
|
|
|
int nuke_begin(const char *lbl, struct rect rect);
|
2023-01-19 13:06:32 -06:00
|
|
|
int nuke_begin_win(const char *lbl);
|
2022-12-23 13:48:29 -06:00
|
|
|
void nuke_stop();
|
2023-09-05 09:38:52 -05:00
|
|
|
struct rect nuke_win_get_bounds();
|
2022-12-23 13:48:29 -06:00
|
|
|
|
2022-12-15 17:30:22 -06:00
|
|
|
void nuke_property_float(const char *lbl, float min, float *val, float max, float step, float dragstep);
|
2022-12-23 13:48:29 -06:00
|
|
|
#define nuke_prop_float nuke_property_float
|
|
|
|
void nuke_property_float2(const char *label, float min, float *val, float max, float step, float dragstep);
|
|
|
|
void nuke_property_float3(const char *label, float min, float *val, float max, float step, float dragstep);
|
2022-08-19 11:25:08 -05:00
|
|
|
|
|
|
|
void nuke_property_int(const char *lbl, int min, int *val, int max, int step);
|
|
|
|
void nuke_radio_btn(const char *lbl, int *val, int cmp);
|
|
|
|
void nuke_checkbox(const char *lbl, int *val);
|
2023-03-17 10:25:35 -05:00
|
|
|
void nuke_nel_h(int cols, int h);
|
2022-08-17 00:01:51 -05:00
|
|
|
void nuke_nel(int cols);
|
2023-03-10 13:13:48 -06:00
|
|
|
void nuke_row(int height);
|
2022-08-17 00:01:51 -05:00
|
|
|
void nuke_label(const char *s);
|
2022-08-19 11:25:08 -05:00
|
|
|
void nuke_prop_float(const char *label, float min, float *val, float max, float step, float dragstep);
|
2022-12-12 01:35:42 -06:00
|
|
|
void nuke_edit_str(char *str);
|
2023-02-15 17:54:05 -06:00
|
|
|
void nuke_img(char *path);
|
2022-08-19 11:25:08 -05:00
|
|
|
|
2023-03-17 10:25:35 -05:00
|
|
|
void nuke_scrolltext(char *str);
|
|
|
|
|
2022-12-23 13:48:29 -06:00
|
|
|
int nuke_push_tree_id(const char *name, int id);
|
|
|
|
void nuke_tree_pop();
|
2022-08-19 11:25:08 -05:00
|
|
|
|
|
|
|
int nuke_btn(const char *lbl);
|
|
|
|
|
2022-12-23 13:48:29 -06:00
|
|
|
void nuke_labelf(const char *fmt, ...);
|
2022-08-12 14:03:56 -05:00
|
|
|
|
2022-11-25 07:12:31 -06:00
|
|
|
#endif
|