s/hide_markers/show_markers/

This commit is contained in:
Brian Watling 2024-02-26 22:58:44 -05:00
parent f31cb7f7e5
commit 254dfc2120
5 changed files with 17 additions and 17 deletions

View File

@ -621,7 +621,7 @@ overview(struct nk_context *ctx)
float id = 0;
static int col_index = -1;
static int line_index = -1;
static int hide_markers = nk_false;
static int show_markers = nk_true;
float step = (2*3.141592654f) / 32;
int i;
@ -631,9 +631,9 @@ overview(struct nk_context *ctx)
id = 0;
index = -1;
nk_layout_row_dynamic(ctx, 15, 1);
nk_checkbox_label(ctx, "Hide markers", &hide_markers);
nk_checkbox_label(ctx, "Show markers", &show_markers);
nk_layout_row_dynamic(ctx, 100, 1);
ctx->style.chart.hide_markers = hide_markers;
ctx->style.chart.show_markers = show_markers;
if (nk_chart_begin(ctx, NK_CHART_LINES, 32, -1.0f, 1.0f)) {
for (i = 0; i < 32; ++i) {
nk_flags res = nk_chart_push(ctx, (float)cos(id));

View File

@ -5198,7 +5198,7 @@ struct nk_style_chart {
struct nk_vec2 padding;
float color_factor;
float disabled_factor;
nk_bool hide_markers;
nk_bool show_markers;
};
struct nk_style_combo {
@ -5389,7 +5389,7 @@ struct nk_chart_slot {
int count;
struct nk_vec2 last;
int index;
nk_bool hide_markers;
nk_bool show_markers;
};
struct nk_chart {
@ -18658,7 +18658,7 @@ nk_style_from_table(struct nk_context *ctx, const struct nk_color *table)
chart->rounding = 0;
chart->color_factor = 1.0f;
chart->disabled_factor = NK_WIDGET_DISABLED_FACTOR;
chart->hide_markers = nk_false;
chart->show_markers = nk_true;
/* combo */
combo = &style->combo;
@ -28496,7 +28496,7 @@ nk_chart_begin_colored(struct nk_context *ctx, enum nk_chart_type type,
slot->min = NK_MIN(min_value, max_value);
slot->max = NK_MAX(min_value, max_value);
slot->range = slot->max - slot->min;
slot->hide_markers = style->hide_markers;}
slot->show_markers = style->show_markers;}
/* draw chart background */
background = &style->background;
@ -28549,7 +28549,7 @@ nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type type,
slot->min = NK_MIN(min_value, max_value);
slot->max = NK_MAX(min_value, max_value);
slot->range = slot->max - slot->min;
slot->hide_markers = style->hide_markers;}
slot->show_markers = style->show_markers;}
}
NK_API void
nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type type,
@ -28596,7 +28596,7 @@ nk_chart_push_line(struct nk_context *ctx, struct nk_window *win,
i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
color = g->slots[slot].highlight;
}
if (!g->slots[slot].hide_markers) {
if (g->slots[slot].show_markers) {
nk_fill_rect(out, bounds, 0, color);
}
g->slots[slot].index += 1;
@ -28622,7 +28622,7 @@ nk_chart_push_line(struct nk_context *ctx, struct nk_window *win,
color = g->slots[slot].highlight;
}
}
if (!g->slots[slot].hide_markers) {
if (g->slots[slot].show_markers) {
nk_fill_rect(out, nk_rect(cur.x - 2, cur.y - 2, 4, 4), 0, color);
}

View File

@ -4976,7 +4976,7 @@ struct nk_style_chart {
struct nk_vec2 padding;
float color_factor;
float disabled_factor;
nk_bool hide_markers;
nk_bool show_markers;
};
struct nk_style_combo {
@ -5167,7 +5167,7 @@ struct nk_chart_slot {
int count;
struct nk_vec2 last;
int index;
nk_bool hide_markers;
nk_bool show_markers;
};
struct nk_chart {

View File

@ -53,7 +53,7 @@ nk_chart_begin_colored(struct nk_context *ctx, enum nk_chart_type type,
slot->min = NK_MIN(min_value, max_value);
slot->max = NK_MAX(min_value, max_value);
slot->range = slot->max - slot->min;
slot->hide_markers = style->hide_markers;}
slot->show_markers = style->show_markers;}
/* draw chart background */
background = &style->background;
@ -106,7 +106,7 @@ nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type type,
slot->min = NK_MIN(min_value, max_value);
slot->max = NK_MAX(min_value, max_value);
slot->range = slot->max - slot->min;
slot->hide_markers = style->hide_markers;}
slot->show_markers = style->show_markers;}
}
NK_API void
nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type type,
@ -153,7 +153,7 @@ nk_chart_push_line(struct nk_context *ctx, struct nk_window *win,
i->mouse.buttons[NK_BUTTON_LEFT].clicked) ? NK_CHART_CLICKED: 0;
color = g->slots[slot].highlight;
}
if (!g->slots[slot].hide_markers) {
if (g->slots[slot].show_markers) {
nk_fill_rect(out, bounds, 0, color);
}
g->slots[slot].index += 1;
@ -179,7 +179,7 @@ nk_chart_push_line(struct nk_context *ctx, struct nk_window *win,
color = g->slots[slot].highlight;
}
}
if (!g->slots[slot].hide_markers) {
if (g->slots[slot].show_markers) {
nk_fill_rect(out, nk_rect(cur.x - 2, cur.y - 2, 4, 4), 0, color);
}

View File

@ -486,7 +486,7 @@ nk_style_from_table(struct nk_context *ctx, const struct nk_color *table)
chart->rounding = 0;
chart->color_factor = 1.0f;
chart->disabled_factor = NK_WIDGET_DISABLED_FACTOR;
chart->hide_markers = nk_false;
chart->show_markers = nk_true;
/* combo */
combo = &style->combo;