aboutsummaryrefslogtreecommitdiff
path: root/atom_inspector_nk.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-04 15:48:49 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-04 15:48:49 +0200
commit013732710cb14928366b67adcd35ec6ddc26e6f1 (patch)
tree3329b69f22ab47918f341191506a457ad8cf7f42 /atom_inspector_nk.c
parentd9ee7bc124c2ccd3a5bf64e457d85dfd7f3ed74e (diff)
downloadsherlock.lv2-013732710cb14928366b67adcd35ec6ddc26e6f1.tar.xz
add toggle to ignore time events.
Diffstat (limited to 'atom_inspector_nk.c')
-rw-r--r--atom_inspector_nk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/atom_inspector_nk.c b/atom_inspector_nk.c
index 00d937c..6a555af 100644
--- a/atom_inspector_nk.c
+++ b/atom_inspector_nk.c
@@ -297,7 +297,7 @@ _atom_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
nk_list_view_end(&lview);
}
- nk_layout_row_dynamic(ctx, widget_h, 4);
+ nk_layout_row_dynamic(ctx, widget_h, 5);
{
const int32_t state_overwrite = nk_check_label(ctx, "overwrite", handle->state.overwrite);
if(state_overwrite != handle->state.overwrite)
@@ -329,6 +329,13 @@ _atom_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
handle->ttl_dirty = true;
sratom_set_pretty_numbers(handle->sratom, handle->state.pretty);
}
+
+ const int32_t state_time = nk_check_label(ctx, "time", handle->state.time);
+ if(state_time != handle->state.time)
+ {
+ handle->state.time = state_time;
+ _toggle(handle, handle->urid.time, handle->state.time, true);
+ }
}
const bool max_reached = handle->n_item >= MAX_LINES;