Chatterer.chatterer.main_gui C# (CSharp) Method

main_gui() private method

private main_gui ( int window_id ) : void
window_id int
return void
        private void main_gui(int window_id)
        {
            GUILayout.BeginVertical();

            GUILayout.BeginHorizontal();

            //Show "Chatter" menu button
            if (chatter_exists && vessel.GetCrewCount() > 0)
            {
                if (GUILayout.Button("Chatter"))
                {
                    menu = "chatter";
                }
            }

            //Show "Beeps" button
            if (beeps_exists || sstv_exists)
            {
                if (GUILayout.Button("Beeps"))
                {
                    menu = "beeps";
                }
            }

            //Show "AAE" button
            if (aae_backgrounds_exist || aae_soundscapes_exist || aae_breathing_exist || aae_airlock_exist)
            {
                if (GUILayout.Button("AAE"))
                {
                    menu = "AAE";
                }
            }

            //Show "Settings"
            if (GUILayout.Button("Settings")) menu = "settings";

            ////Mute button // Disabled, Mute cause NULL REFERENCE EXCEPTION replacing with "Close UI" for now

            //string muted = "Mute";
            //if (mute_all) muted = "Muted";

            //if (GUILayout.Button(muted, GUILayout.ExpandWidth(false))) mute_all = !mute_all;

            string closeUI = "Close";
            if (GUILayout.Button(closeUI, GUILayout.ExpandWidth(false)))
            {
                if (launcherButton == null && ToolbarButtonWrapper.ToolbarManagerPresent)
                {
                    hide_all_windows = !hide_all_windows;
                }
                else if (launcherButton != null)
                {
                    launcherButton.SetFalse();
                }
            }

            GUILayout.EndHorizontal();

            //Separator
            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
            GUILayout.Label(line_512x4, GUILayout.ExpandWidth(false), GUILayout.Width(275f), GUILayout.Height(10f));
            GUILayout.EndHorizontal();

            //Display GUI accordingly
            if (menu == "chatter") chatter_gui();
            else if (menu == "beeps") beeps_gui();
            else if (menu == "AAE") AAE_gui();
            else if (menu == "settings") settings_gui();

            //new version info (if any)
            if (recvd_latest_version && latest_version != "")
            {
                GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
                GUILayout.Label(latest_version, label_txt_left);
                GUILayout.EndHorizontal();
            }

            //Tooltips
            if (show_tooltips && GUI.tooltip != "") tooltips(main_window_pos);

            GUILayout.EndVertical();
            GUI.DragWindow();
        }
chatterer