mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-11 00:27:48 -04:00
Nov 26, 2024, 11:02 PM
This commit is contained in:
parent
764c507457
commit
517f121479
1 changed files with 3 additions and 3 deletions
|
@ -3959,7 +3959,7 @@ static int nk_love_style_set_font(lua_State *L)
|
||||||
nk_love_assert_argc(L, lua_gettop(L) == 2);
|
nk_love_assert_argc(L, lua_gettop(L) == 2);
|
||||||
struct nk_love_context *ctx = nk_love_checkcontext(L, 1);
|
struct nk_love_context *ctx = nk_love_checkcontext(L, 1);
|
||||||
nk_love_checkFont(L, 2, &ctx->fonts[ctx->font_count]);
|
nk_love_checkFont(L, 2, &ctx->fonts[ctx->font_count]);
|
||||||
nk_style_set_font(&ctx->nkctx, &ctx->fonts[ctx->font_count++]);
|
nk_style_set_font(&ctx->nkctx, (const struct nk_user_font *)&ctx->fonts[ctx->font_count++]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4066,7 +4066,7 @@ static int nk_love_style_push_font(lua_State *L, const struct nk_user_font **fie
|
||||||
{
|
{
|
||||||
struct nk_love_context *ctx = nk_love_checkcontext(L, 1);
|
struct nk_love_context *ctx = nk_love_checkcontext(L, 1);
|
||||||
nk_love_checkFont(L, -1, &context->fonts[context->font_count]);
|
nk_love_checkFont(L, -1, &context->fonts[context->font_count]);
|
||||||
int success = nk_style_push_font(&ctx->nkctx, &context->fonts[context->font_count++]);
|
int success = nk_style_push_font(&ctx->nkctx, (const struct nk_user_font *)&context->fonts[context->font_count++]);
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
lua_pushstring(L, "font");
|
lua_pushstring(L, "font");
|
||||||
|
@ -4759,7 +4759,7 @@ static int nk_love_text(lua_State *L)
|
||||||
float line_thickness;
|
float line_thickness;
|
||||||
struct nk_color color;
|
struct nk_color color;
|
||||||
nk_love_getGraphics(L, &line_thickness, &color);
|
nk_love_getGraphics(L, &line_thickness, &color);
|
||||||
nk_draw_text(&context->nkctx.current->buffer, nk_rect(x, y, w, h), text, strlen(text), &context->fonts[context->font_count++], nk_rgba(0, 0, 0, 0), color);
|
nk_draw_text(&context->nkctx.current->buffer, nk_rect(x, y, w, h), text, strlen(text), (const struct nk_user_font *)&context->fonts[context->font_count++], nk_rgba(0, 0, 0, 0), color);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue