fix weird issues with buttons in shadowed text

This commit is contained in:
David Rose 2008-10-21 22:52:45 +00:00
parent f28396fead
commit 600a70a7f2
3 changed files with 11 additions and 2 deletions

View File

@ -741,6 +741,10 @@ do_flatten_siblings(PandaNode *parent_node, PandaNode *child1,
choose_name(new_child, child2, child1);
// Make sure the new child list has child1's children first,
// followed by child2's children.
child1->steal_children(child2);
new_child->replace_node(child1);
new_child->replace_node(child2);

View File

@ -598,7 +598,12 @@ assemble_text() {
// vertices.
if (properties->has_shadow()) {
placement->assign_copy_to(shadow_geom_node, shadow_state, shadow_xform);
placement->copy_graphic_to(shadow_node, shadow_state, shadow_xform);
// Don't shadow the graphics. That can result in duplication of
// button objects, plus it looks weird. If you want a shadowed
// graphic, you can shadow it yourself before you add it.
//placement->copy_graphic_to(shadow_node, shadow_state, shadow_xform);
any_shadow = true;
}
placement->assign_to(text_geom_node, text_state);

View File

@ -342,7 +342,7 @@ generate() {
gr.apply_attribs(root);
gr.flatten(root, ~SceneGraphReducer::CS_within_radius);
gr.collect_vertex_data(root);
gr.unify(root, false);
gr.unify(root, true);
}
// Now deal with the decorations.