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:
authorTon Roosendaal <ton@blender.org>2005-08-15 23:46:09 +0400
committerTon Roosendaal <ton@blender.org>2005-08-15 23:46:09 +0400
commitf1609dde1151c8b5645cf142be99a349b0482753 (patch)
tree2d0ab2c3dd0aa495c0f12ad0055a583f72f9650a /source/blender/src/interface.c
parent6bc3f4746bc5325d8e1ff54469ebb6929bf3bdb2 (diff)
Added new button type: ROUNDBOX
This replaces drawing with uiRoundBox() or glRect() in button Panels, which just fails for dynamic constructed button views where Panels are sometimes invisible. Also eliminates hack with PanelPop(). Error was visible with new Modifier panel, entering/exiting EditMode. Done Modifier and Constraints. Syntax: The last 4 free variables in the uiDefBut() call are: - float, corner-rounding (0.0-pixels), - not used, - short: roundbox type (bits, 1 2 4 8 for clockwise corners starting left/top) - short: color shade offset (color range 0-255)
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 787ac847523..22e104711fd 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -2699,7 +2699,7 @@ static uiBut *ui_but_prev(uiBut *but)
{
while(but->prev) {
but= but->prev;
- if(but->type!=LABEL && but->type!=SEPR) return but;
+ if(but->type!=LABEL && but->type!=SEPR && but->type!=ROUNDBOX) return but;
}
return NULL;
}
@@ -2708,7 +2708,7 @@ static uiBut *ui_but_next(uiBut *but)
{
while(but->next) {
but= but->next;
- if(but->type!=LABEL && but->type!=SEPR) return but;
+ if(but->type!=LABEL && but->type!=SEPR && but->type!=ROUNDBOX) return but;
}
return NULL;
}
@@ -2719,7 +2719,7 @@ static uiBut *ui_but_first(uiBlock *block)
but= block->buttons.first;
while(but) {
- if(but->type!=LABEL && but->type!=SEPR) return but;
+ if(but->type!=LABEL && but->type!=SEPR && but->type!=ROUNDBOX) return but;
but= but->next;
}
return NULL;
@@ -2731,7 +2731,7 @@ static uiBut *ui_but_last(uiBlock *block)
but= block->buttons.last;
while(but) {
- if(but->type!=LABEL && but->type!=SEPR) return but;
+ if(but->type!=LABEL && but->type!=SEPR && but->type!=ROUNDBOX) return but;
but= but->prev;
}
return NULL;
@@ -4575,7 +4575,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
if ELEM8(but->type, HSVSLI , NUMSLI, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM) {
but->flag |= UI_TEXT_LEFT;
}
-
+
+ if(but->type==ROUNDBOX)
+ but->flag |= UI_NO_HILITE;
+
but->flag |= (block->flag & UI_BUT_ALIGN);
return but;