Skip to content

Commit

Permalink
Update nuklear_gdi.h
Browse files Browse the repository at this point in the history
  • Loading branch information
nyaruku authored Sep 6, 2023
1 parent 24ceaad commit 1aae7b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/gdi/nuklear_gdi.h
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ static void
nk_gdi_draw_text(HDC dc, short x, short y, unsigned short w, unsigned short h,
const char *text, int len, GdiFont *font, struct nk_color cbg, struct nk_color cfg)
{

int wsize;
WCHAR* wstr;

Expand All @@ -525,8 +524,9 @@ nk_gdi_draw_text(HDC dc, short x, short y, unsigned short w, unsigned short h,
wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
// Transparent Text Background
SetBkMode(dc, TRANSPARENT);

SetBkMode(dc, TRANSPARENT); // Transparent Text Background
SetBkColor(dc, convert_color(cbg));
SetTextColor(dc, convert_color(cfg));

SelectObject(dc, font->handle);
Expand Down

0 comments on commit 1aae7b5

Please sign in to comment.