tweaks in ui
This commit is contained in:
@@ -31,17 +31,17 @@ enum {
|
|||||||
type_kind_last_basic = type_kind_char,
|
type_kind_last_basic = type_kind_char,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct type_member_t type_member_t;
|
|
||||||
typedef struct type_t type_t;
|
typedef struct type_t type_t;
|
||||||
struct type_t {
|
struct type_t {
|
||||||
type_kind_t kind;
|
type_kind_t kind;
|
||||||
s8_t name;
|
s8_t name;
|
||||||
i32 size;
|
i32 size;
|
||||||
i32 count;
|
i32 count;
|
||||||
type_member_t *members;
|
struct type_member_t *members;
|
||||||
type_t *base;
|
type_t *base;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct type_member_t type_member_t;
|
||||||
struct type_member_t {
|
struct type_member_t {
|
||||||
s8_t name;
|
s8_t name;
|
||||||
type_t *type;
|
type_t *type;
|
||||||
|
|||||||
@@ -21,10 +21,8 @@
|
|||||||
#define STBTT_memcpy memory_copy
|
#define STBTT_memcpy memory_copy
|
||||||
#define STBTT_memset memory_set
|
#define STBTT_memset memory_set
|
||||||
#include "render/stb_truetype.h"
|
#include "render/stb_truetype.h"
|
||||||
// #include "render/backup_font.c"
|
|
||||||
#include "render/font.c"
|
#include "render/font.c"
|
||||||
#include "render/render_opengl.c"
|
#include "render/render_opengl.c"
|
||||||
|
|
||||||
#include "wasm_app.gen.c"
|
#include "wasm_app.gen.c"
|
||||||
|
|
||||||
#include "ui_iter.c"
|
#include "ui_iter.c"
|
||||||
|
|||||||
@@ -521,6 +521,10 @@ fn void ui_demo_update(app_frame_t *frame) {
|
|||||||
|
|
||||||
static f32 scroller_value;
|
static f32 scroller_value;
|
||||||
defer_block(ui_push_top(item_box), ui_pop_top()) {
|
defer_block(ui_push_top(item_box), ui_pop_top()) {
|
||||||
|
for (i32 i = 0; i < lengthof(tweak_table); i += 1) {
|
||||||
|
mt_tweak_t *tweak = tweak_table + i;
|
||||||
|
ui_serial_subtype(tweak->ptr, tweak->type, tweak->name);
|
||||||
|
}
|
||||||
ui_serial_type(&ui_test_event, type(app_event_t));
|
ui_serial_type(&ui_test_event, type(app_event_t));
|
||||||
defer_if (ui_begin_expander("app_event_t").clicked, ui_end_expander()) {
|
defer_if (ui_begin_expander("app_event_t").clicked, ui_end_expander()) {
|
||||||
for (int i = 0; i < 2; i += 1) {
|
for (int i = 0; i < 2; i += 1) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ void mt_wasm_app(ma_arena_t *arena) {
|
|||||||
tweak->value = parser_next(par)->string;
|
tweak->value = parser_next(par)->string;
|
||||||
parser_expect(par, lex_kind_close_paren);
|
parser_expect(par, lex_kind_close_paren);
|
||||||
SLLQ_APPEND(first_tweak, last_tweak, tweak);
|
SLLQ_APPEND(first_tweak, last_tweak, tweak);
|
||||||
|
matched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (par->at->inside_macro == false && parser_matchi(par, s8_lit("mt_tweak_f32"))) {
|
if (par->at->inside_macro == false && parser_matchi(par, s8_lit("mt_tweak_f32"))) {
|
||||||
@@ -58,6 +59,7 @@ void mt_wasm_app(ma_arena_t *arena) {
|
|||||||
tweak->max = parser_next(par)->string;
|
tweak->max = parser_next(par)->string;
|
||||||
parser_expect(par, lex_kind_close_paren);
|
parser_expect(par, lex_kind_close_paren);
|
||||||
SLLQ_APPEND(first_tweak, last_tweak, tweak);
|
SLLQ_APPEND(first_tweak, last_tweak, tweak);
|
||||||
|
matched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
|
|||||||
Reference in New Issue
Block a user