|
@@ -2996,6 +2996,7 @@ NK_API void nk_label_colored(struct nk_context*, const char*, nk_flags align, st
|
|
|
NK_API void nk_label_wrap(struct nk_context*, const char*);
|
|
|
NK_API void nk_label_colored_wrap(struct nk_context*, const char*, struct nk_color);
|
|
|
NK_API void nk_image(struct nk_context*, struct nk_image);
|
|
|
+NK_API void nk_image_color(struct nk_context*, struct nk_image, struct nk_color);
|
|
|
#ifdef NK_INCLUDE_STANDARD_VARARGS
|
|
|
NK_API void nk_labelf(struct nk_context*, nk_flags, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(3);
|
|
|
NK_API void nk_labelf_colored(struct nk_context*, nk_flags, struct nk_color, NK_PRINTF_FORMAT_STRING const char*,...) NK_PRINTF_VARARG_FUNC(4);
|
|
@@ -21939,7 +21940,21 @@ nk_image(struct nk_context *ctx, struct nk_image img)
|
|
|
if (!nk_widget(&bounds, ctx)) return;
|
|
|
nk_draw_image(&win->buffer, bounds, &img, nk_white);
|
|
|
}
|
|
|
+NK_API void
|
|
|
+nk_image_color(struct nk_context *ctx, struct nk_image img, struct nk_color col)
|
|
|
+{
|
|
|
+ struct nk_window *win;
|
|
|
+ struct nk_rect bounds;
|
|
|
+
|
|
|
+ NK_ASSERT(ctx);
|
|
|
+ NK_ASSERT(ctx->current);
|
|
|
+ NK_ASSERT(ctx->current->layout);
|
|
|
+ if (!ctx || !ctx->current || !ctx->current->layout) return;
|
|
|
|
|
|
+ win = ctx->current;
|
|
|
+ if (!nk_widget(&bounds, ctx)) return;
|
|
|
+ nk_draw_image(&win->buffer, bounds, &img, col);
|
|
|
+}
|
|
|
/*----------------------------------------------------------------
|
|
|
*
|
|
|
* BUTTON
|