static Color IndicatorColorForMode(IndicatorAppearanceMode mode) { var color = Styles.color; color.a = Styles.appearanceModeAlphaValues[(int)mode]; return(color); }
public static void DrawFlowIndicatorForFlowEvent(RawFrameDataView.FlowEvent flowEvent, Rect sampleRect, IndicatorAppearanceMode indicatorAppearanceMode) { float indicatorAngularRotationDegrees; var flowIndicatorRect = IndicatorRectForFlowEventType(flowEvent.FlowEventType, sampleRect, out indicatorAngularRotationDegrees); var color = IndicatorColorForMode(indicatorAppearanceMode); var matrix = GUI.matrix; GUIUtility.RotateAroundPivot(indicatorAngularRotationDegrees, flowIndicatorRect.center); GUI.DrawTexture(flowIndicatorRect, Styles.texture, ScaleMode.StretchToFill, true, 0f, color, 0f, 0f); GUI.matrix = matrix; }