Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_draw.c
| Context not available. | |||||
| /* XXX button uses a custom triangle draw below, so make it invisible without icon */ | /* XXX button uses a custom triangle draw below, so make it invisible without icon */ | ||||
| UI_block_emboss_set(node->block, UI_EMBOSS_NONE); | UI_block_emboss_set(node->block, UI_EMBOSS_NONE); | ||||
| but = uiDefBut(node->block, UI_BTYPE_BUT_TOGGLE, B_REDR, "", | but = uiDefBut(node->block, UI_BTYPE_BUT_TOGGLE, B_REDR, "", | ||||
| rct->xmin + 0.6f * U.widget_unit - but_size / 2, rct->ymax - NODE_DY / 2.2f - but_size / 2, | rct->xmin + 0.85f * U.widget_unit - but_size / 2, rct->ymax - NODE_DY / 2.2f - but_size / 2, | ||||
| but_size, but_size, NULL, 0, 0, 0, 0, ""); | but_size, but_size, NULL, 0, 0, 0, 0, ""); | ||||
| UI_but_func_set(but, node_toggle_button_cb, node, (void *)"NODE_OT_hide_toggle"); | UI_but_func_set(but, node_toggle_button_cb, node, (void *)"NODE_OT_hide_toggle"); | ||||
| UI_block_emboss_set(node->block, UI_EMBOSS); | UI_block_emboss_set(node->block, UI_EMBOSS); | ||||
| UI_GetThemeColor4fv(TH_TEXT, color); | UI_GetThemeColor4fv(TH_TEXT, color); | ||||
| /* custom draw function for this button */ | /* custom draw function for this button */ | ||||
| UI_draw_icon_tri(rct->xmin + 0.6f * U.widget_unit, rct->ymax - NODE_DY / 2.2f, 'v', color); | UI_draw_icon_tri(rct->xmin + 0.65f * U.widget_unit, rct->ymax - NODE_DY / 2.2f, 'v', color); | ||||
| } | } | ||||
| nodeLabel(ntree, node, showname, sizeof(showname)); | nodeLabel(ntree, node, showname, sizeof(showname)); | ||||
| Context not available. | |||||
| /* open entirely icon */ | /* open entirely icon */ | ||||
| { | { | ||||
| uiBut *but; | uiBut *but; | ||||
| int but_size = UI_UNIT_X * 1.2f; | int but_size = UI_UNIT_X * .88f; | ||||
| /* XXX button uses a custom triangle draw below, so make it invisible without icon */ | /* XXX button uses a custom triangle draw below, so make it invisible without icon */ | ||||
| UI_block_emboss_set(node->block, UI_EMBOSS_NONE); | UI_block_emboss_set(node->block, UI_EMBOSS_NONE); | ||||
| but = uiDefBut(node->block, UI_BTYPE_BUT_TOGGLE, B_REDR, "", | but = uiDefBut(node->block, UI_BTYPE_BUT_TOGGLE, B_REDR, "", | ||||
| rct->xmin + 10.0f - but_size / 2, centy - but_size / 2, | rct->xmin + 0.83f * U.widget_unit - but_size / 2, centy - but_size / 2, | ||||
| but_size, but_size, NULL, 0, 0, 0, 0, ""); | but_size, but_size, NULL, 0, 0, 0, 0, ""); | ||||
| UI_but_func_set(but, node_toggle_button_cb, node, (void *)"NODE_OT_hide_toggle"); | UI_but_func_set(but, node_toggle_button_cb, node, (void *)"NODE_OT_hide_toggle"); | ||||
| UI_block_emboss_set(node->block, UI_EMBOSS); | UI_block_emboss_set(node->block, UI_EMBOSS); | ||||
| UI_GetThemeColor4fv(TH_TEXT, color); | UI_GetThemeColor4fv(TH_TEXT, color); | ||||
| /* custom draw function for this button */ | /* custom draw function for this button */ | ||||
| UI_draw_icon_tri(rct->xmin + 10.0f, centy, 'h', color); | UI_draw_icon_tri(rct->xmin + 0.55f * U.widget_unit, centy, 'h', color); | ||||
| } | } | ||||
| /* disable lines */ | /* disable lines */ | ||||
| Context not available. | |||||