public void DrawTransitionChooser(AttachItem attach, FD.FlowWindow fromWindow, FD.FlowWindow toWindow, bool doubleSided) { if (this.drawWindowContent == false) return; if (toWindow.IsEnabled() == false) return; if (toWindow.IsContainer() == true) return; var factor = 0.5f; var transitionsContainer = fromWindow; var namePrefix = string.Empty; if (fromWindow.IsSmall() == true && fromWindow.IsABTest() == true) { // is ABTest //Debug.Log(fromWindow.id + " => " + toWindow.id + " :: " + attach.index + " :: " + doubleSided); transitionsContainer = FlowSystem.GetWindow(fromWindow.abTests.sourceWindowId); if (transitionsContainer == null) return; namePrefix = string.Format("Variant{0}", attach.index.ToString()); factor = 0.2f; } else { if (toWindow.IsSmall() == true) { if (toWindow.IsFunction() == false) return; } } if (FlowSystem.GetData().modeLayer == ModeLayer.Audio) { if (FlowSystem.GetData().HasView(FlowView.AudioTransitions) == false) return; } else { if (FlowSystem.GetData().HasView(FlowView.VideoTransitions) == false) return; } const float size = 32f; const float offset = size * 0.5f + 5f; Vector2 centerOffset = Flow.OnDrawNodeCurveOffset(this, attach, fromWindow, toWindow, doubleSided); if (doubleSided == true) { var q = Quaternion.LookRotation(toWindow.rect.center - fromWindow.rect.center, Vector3.back); var attachRevert = FlowSystem.GetAttachItem(toWindow.id, fromWindow.id); this.DrawTransitionChooser(attachRevert, toWindow, toWindow, fromWindow, centerOffset, q * Vector2.left * offset, size, factor, namePrefix); this.DrawTransitionChooser(attach, fromWindow, fromWindow, toWindow, centerOffset, q * Vector2.right * offset, size, factor, namePrefix); } else { this.DrawTransitionChooser(attach, transitionsContainer, fromWindow, toWindow, centerOffset, Vector2.zero, size, factor, namePrefix); } }
public void DrawTransitionChooser(FD.FlowWindow.AttachItem attach, FD.FlowWindow fromWindow, FD.FlowWindow toWindow, bool doubleSided) { if (toWindow.IsEnabled() == false) return; if (toWindow.IsContainer() == true) return; if (toWindow.IsSmall() == true) { if (toWindow.IsFunction() == false) return; } const float size = 32f; const float offset = size * 0.5f + 5f; if (doubleSided == true) { var q = Quaternion.LookRotation(toWindow.rect.center - fromWindow.rect.center, Vector3.back); var attachRevert = FlowSystem.GetAttachItem(toWindow.id, fromWindow.id); this.DrawTransitionChooser(attachRevert, toWindow, fromWindow, q * Vector2.left * offset, size); this.DrawTransitionChooser(attach, fromWindow, toWindow, q * Vector2.right * offset, size); } else { this.DrawTransitionChooser(attach, fromWindow, toWindow, Vector2.zero, size); } }