| 3933 | } |
| 3934 | |
| 3935 | void Graph::addPinPopup() |
| 3936 | { |
| 3937 | // Add a floating popup to pin when hovered |
| 3938 | if (isPinHovered()) |
| 3939 | { |
| 3940 | ed::Suspend(); |
| 3941 | UiPinPtr pin = getPin(ed::GetHoveredPin()); |
| 3942 | std::string connected; |
| 3943 | std::string value; |
| 3944 | if (pin->getConnected()) |
| 3945 | { |
| 3946 | mx::StringVec connectedNames; |
| 3947 | for (UiPinPtr connectedPin : pin->getConnections()) |
| 3948 | { |
| 3949 | connectedNames.push_back(connectedPin->getName()); |
| 3950 | } |
| 3951 | connected = "\nConnected to " + mx::joinStrings(connectedNames, ", "); |
| 3952 | } |
| 3953 | else if (pin->getInput()) |
| 3954 | { |
| 3955 | value = "\nValue: " + pin->getInput()->getValueString(); |
| 3956 | } |
| 3957 | const std::string message("Name: " + pin->getName() + "\nType: " + pin->getType() + value + connected); |
| 3958 | ImGui::SetTooltip("%s", message.c_str()); |
| 3959 | ed::Resume(); |
| 3960 | } |
| 3961 | } |
| 3962 | |
| 3963 | void Graph::readOnlyPopup() |
| 3964 | { |
nothing calls this directly
no test coverage detected