Esempio n. 1
0
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(680));
            GUILayout.Label("Kerbal Records:  " + WindowRoster.SelectedKerbal.Name + " - (" + WindowRoster.SelectedKerbal.Trait + ")", RMStyle.LabelStyleBold, GUILayout.Width(500));

            if (!string.IsNullOrEmpty(RMAddon.SaveMessage))
            {
                GUILayout.Label(RMAddon.SaveMessage, RMStyle.ErrorLabelRedStyle);
            }

            // Begin Tab contents.

            //if (GUILayout.Button("Enter Notes", GUILayout.Width(100)))
            //{
            // Let's do a modal window here.  child of parent, moves with parent window.
            // DisplayNotesWindow()
            GUILayout.BeginVertical();
            GUILayout.Label("Notes: ", RMStyle.LabelStyleBold, GUILayout.Width(500));
            var    base64EncodedBytes = System.Convert.FromBase64String(WindowRoster.SelectedKerbal.Notes);
            string inputString        = System.Text.Encoding.UTF8.GetString(base64EncodedBytes);

            inputString = GUILayout.TextArea(inputString, 2046, RMStyle.RichTextStyle, GUILayout.Width(660), GUILayout.Height(150));
            var richTextBytes = System.Text.Encoding.UTF8.GetBytes(inputString);

            WindowRoster.SelectedKerbal.Notes = System.Convert.ToBase64String(richTextBytes);
            GUILayout.EndVertical();
            //}

            //End Tab contents
            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
Esempio n. 2
0
 private static void DisplayAnyWarnings()
 {
     if (Api.InstalledMods.IsDfInstalled && WindowRoster.SelectedKerbal.Type == ProtoCrewMember.KerbalType.Unowned &&
         WindowRoster.SelectedKerbal.Status == ProtoCrewMember.RosterStatus.Dead &&
         (!WindowRoster.IsKerbalInDeepFreezePart(WindowRoster.SelectedKerbal)))
     {
         GUILayout.Label("");
         GUILayout.Label(
             Localizer.Format("#autoLOC_RM_1107"), // #autoLOC_RM_1107 = DeepFreeze is installed,and the current settings will make the selected Kerbal appear Frozen.\nEnsure you have the kerbal assigned to a vessel and inside a deepFreze part.  \r\nIf you save, this kerbal will 'disappear' in game.
             RMStyle.LabelStyleYellow);
         GUILayout.Label("");
     }
     else if (WindowRoster.SelectedKerbal.Type == ProtoCrewMember.KerbalType.Unowned)
     {
         GUILayout.Label("");
         GUILayout.Label(
             Localizer.Format("#autoLOC_RM_1108"), // #autoLOC_RM_1108 = The Selected Kerbal is set to Unowned.  This removes them from the active kerbal list. \nIf you save, this kerbal will 'disappear' in game.
             RMStyle.LabelStyleYellow);
         GUILayout.Label("");
     }
     else if (WindowRoster.SelectedKerbal.Type == ProtoCrewMember.KerbalType.Tourist &&
              WindowRoster.SelectedKerbal.Trait != "Tourist")
     {
         GUILayout.Label("");
         GUILayout.Label(
             Localizer.Format("#autoLOC_RM_1109"), // #autoLOC_RM_1109 = The selected Kerbal is set to Tourist.\nIf you save, the Profession will be changed to Tourist.
             RMStyle.LabelStyleYellow);
         GUILayout.Label("");
     }
 }
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(680));
            GUILayout.Label("Kerbal Training:  " + WindowRoster.SelectedKerbal.Name + " - (" + WindowRoster.SelectedKerbal.Trait + ")", RMStyle.LabelStyleBold, GUILayout.Width(500));

            DisplayTabButtons();
            DisplaySelectedTab();

            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
