Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/src/toolbox.c')
-rw-r--r--source/blender/src/toolbox.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index c8a20cdc951..5b2120424f1 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -2282,7 +2282,7 @@ void toolbox_generic( TBitem *generic_menu )
uiBlock *block;
uiBut *but;
TBitem *menu;
- int dx=96;
+ int dx=96, first=1, len;
short event, mval[2];
intptr_t ypos = -5;
@@ -2303,11 +2303,17 @@ void toolbox_generic( TBitem *generic_menu )
/* Add the menu */
for (menu = generic_menu; menu->icon != -1; menu++) {
- if(strcmp(menu->name, "SEPR")==0) {
+ if (first && (len=strlen(menu->name)) > 2 && menu->name[len-2]=='%' && menu->name[len-1]=='t') {
+ menu->name[len-2] = '\0';
+ uiSetCurFont(block, UI_HELVB);
+ uiDefIconTextBut(block, LABEL, 0, ICON_BLANK1, menu->name, mval[0]+tb_mainx,mval[1]+tb_mainy+ypos+5, dx, 19, NULL, 0.0, 0.0, 0, 0, "");
+ uiSetCurFont(block, UI_HELV);
+ ypos-=20;
+ } else if(strcmp(menu->name, "SEPR")==0) {
uiDefBut(block, SEPR, 0, "", mval[0]+tb_mainx,mval[1]+tb_mainy+ypos+5, dx, 6, NULL, 0.0, 0.0, 0, 0, "");
ypos-=6;
} else {
- if (menu->poin) {
+ if (menu->poin) {
but=uiDefIconTextBlockBut(block, tb_makemenu, menu->poin, ICON_RIGHTARROW_THIN, menu->name, mval[0]+tb_mainx,mval[1]+tb_mainy+ypos+5, dx, 19, "");
uiButSetFlag(but, UI_MAKE_RIGHT);
@@ -2318,6 +2324,7 @@ void toolbox_generic( TBitem *generic_menu )
}
ypos-=20;
}
+ first= 0;
}
uiBlockSetButmFunc(block, menu->poin, NULL);