diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-28 21:21:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-28 21:21:00 +0400 |
commit | 1d181b91080294b8ec51165791da69b53d535d51 (patch) | |
tree | f81c586d23bde4aaa68096b40eb3e93654d19175 /source/blender/src/interface_draw.c | |
parent | 6e27e1b6ebb76f937182468d4f8fa64f028c90e7 (diff) |
removed doc_browser.py - since it covers ~half the BPY api, not documenting any of blenders data types.
replaced with a help_bpy_api.py, that opens a web browser at the Blender Python API page.
Camera.c - added a veriable .angle to camera, same as .lens but adjusts the camera angle in degrees (like the D button)
export_fbx.py - use the the camera angle property.
object_cookie_cutter.py - use PointInTriangle2D rather then own function.
buttons_shading.c - added OB: and tooltip to object world mapping.
interface_draw.c - (Simple theme) text buttons looked exactly like normal buttons (more confusing when they had no text), made the text and ID buttons render inset so you can tell them apart.
Diffstat (limited to 'source/blender/src/interface_draw.c')
-rw-r--r-- | source/blender/src/interface_draw.c | 78 |
1 files changed, 52 insertions, 26 deletions
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index 3c67975e96f..c7bcc510ef1 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -1207,16 +1207,17 @@ static void ui_draw_round(int type, int colorid, float asp, float x1, float y1, static void ui_draw_minimal(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag) { /* too much space between buttons */ - /* - x1+= asp; - x2-= asp; - y1+= asp; - y2-= asp; - */ - /* Less space between buttons looks nicer */ - y2-= asp; - x2-= asp; + if (type==TEX || type==IDPOIN) { + x1+= asp; + x2-= (asp*2); + //y1+= asp; + y2-= asp; + } else { + /* Less space between buttons looks nicer */ + y2-= asp; + x2-= asp; + } /* paper */ if(flag & UI_SELECT) { @@ -1229,34 +1230,59 @@ static void ui_draw_minimal(int type, int colorid, float asp, float x1, float y1 } glRectf(x1, y1, x2, y2); - - if(flag & UI_SELECT) { + + if (type==TEX || type==IDPOIN) { BIF_ThemeColorShade(colorid, -60); /* top */ fdrawline(x1, y2, x2, y2); /* left */ fdrawline(x1, y1, x1, y2); - BIF_ThemeColorShade(colorid, +40); - - /* below */ - fdrawline(x1, y1, x2, y1); - /* right */ - fdrawline(x2, y1, x2, y2); - } - else { - BIF_ThemeColorShade(colorid, +40); - - /* top */ - fdrawline(x1, y2, x2, y2); - /* left */ - fdrawline(x1, y1, x1, y2); - BIF_ThemeColorShade(colorid, -60); + + /* text underline, some */ + BIF_ThemeColorShade(colorid, +50); + glEnable(GL_LINE_STIPPLE); + glLineStipple(1, 0x8888); + fdrawline(x1+(asp*2), y1+(asp*3), x2-(asp*2), y1+(asp*3)); + glDisable(GL_LINE_STIPPLE); + + + BIF_ThemeColorShade(colorid, +60); /* below */ fdrawline(x1, y1, x2, y1); /* right */ fdrawline(x2, y1, x2, y2); + + } else { + if(flag & UI_SELECT) { + BIF_ThemeColorShade(colorid, -60); + + /* top */ + fdrawline(x1, y2, x2, y2); + /* left */ + fdrawline(x1, y1, x1, y2); + BIF_ThemeColorShade(colorid, +40); + + /* below */ + fdrawline(x1, y1, x2, y1); + /* right */ + fdrawline(x2, y1, x2, y2); + } + else { + BIF_ThemeColorShade(colorid, +40); + + /* top */ + fdrawline(x1, y2, x2, y2); + /* left */ + fdrawline(x1, y1, x1, y2); + + BIF_ThemeColorShade(colorid, -60); + /* below */ + fdrawline(x1, y1, x2, y1); + /* right */ + fdrawline(x2, y1, x2, y2); + } } /* special type decorations */ |