Esempio n. 4
0
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(WindowRoster.ViewerWidth));
            GUILayout.Label($"{Localizer.Format("#autoLOC_RM_1110")}  {WindowRoster.SelectedKerbal.Name} - ({WindowRoster.SelectedKerbal.Trait})", RMStyle.LabelStyleBold, GUILayout.Width(500));

            DisplayTabButtons();
            DisplaySelectedTab();

            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(230), GUILayout.Width(WindowRoster.ViewerWidth));
            GUILayout.Label(WindowRoster.SelectedKerbal.IsNew ? "Create a Kerbal" : "Kerbal Attributes", RMStyle.LabelStyleBold);

            GUILayout.BeginHorizontal();
            if (RMSettings.EnableKerbalRename)
            {
                GUILayout.Label("Name:", GUILayout.Width(80));
                WindowRoster.SelectedKerbal.Name = GUILayout.TextField(WindowRoster.SelectedKerbal.Name, GUILayout.Width(230));
                GUILayout.Label(" - (" + WindowRoster.SelectedKerbal.Kerbal.trait + ")");
                if (RMLifeSpan.Instance.RMGameSettings.EnableAging)
                {
                    GUILayout.Label("Age: " + WindowRoster.SelectedKerbal.Age.ToString("##0"));
                    GUILayout.Label("Next Bday: " + KSPUtil.PrintDate((int)WindowRoster.SelectedKerbal.TimeNextBirthday, false));
                }
            }
            else
            {
                GUILayout.Label(WindowRoster.SelectedKerbal.Name + " - (" + WindowRoster.SelectedKerbal.Trait + ")", RMStyle.LabelStyleBold, GUILayout.Width(300));
                if (RMLifeSpan.Instance.RMGameSettings.EnableAging)
                {
                    GUILayout.Label("Age: " + WindowRoster.SelectedKerbal.Age.ToString("##0"));
                    GUILayout.Label("Next Bday: " + KSPUtil.PrintDate((int)WindowRoster.SelectedKerbal.TimeNextBirthday, false));
                }
            }
            GUILayout.EndHorizontal();

            if (!string.IsNullOrEmpty(RMAddon.SaveMessage))
            {
                GUILayout.Label(RMAddon.SaveMessage, RMStyle.ErrorLabelRedStyle);
            }
            if (RMSettings.EnableKerbalRename)
            {
                WindowRoster.DisplaySelectProfession();
            }
            WindowRoster.DisplaySelectGender();

            WindowRoster.DisplaySelectSuit(ref WindowRoster.SelectedKerbal.Suit);

            GUILayout.Label("Courage");
            WindowRoster.SelectedKerbal.Courage = GUILayout.HorizontalSlider(WindowRoster.SelectedKerbal.Courage, 0, 1, GUILayout.Width(300));

            GUILayout.Label("Stupidity");
            WindowRoster.SelectedKerbal.Stupidity = GUILayout.HorizontalSlider(WindowRoster.SelectedKerbal.Stupidity, 0, 1, GUILayout.Width(300));

            WindowRoster.SelectedKerbal.Badass = GUILayout.Toggle(WindowRoster.SelectedKerbal.Badass, "Badass");

            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
Esempio n. 6
0
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(780));
            GUILayout.Label("Kerbal Scheduling", RMStyle.LabelStyleBold);
            GUILayout.Label(WindowRoster.SelectedKerbal.Name + " - (" + WindowRoster.SelectedKerbal.Trait + ")", RMStyle.LabelStyleBold, GUILayout.MaxWidth(300));

            if (!string.IsNullOrEmpty(RMAddon.SaveMessage))
            {
                GUILayout.Label(RMAddon.SaveMessage, RMStyle.ErrorLabelRedStyle);
            }
            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(680));
            GUILayout.Label("Kerbal Medical:  " + WindowRoster.SelectedKerbal.Name + " - (" + WindowRoster.SelectedKerbal.Trait + ")", RMStyle.LabelStyleBold, GUILayout.Width(500));
            GUILayout.Label("");
            WindowRoster.DisplaySelectType();
            WindowRoster.DisplaySelectState();

            DisplayAnyWarnings();

            WindowRoster.SelectedKerbal.Type   = WindowRoster._kerbalType;
            WindowRoster.SelectedKerbal.Status = WindowRoster._rosterStatus;


            if (!string.IsNullOrEmpty(RMAddon.SaveMessage))
            {
                GUILayout.Label(RMAddon.SaveMessage, RMStyle.ErrorLabelRedStyle);
            }
            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
Esempio n. 8
0
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(780));
            // #autoLOC_RM_1106 = Kerbal Medical:
            GUILayout.Label($"{Localizer.Format("#autoLOC_RM_1106")}  {WindowRoster.SelectedKerbal.Name} - ({WindowRoster.SelectedKerbal.Trait})", RMStyle.LabelStyleBold, GUILayout.Width(500));
            GUILayout.Label("");
            WindowRoster.DisplaySelectType();
            WindowRoster.DisplaySelectState();

            DisplayAnyWarnings();

            WindowRoster.SelectedKerbal.Type   = WindowRoster.Kerbal_Type;
            WindowRoster.SelectedKerbal.Status = WindowRoster.Roster_Status;


            if (!string.IsNullOrEmpty(RMAddon.SaveMessage))
            {
                GUILayout.Label(RMAddon.SaveMessage, RMStyle.ErrorLabelRedStyle);
            }
            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }
Esempio n. 9
0
        internal static void Display()
        {
            _scrollDetailsPosition = GUILayout.BeginScrollView(_scrollDetailsPosition, RMStyle.ScrollStyle, GUILayout.Height(210), GUILayout.Width(780));
            GUILayout.Label("Kerbal Flight History:  " + WindowRoster.SelectedKerbal.Name + " - (" + WindowRoster.SelectedKerbal.Trait + ")", RMStyle.LabelStyleBold, GUILayout.Width(500));

            if (!string.IsNullOrEmpty(RMAddon.SaveMessage))
            {
                GUILayout.Label(RMAddon.SaveMessage, RMStyle.ErrorLabelRedStyle);
            }

            // Begin Tab contents.
            FlightLog thisLog = WindowRoster.SelectedKerbal.Kerbal.flightLog;

            foreach (FlightLog.Entry thisEntry in thisLog.Entries)
            {
                GUILayout.Label(thisEntry.flight + " - " + thisEntry.target + " - " + thisEntry.type);
            }

            //End Tab contents
            GUILayout.EndScrollView();

            WindowRoster.DisplayActionButtonsEdit();
        }