Browse Source

Merge branch 'phoekz-master'

vurtun 9 years ago
parent
commit
2f9f1259bd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nuklear.h

+ 1 - 1
nuklear.h

@@ -6422,6 +6422,7 @@ nk_draw_list_add_text(struct nk_draw_list *list, const struct nk_user_font *font
     if (!glyph_len) return;
     if (!glyph_len) return;
 
 
     /* draw every glyph image */
     /* draw every glyph image */
+    fg.a = (nk_byte)((float)fg.a * list->global_alpha);
     while (text_len <= len && glyph_len) {
     while (text_len <= len && glyph_len) {
         float gx, gy, gh, gw;
         float gx, gy, gh, gw;
         float char_width = 0;
         float char_width = 0;
@@ -6438,7 +6439,6 @@ nk_draw_list_add_text(struct nk_draw_list *list, const struct nk_user_font *font
         gy = rect.y + g.offset.y;
         gy = rect.y + g.offset.y;
         gw = g.width; gh = g.height;
         gw = g.width; gh = g.height;
         char_width = g.xadvance;
         char_width = g.xadvance;
-        fg.a = (nk_byte)((float)fg.a * list->global_alpha);
         nk_draw_list_push_rect_uv(list, nk_vec2(gx,gy), nk_vec2(gx + gw, gy+ gh),
         nk_draw_list_push_rect_uv(list, nk_vec2(gx,gy), nk_vec2(gx + gw, gy+ gh),
             g.uv[0], g.uv[1], fg);
             g.uv[0], g.uv[1], fg);