public RectConnector Draw(Rect inRect)
 {
     return(new RectStacker(inRect)
            .Then(u =>
     {
         return new RectSpanner(u)
         .Then(v => StatWidgets.DrawSectionHeader(v, "Operator"))
         .ThenGap(50f)
         .Then(v => StatWidgets.DrawSectionHeader(v, "Tracker"))
         .ThenGap(50f)
         .Then(v => StatWidgets.DrawSectionHeader(v, "Metric"));
     })
            .ThenForEach(rows, (u, row, ind) => row.Draw(u)));
 }
Ejemplo n.º 2
0
 public RectConnector Draw(Rect inRect)
 {
     return(new RectSpanner(inRect)
            .Then(
                u => StatWidgets.DrawTextButtonBottomLabel(u, "Operator", optionsManager.GetAvailableOperatorTypes(), v => v.Name, Model.ChosenOperator, OperatorChosen)
                )
            .ThenGap(50f)
            .IfThen(
                () => Model.ChosenOperator != null && Model.ChosenOperatorIsBinary,
                u => StatWidgets.DrawTextButtonBottomLabel(u, "Tracker", optionsManager.GetAvailableTrackerNames(), v => v, Model.ChosenTrackerName, TrackerNameChosen)
                )
            .ThenGap(50f)
            .IfThen(
                () => !string.IsNullOrEmpty(Model.ChosenTrackerName),
                u => StatWidgets.DrawTextButtonBottomLabel(u, "Metric", optionsManager.GetAvailableSourceMetrics(Model.ChosenTrackerName), v => v.Name, Model.ChosenSourceMetric, SourceMetricChosen)
                ));
 }
Ejemplo n.º 3
0
 private RectConnector DrawTextButton(Rect inRect, string label, List <Type> typeList, Type selectedType, Action <Type> typeCb)
 {
     return(StatWidgets.DrawTextButtonSideLabel(inRect, label, typeList, u => u.Name, selectedType, typeCb));
 }
Ejemplo n.º 4
0
 private RectConnector DrawTextButton(Rect inRect, string label, List <SourceMetric> metricList, SourceMetric selectedMetric, Action <SourceMetric> metricCb)
 {
     return(StatWidgets.DrawTextButtonSideLabel(inRect, label, metricList, u => u.Name, selectedMetric, metricCb));
 }