Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_relationships.cc
| Show First 20 Lines • Show All 809 Lines • ▼ Show 20 Lines | static void draw_draglink_tooltip(const bContext * /*C*/, ARegion * /*region*/, void *arg) | ||||
| bNodeLinkDrag *nldrag = static_cast<bNodeLinkDrag *>(arg); | bNodeLinkDrag *nldrag = static_cast<bNodeLinkDrag *>(arg); | ||||
| const uchar text_col[4] = {255, 255, 255, 255}; | const uchar text_col[4] = {255, 255, 255, 255}; | ||||
| const int padding = 4 * UI_DPI_FAC; | const int padding = 4 * UI_DPI_FAC; | ||||
| const float x = nldrag->in_out == SOCK_IN ? nldrag->cursor[0] - 3.3f * padding : | const float x = nldrag->in_out == SOCK_IN ? nldrag->cursor[0] - 3.3f * padding : | ||||
| nldrag->cursor[0]; | nldrag->cursor[0]; | ||||
| const float y = nldrag->cursor[1] - 2.0f * UI_DPI_FAC; | const float y = nldrag->cursor[1] - 2.0f * UI_DPI_FAC; | ||||
| UI_icon_draw_ex(x, y, ICON_ADD, U.inv_dpi_fac, 1.0f, 0.0f, text_col, false); | UI_icon_draw_ex( | ||||
| x, y, ICON_ADD, U.inv_dpi_fac, 1.0f, 0.0f, text_col, false, UI_NO_ICON_OVERLAY_TEXT); | |||||
| } | } | ||||
| static void draw_draglink_tooltip_activate(const ARegion ®ion, bNodeLinkDrag &nldrag) | static void draw_draglink_tooltip_activate(const ARegion ®ion, bNodeLinkDrag &nldrag) | ||||
| { | { | ||||
| if (nldrag.draw_handle == nullptr) { | if (nldrag.draw_handle == nullptr) { | ||||
| nldrag.draw_handle = ED_region_draw_cb_activate( | nldrag.draw_handle = ED_region_draw_cb_activate( | ||||
| region.type, draw_draglink_tooltip, &nldrag, REGION_DRAW_POST_PIXEL); | region.type, draw_draglink_tooltip, &nldrag, REGION_DRAW_POST_PIXEL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,639 Lines • Show Last 20 Lines | |||||