Selaa lähdekoodia

Add files via upload

nyaruku 2 vuotta sitten
vanhempi
commit
24ceaad002
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      demo/gdi/nuklear_gdi.h

+ 3 - 2
demo/gdi/nuklear_gdi.h

@@ -516,6 +516,7 @@ static void
 nk_gdi_draw_text(HDC dc, short x, short y, unsigned short w, unsigned short h,
 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)
     const char *text, int len, GdiFont *font, struct nk_color cbg, struct nk_color cfg)
 {
 {
+   
     int wsize;
     int wsize;
     WCHAR* wstr;
     WCHAR* wstr;
 
 
@@ -524,8 +525,8 @@ 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);
     wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
     wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
     wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
     MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
     MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
-
-    SetBkColor(dc, convert_color(cbg));
+    // Transparent Text Background 
+    SetBkMode(dc, TRANSPARENT);
     SetTextColor(dc, convert_color(cfg));
     SetTextColor(dc, convert_color(cfg));
 
 
     SelectObject(dc, font->handle);
     SelectObject(dc, font->handle);