diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-03 17:49:54 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-03 17:49:54 +0400 |
commit | 3a840670a52701e8690a5d201bcb57eac45e2c8a (patch) | |
tree | 0341f7c09a337d8d43d0fca51376314476ac2905 /source/blender/src/header_view3d.c | |
parent | 6e4b9ad96b3894e432a1561d1902f656aaa799c0 (diff) |
Lots of small changes, all for UI in Blender;
----- Killed UI frontbuffer draw
The interface toolkit was drawing all live updates (while using menus/buttons)
in the frontbuffer. This isn't well supported cross-platform, so time to be
killed once. Now it uses *only* glReadPixels and glCopyPixels for frontbuffer
access.
Live updates or menus now are drawn in backbuffer always, and copied to
front when needed.
NOTE: it was tested, but needs thorough review! On PC systems I suspects
backbuffer selection to screw up (check!). On SGI/SUN workstations it
should work smooth; but I need evidence
----- Smaller fixes;
- AA fonts were garbled on ATI systems. Now the AA fonts are drawn exact
on pixel positions. Needs the new FTGL libb too, patch is on maillist
- Rounded theme uses antialiased outlines
- Pulldown and popup menus have nice softshadow now
- New button type 'PULLDOWN', thats the one that callsup a pulldown menu.
Should be added to themes, as is the full menu/pulldown drawing
- Screendump for 1 window does the full window now, including header
- Empty pulldowns (for example running blender without scripts) give no
drawing error anymore
For review & fun;
- added curved lines as connectors, for Oops window
Diffstat (limited to 'source/blender/src/header_view3d.c')
-rw-r--r-- | source/blender/src/header_view3d.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 3bfb47c1556..9d28b7746c6 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -3720,36 +3720,36 @@ static void view3d_header_pulldowns(uiBlock *block, short *xcoord) * height of the header */ xmax= GetButStringLength("View"); - uiDefBlockBut(block, view3d_viewmenu, NULL, "View", xco, -2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_viewmenu, NULL, "View", xco, -2, xmax-3, 24, ""); xco+= xmax; xmax= GetButStringLength("Select"); if (G.obedit) { if (OBACT && OBACT->type == OB_MESH) { - uiDefBlockBut(block, view3d_select_meshmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_meshmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } else if (OBACT && (OBACT->type == OB_CURVE || OBACT->type == OB_SURF)) { - uiDefBlockBut(block, view3d_select_curvemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_curvemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } else if (OBACT && OBACT->type == OB_FONT) { - uiDefBlockBut(block, view3d_select_meshmenu, NULL, "Select", xco, -2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_meshmenu, NULL, "Select", xco, -2, xmax-3, 24, ""); } else if (OBACT && OBACT->type == OB_MBALL) { - uiDefBlockBut(block, view3d_select_metaballmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_metaballmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } else if (OBACT && OBACT->type == OB_LATTICE) { - uiDefBlockBut(block, view3d_select_latticemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_latticemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } else if (OBACT && OBACT->type == OB_ARMATURE) { - uiDefBlockBut(block, view3d_select_armaturemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_armaturemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } } else if (G.f & G_FACESELECT) { if (OBACT && OBACT->type == OB_MESH) { - uiDefBlockBut(block, view3d_select_faceselmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_faceselmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } } else if (G.obpose) { if (OBACT && OBACT->type == OB_ARMATURE) { - uiDefBlockBut(block, view3d_select_pose_armaturemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_pose_armaturemenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } } else if ((G.f & G_VERTEXPAINT) || (G.f & G_TEXTUREPAINT) || (G.f & G_WEIGHTPAINT)) { uiDefBut(block, LABEL,0,"", xco, 0, xmax, 20, 0, 0, 0, 0, 0, ""); } else { - uiDefBlockBut(block, view3d_select_objectmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_select_objectmenu, NULL, "Select", xco,-2, xmax-3, 24, ""); } xco+= xmax; @@ -3757,54 +3757,54 @@ static void view3d_header_pulldowns(uiBlock *block, short *xcoord) if (G.obedit) { if (OBACT && OBACT->type == OB_MESH) { xmax= GetButStringLength("Mesh"); - uiDefBlockBut(block, view3d_edit_meshmenu, NULL, "Mesh", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_meshmenu, NULL, "Mesh", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (OBACT && OBACT->type == OB_CURVE) { xmax= GetButStringLength("Curve"); - uiDefBlockBut(block, view3d_edit_curvemenu, NULL, "Curve", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_curvemenu, NULL, "Curve", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (OBACT && OBACT->type == OB_SURF) { xmax= GetButStringLength("Surface"); - uiDefBlockBut(block, view3d_edit_curvemenu, NULL, "Surface", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_curvemenu, NULL, "Surface", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (OBACT && OBACT->type == OB_FONT) { xmax= GetButStringLength("Text"); - uiDefBlockBut(block, view3d_edit_textmenu, NULL, "Text", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_textmenu, NULL, "Text", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (OBACT && OBACT->type == OB_MBALL) { xmax= GetButStringLength("Metaball"); - uiDefBlockBut(block, view3d_edit_metaballmenu, NULL, "Metaball", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_metaballmenu, NULL, "Metaball", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (OBACT && OBACT->type == OB_LATTICE) { xmax= GetButStringLength("Lattice"); - uiDefBlockBut(block, view3d_edit_latticemenu, NULL, "Lattice", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_latticemenu, NULL, "Lattice", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (OBACT && OBACT->type == OB_ARMATURE) { xmax= GetButStringLength("Armature"); - uiDefBlockBut(block, view3d_edit_armaturemenu, NULL, "Armature", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_armaturemenu, NULL, "Armature", xco,-2, xmax-3, 24, ""); xco+= xmax; } } else if ((G.f & G_VERTEXPAINT) || (G.f & G_TEXTUREPAINT) || (G.f & G_WEIGHTPAINT)) { xmax= GetButStringLength("Paint"); - uiDefBlockBut(block, view3d_paintmenu, NULL, "Paint", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_paintmenu, NULL, "Paint", xco,-2, xmax-3, 24, ""); xco+= xmax; } else if (G.f & G_FACESELECT) { if (OBACT && OBACT->type == OB_MESH) { xmax= GetButStringLength("Face"); - uiDefBlockBut(block, view3d_faceselmenu, NULL, "Face", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_faceselmenu, NULL, "Face", xco,-2, xmax-3, 24, ""); xco+= xmax; } } else if (G.obpose) { if (OBACT && OBACT->type == OB_ARMATURE) { xmax= GetButStringLength("Armature"); - uiDefBlockBut(block, view3d_pose_armaturemenu, NULL, "Armature", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_pose_armaturemenu, NULL, "Armature", xco,-2, xmax-3, 24, ""); xco+= xmax; } } else { xmax= GetButStringLength("Object"); - uiDefBlockBut(block, view3d_edit_objectmenu, NULL, "Object", xco,-2, xmax-3, 24, ""); + uiDefPulldownBut(block, view3d_edit_objectmenu, NULL, "Object", xco,-2, xmax-3, 24, ""); xco+= xmax; } |