Ejemplo n.º 1
0
                public bool Draw(bool selected)
                {
                    GUILayout.BeginHorizontal();
                    var tts     = trajectory.TimeToStart;
                    var tts_str = Utils.formatTimeDelta(tts);
                    var label   = string.Format("ETA:  {0}\n" +
                                                "Node: {1}",
                                                Colors.Good.Tag(Utils.formatTimeDelta(tts + transfer)),
                                                tts > opt.ren.ManeuverOffset ?
                                                Colors.Neutral.Tag(tts_str) : Colors.Danger.Tag(tts_str));
                    var sel = GUILayout.Button(new GUIContent(label, "Press to select this transfer"),
                                               Styles.rich_label, GUILayout.ExpandWidth(false));

                    GUILayout.FlexibleSpace();
                    GUILayout.Label("dV: " + Colors.Active.Tag("<b>{0:F1}</b> m/s", trajectory.GetTotalDeltaV()),
                                    Styles.rich_label, GUILayout.ExpandWidth(false));
                    GUILayout.FlexibleSpace();
                    if (selected)
                    {
                        GUILayout.Label(Colors.Good.Tag("<b>●</b>"),
                                        Styles.rich_label, GUILayout.ExpandWidth(false));
                    }
                    GUILayout.EndHorizontal();
                    return(sel);
                }
                public bool Draw(bool selected)
                {
                    GUILayout.BeginHorizontal();
                    var tts   = trajectory.TimeToStart;
                    var label = string.Format("ETA:  <color=lime>{0}</color>\n" +
                                              "Node: <color={1}>{2}</color>",
                                              Utils.formatTimeDelta(tts + transfer),
                                              tts > opt.ren.ManeuverOffset ? "white" : "red",
                                              Utils.formatTimeDelta(tts));
                    var sel = GUILayout.Button(new GUIContent(label, "Press to select this transfer"),
                                               Styles.rich_label, GUILayout.ExpandWidth(false));

                    GUILayout.FlexibleSpace();
                    GUILayout.Label(string.Format("dV: <color=yellow><b>{0:F1}</b> m/s</color>", trajectory.GetTotalDeltaV()),
                                    Styles.rich_label, GUILayout.ExpandWidth(false));
                    GUILayout.FlexibleSpace();
                    if (selected)
                    {
                        GUILayout.Label("<color=lime><b>●</b></color>",
                                        Styles.rich_label, GUILayout.ExpandWidth(false));
                    }
                    GUILayout.EndHorizontal();
                    return(sel);
                }