KLF.KLFManager.screenshotWindow C# (CSharp) Method

screenshotWindow() private method

private screenshotWindow ( int windowID ) : void
windowID int
return void
        private void screenshotWindow(int windowID)
        {
            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical();

            GUILayoutOption[] screenshot_box_options = new GUILayoutOption[4];
            screenshot_box_options[0] = GUILayout.MinWidth(KLFScreenshotDisplay.screenshotSettings.maxWidth);
            screenshot_box_options[1] = GUILayout.MaxWidth(KLFScreenshotDisplay.screenshotSettings.maxWidth);
            screenshot_box_options[2] = GUILayout.MinHeight(KLFScreenshotDisplay.screenshotSettings.maxHeight);
            screenshot_box_options[3] = GUILayout.MaxHeight(KLFScreenshotDisplay.screenshotSettings.maxHeight);

            //Init label styles
            screenshotDescriptionStyle = new GUIStyle(GUI.skin.label);
            screenshotDescriptionStyle.normal.textColor = Color.white;
            screenshotDescriptionStyle.alignment = TextAnchor.MiddleCenter;
            screenshotDescriptionStyle.stretchWidth = true;
            screenshotDescriptionStyle.fontStyle = FontStyle.Normal;
            screenshotDescriptionStyle.margin.bottom = 0;
            screenshotDescriptionStyle.margin.top = 0;
            screenshotDescriptionStyle.padding.bottom = 0;
            screenshotDescriptionStyle.padding.top = 4;

            //Screenshot
            if (KLFScreenshotDisplay.texture != null)
            {
                GUILayout.Box(KLFScreenshotDisplay.texture, screenshot_box_options);

                GUILayout.BeginHorizontal();

                //Nav buttons
                if (KLFScreenshotDisplay.screenshot != null && KLFScreenshotDisplay.screenshot.player == KLFScreenshotDisplay.watchPlayerName) {

                    bool pressed = false;

                    if (KLFScreenshotDisplay.screenshot.index > 0 && GUILayout.Button("Prev", GUILayout.ExpandWidth(false)))
                    {
                        KLFScreenshotDisplay.watchPlayerIndex = KLFScreenshotDisplay.screenshot.index - 1;
                        pressed = true;
                    }

                    if (GUILayout.Button("Next", GUILayout.ExpandWidth(false)))
                    {
                        KLFScreenshotDisplay.watchPlayerIndex = KLFScreenshotDisplay.screenshot.index + 1;
                        pressed = true;
                    }

                    if (pressed)
                        writeScreenshotWatchUpdate();

                }

                //Description
                StringBuilder sb = new StringBuilder();
                sb.Append(KLFScreenshotDisplay.screenshot.player);
                if (KLFScreenshotDisplay.screenshot.description.Length > 0)
                {
                    sb.Append(" - ");
                    sb.Append(KLFScreenshotDisplay.screenshot.description);
                }
                GUILayout.Label(sb.ToString(), screenshotDescriptionStyle);

                GUILayout.EndHorizontal();
            }
            else
                GUILayout.Box(GUIContent.none, screenshot_box_options);

            GUILayoutOption[] user_list_options = new GUILayoutOption[1];
            user_list_options[0] = GUILayout.MinWidth(150);

            GUILayout.EndVertical();

            //User list
            KLFScreenshotDisplay.scrollPos = GUILayout.BeginScrollView(KLFScreenshotDisplay.scrollPos, user_list_options);
            GUILayout.BeginVertical();

            foreach (KeyValuePair<String, VesselStatusInfo> pair in playerStatus)
            {
                screenshotWatchButton(pair.Key);
            }

            GUILayout.EndVertical();
            GUILayout.EndScrollView();

            GUILayout.EndHorizontal();

            GUI.DragWindow();
        }