@@ -388,19 +388,11 @@ bool ImGuiEx::NodeCanvas::BeginNode( int nId, const char* _id, std::string name,
388388 }
389389
390390 // Draw HeaderBar BG
391- if (nId == activeNode){
392- nodeDrawList->AddRectFilled (
393- curNodeData.outerContentBox .Min ,
394- curNodeData.outerContentBox .Min +ImVec2 (curNodeData.outerContentBox .GetSize ().x , IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor),
395- IM_COL32 (90 ,90 ,90 ,200 )
396- );
397- }else {
398- nodeDrawList->AddRectFilled (
399- curNodeData.outerContentBox .Min ,
400- curNodeData.outerContentBox .Min +ImVec2 (curNodeData.outerContentBox .GetSize ().x , IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor),
401- ImGui::GetColorU32 (ImGuiCol_Header)
402- );
403- }
391+ nodeDrawList->AddRectFilled (
392+ curNodeData.outerContentBox .Min ,
393+ curNodeData.outerContentBox .Min +ImVec2 (curNodeData.outerContentBox .GetSize ().x , IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor),
394+ ImGui::GetColorU32 (ImGuiCol_Header)
395+ );
404396
405397 // Draw footer
406398 nodeDrawList->AddRectFilled (
@@ -414,7 +406,11 @@ bool ImGuiEx::NodeCanvas::BeginNode( int nId, const char* _id, std::string name,
414406
415407 // Header info
416408 ImGui::SetCursorScreenPos ( curNodeData.outerContentBox .Min +ImVec2 (5 , ((IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor)-ImGui::CalcTextSize (" " ).y )*.5f ) );// canvasView.translation+pos+ImVec2(5,4));
417- ImGui::PushStyleColor (ImGuiCol_Text, IM_COL32 (255 ,255 ,255 ,255 ));
409+ if (nId == activeNode){
410+ ImGui::PushStyleColor (ImGuiCol_Text, IM_COL32 (255 ,255 ,255 ,255 ));
411+ }else {
412+ ImGui::PushStyleColor (ImGuiCol_Text, IM_COL32 (0 ,0 ,0 ,255 ));
413+ }
418414 ImGui::Text (" %s" , name.c_str ()); // title
419415 ImGui::PopStyleColor ();
420416
0 commit comments