thedmd / imgui-node-editor

Node Editor built using Dear ImGui
MIT License
3.64k stars 537 forks source link

Fixed Size Node (vertical) #295

Open soufianekhiat opened 4 months ago

soufianekhiat commented 4 months ago

Hello, How can we achieve a fixed size node independently of the inputs/outputs pins? With basic centered text and proper grid_snapping. image

Current workaround, at the level of the content_frame, do not fix the "vertical centered text" and proper snapping:

if ( uInCount > 0 )
    fNodeHeight -= padding_y;
if ( uOutCount > 0 )
    fNodeHeight -= padding_y;
ImGui::BeginHorizontal( "content_frame", ImVec2( fNodeWidth, fNodeHeight ) );