Index: src/drawview.c =================================================================== --- src/drawview.c (revision 12990) +++ src/drawview.c (working copy) @@ -1387,7 +1387,78 @@ BMF_DrawString(G.fonts, info); } +/* Draw a single-line pipe-separated summary for tools options in edit mode */ +static void draw_tools_summary(ScrArea *sa) +{ + char str[32]; + int i = 0; + int sz = 0; + if (G.obedit != NULL && G.obedit->type == OB_MESH) + { + /* Occlude background geometry? */ + if (G.vd->flag & V3D_ZBUF_SELECT) + { + str[i++] = 'O'; + str[i++] = 'C'; + str[i++] = 'D'; + } + + /* Is proportional mode active? */ + if (G.scene->proportional) + { + if (G.vd->flag & V3D_ZBUF_SELECT) + { + str[i++] = ' '; + str[i++] = ' '; + str[i++] = '|'; + str[i++] = ' '; + str[i++] = ' '; + } + + str[i++] = 'P'; + str[i++] = 'r'; + str[i++] = 'o'; + str[i++] = 'p'; + str[i++] = ':'; + + /* Proportional mode is On */ + if (G.scene->proportional == 1) + { + str[i++] = ' '; + str[i++] = 'O'; + str[i++] = 'n'; + } + /* Proportional mode is Connected */ + else if (G.scene->proportional == 2) + { + str[i++] = ' '; + str[i++] = 'C'; + str[i++] = 'o'; + str[i++] = 'n'; + } + } + + /* Other tools options to show in the summary? Add below. */ + /* Just fill in characters of the str buffer */ + /* Note: remember the buffer is on the stack, so increase */ + /* the amount of chars allocated if needed, although */ + /* a summary longer than 32 chars will probably be */ + /* too space consuming on the 3d view. */ + + + + str[i++] = '\0'; + + BIF_ThemeColor(TH_TEXT_HI); + + sz = BMF_GetStringWidth(G.fonts, str); + glRasterPos2i(sa->winx-sz-20, sa->winy-20); + + BMF_DrawString(G.fonts, str); + } +} + /* Draw a live substitute of the view icon, which is always shown */ static void draw_view_axis(void) { @@ -3098,6 +3169,8 @@ if(ob && (U.uiflag & USER_DRAWVIEWINFO)) draw_selected_name(ob); + draw_tools_summary(sa); + draw_area_emboss(sa); /* it is important to end a view in a transform compatible with buttons */