|
@@ -1127,7 +1127,7 @@ NK_API void nk_input_end(struct nk_context*);
|
|
|
/// cfg.curve_segment_count = 22;
|
|
|
/// cfg.arc_segment_count = 22;
|
|
|
/// cfg.global_alpha = 1.0f;
|
|
|
-/// cfg.null = dev->null;
|
|
|
+/// cfg.tex_null = dev->tex_null;
|
|
|
/// //
|
|
|
/// // setup buffers and convert
|
|
|
/// struct nk_buffer cmds, verts, idx;
|
|
@@ -1177,7 +1177,7 @@ struct nk_convert_config {
|
|
|
unsigned circle_segment_count; /* number of segments used for circles: default to 22 */
|
|
|
unsigned arc_segment_count; /* number of segments used for arcs: default to 22 */
|
|
|
unsigned curve_segment_count; /* number of segments used for curves: default to 22 */
|
|
|
- struct nk_draw_null_texture null; /* handle to texture with a white pixel for shape drawing */
|
|
|
+ struct nk_draw_null_texture tex_null; /* handle to texture with a white pixel for shape drawing */
|
|
|
const struct nk_draw_vertex_layout_element *vertex_layout; /* describes the vertex output format and packing */
|
|
|
nk_size vertex_size; /* sizeof one vertex for vertex packing */
|
|
|
nk_size vertex_alignment; /* vertex alignment: Can be obtained by NK_ALIGNOF */
|
|
@@ -9563,7 +9563,7 @@ nk_draw_list_add_clip(struct nk_draw_list *list, struct nk_rect rect)
|
|
|
NK_ASSERT(list);
|
|
|
if (!list) return;
|
|
|
if (!list->cmd_count) {
|
|
|
- nk_draw_list_push_command(list, rect, list->config.null.texture);
|
|
|
+ nk_draw_list_push_command(list, rect, list->config.tex_null.texture);
|
|
|
} else {
|
|
|
struct nk_draw_command *prev = nk_draw_list_command_last(list);
|
|
|
if (prev->elem_count == 0)
|
|
@@ -9918,7 +9918,7 @@ nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *p
|
|
|
|
|
|
/* fill vertices */
|
|
|
for (i = 0; i < points_count; ++i) {
|
|
|
- const struct nk_vec2 uv = list->config.null.uv;
|
|
|
+ const struct nk_vec2 uv = list->config.tex_null.uv;
|
|
|
vtx = nk_draw_vertex(vtx, &list->config, points[i], uv, col);
|
|
|
vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+0], uv, col_trans);
|
|
|
vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+1], uv, col_trans);
|
|
@@ -9983,7 +9983,7 @@ nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *p
|
|
|
|
|
|
/* add vertices */
|
|
|
for (i = 0; i < points_count; ++i) {
|
|
|
- const struct nk_vec2 uv = list->config.null.uv;
|
|
|
+ const struct nk_vec2 uv = list->config.tex_null.uv;
|
|
|
vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+0], uv, col_trans);
|
|
|
vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+1], uv, col);
|
|
|
vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+2], uv, col);
|
|
@@ -10004,7 +10004,7 @@ nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *p
|
|
|
|
|
|
for (i1 = 0; i1 < count; ++i1) {
|
|
|
float dx, dy;
|
|
|
- const struct nk_vec2 uv = list->config.null.uv;
|
|
|
+ const struct nk_vec2 uv = list->config.tex_null.uv;
|
|
|
const nk_size i2 = ((i1+1) == points_count) ? 0 : i1 + 1;
|
|
|
const struct nk_vec2 p1 = points[i1];
|
|
|
const struct nk_vec2 p2 = points[i2];
|
|
@@ -10114,7 +10114,7 @@ nk_draw_list_fill_poly_convex(struct nk_draw_list *list,
|
|
|
|
|
|
/* add vertices + indexes */
|
|
|
for (i0 = points_count-1, i1 = 0; i1 < points_count; i0 = i1++) {
|
|
|
- const struct nk_vec2 uv = list->config.null.uv;
|
|
|
+ const struct nk_vec2 uv = list->config.tex_null.uv;
|
|
|
struct nk_vec2 n0 = normals[i0];
|
|
|
struct nk_vec2 n1 = normals[i1];
|
|
|
struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(n0, n1), 0.5f);
|
|
@@ -10151,7 +10151,7 @@ nk_draw_list_fill_poly_convex(struct nk_draw_list *list,
|
|
|
|
|
|
if (!vtx || !ids) return;
|
|
|
for (i = 0; i < vtx_count; ++i)
|
|
|
- vtx = nk_draw_vertex(vtx, &list->config, points[i], list->config.null.uv, col);
|
|
|
+ vtx = nk_draw_vertex(vtx, &list->config, points[i], list->config.tex_null.uv, col);
|
|
|
for (i = 2; i < points_count; ++i) {
|
|
|
ids[0] = (nk_draw_index)index;
|
|
|
ids[1] = (nk_draw_index)(index+ i - 1);
|
|
@@ -10180,8 +10180,8 @@ nk_draw_list_path_line_to(struct nk_draw_list *list, struct nk_vec2 pos)
|
|
|
nk_draw_list_add_clip(list, nk_null_rect);
|
|
|
|
|
|
cmd = nk_draw_list_command_last(list);
|
|
|
- if (cmd && cmd->texture.ptr != list->config.null.texture.ptr)
|
|
|
- nk_draw_list_push_image(list, list->config.null.texture);
|
|
|
+ if (cmd && cmd->texture.ptr != list->config.tex_null.texture.ptr)
|
|
|
+ nk_draw_list_push_image(list, list->config.tex_null.texture);
|
|
|
|
|
|
points = nk_draw_list_alloc_path(list, 1);
|
|
|
if (!points) return;
|
|
@@ -10383,7 +10383,7 @@ nk_draw_list_fill_rect_multi_color(struct nk_draw_list *list, struct nk_rect rec
|
|
|
NK_ASSERT(list);
|
|
|
if (!list) return;
|
|
|
|
|
|
- nk_draw_list_push_image(list, list->config.null.texture);
|
|
|
+ nk_draw_list_push_image(list, list->config.tex_null.texture);
|
|
|
index = (nk_draw_index)list->vertex_count;
|
|
|
vtx = nk_draw_list_alloc_vertices(list, 4);
|
|
|
idx = nk_draw_list_alloc_elements(list, 6);
|
|
@@ -10393,10 +10393,10 @@ nk_draw_list_fill_rect_multi_color(struct nk_draw_list *list, struct nk_rect rec
|
|
|
idx[2] = (nk_draw_index)(index+2); idx[3] = (nk_draw_index)(index+0);
|
|
|
idx[4] = (nk_draw_index)(index+2); idx[5] = (nk_draw_index)(index+3);
|
|
|
|
|
|
- vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y), list->config.null.uv, col_left);
|
|
|
- vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y), list->config.null.uv, col_top);
|
|
|
- vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y + rect.h), list->config.null.uv, col_right);
|
|
|
- vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y + rect.h), list->config.null.uv, col_bottom);
|
|
|
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y), list->config.tex_null.uv, col_left);
|
|
|
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y), list->config.tex_null.uv, col_top);
|
|
|
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x + rect.w, rect.y + rect.h), list->config.tex_null.uv, col_right);
|
|
|
+ vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(rect.x, rect.y + rect.h), list->config.tex_null.uv, col_bottom);
|
|
|
}
|
|
|
NK_API void
|
|
|
nk_draw_list_fill_triangle(struct nk_draw_list *list, struct nk_vec2 a,
|
|
@@ -29656,6 +29656,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
|
|
|
/// - [y]: Minor version with non-breaking API and library changes
|
|
|
/// - [z]: Patch version with no direct changes to the API
|
|
|
///
|
|
|
+/// - 2022/07/30 (4.10.1) - Renamed the `null` texture variable to `tex_null`
|
|
|
/// - 2022/05/27 (4.10.0) - Add nk_input_has_mouse_click_in_button_rect() to fix window move bug
|
|
|
/// - 2022/04/18 (4.9.7) - Change button behavior when NK_BUTTON_TRIGGER_ON_RELEASE is defined to
|
|
|
/// only trigger when the mouse position was inside the same button on down
|