internal static void RevertMouseOverHighlight() { // Lets get the right color... if (PrevMouseOverParts != null) { // Only vessel Transfers have multiple parts highlighted so clear is the default. // now lets set the part colors. ClearPartsHighlight(PrevMouseOverParts);; EdgeHighight(PrevMouseOverParts, false); // now set selected part colors... if (!SMSettings.OnlySourceTarget && SMAddon.SmVessel.SelectedResourcesParts != null) { SetPartsHighlight(SMAddon.SmVessel.SelectedResourcesParts, SMSettings.Colors[SMSettings.ResourcePartColor], true); } if (SMAddon.SmVessel.SelectedPartsSource != null) { SetPartsHighlight(SMAddon.SmVessel.SelectedPartsSource, SMSettings.Colors[SMSettings.SourcePartColor], true); } if (SMAddon.SmVessel.SelectedPartsTarget != null) { if (SMConditions.IsClsEnabled() && SMConditions.GetTransferMode() == SMConditions.TransferMode.Crew) { SetPartsHighlight(SMAddon.SmVessel.SelectedPartsTarget, SMSettings.Colors[SMSettings.TargetPartCrewColor], true); } else { SetPartsHighlight(SMAddon.SmVessel.SelectedPartsTarget, SMSettings.Colors[SMSettings.TargetPartColor], true); } } if (!IsMouseOver) { PrevMouseOverParts = null; } } if (PrevMouseOverPart != null) { string strColor = GetPartHighlightColor(); Color partColor = SMSettings.Colors[strColor]; // Now lets set the part color if (partColor == Color.clear) { ClearPartHighlight(PrevMouseOverPart); EdgeHighight(PrevMouseOverPart, false); if (!IsMouseOver) { PrevMouseOverPart = null; } return; } SetPartHighlight(PrevMouseOverPart, partColor); EdgeHighight(PrevMouseOverPart, true, strColor); if (!IsMouseOver) { PrevMouseOverPart = null; } } }