private void LoadGuide()
        {
            reloadBase ();

              Window.title = "StateFunding Guide";

              string guideLabel = "StateFunding Version 0.1.0\n" +
                          "--------------------------\n\n" +
                          "[*] Overview\n" +
                          "StateFunding offers another path to funding your space program. When you chose your government " +
                          "you chose based on the strengths and weaknesses of that government. If you government cares more " +
                          "more about public opinion, using Kerbals will have a greater inpact on your funding but you will also " +
                          "be penalized for Kerbal death more. If your government cares more about their own confidence in your " +
                          "program, using autonomous rockets is a safer, cheaper, and more affective. Each year you will recieve " +
                          "a year review showing the achievements and failures and you will be paid by your total PO/SC scores.\n\n" +
                          "[*] Public Opinion (PO)\n" +
                          "To raise public opinion, have more Kerbals in active flights. The amount of science generated from " +
                          "science stations will also increase public opinion. Kerbal death will negatively impact public opinion\n\n" +
                          "[*] State Confidence (SC)\n" +
                          "To raise state confidence, have satelites with antenas in orbit of celestial bodies other than the Sun. " +
                          "You can have 10 satelites in orbit of each celestial body affect your SC score. Resource mining will " +
                          "also increase your SC score. Destroyed vessels will have a negative impact on the SC score.";

              ViewTextArea TextArea = new ViewTextArea (guideLabel);
              TextArea.setRelativeTo (Window);
              TextArea.setTop (40);
              TextArea.setLeft (130);
              TextArea.setWidth (Window.getWidth () - 140);
              TextArea.setHeight (Window.getHeight () - 40);
              TextArea.setColor (Color.white);

              this.addComponent (TextArea);
        }
        private void LoadGuide()
        {
            reloadBase();

            Window.title = "StateFunding Guide";

            string guideLabel = "StateFunding Version 0.1.0\n" +
                                "--------------------------\n\n" +
                                "[*] Overview\n" +
                                "StateFunding offers another path to funding your space program. When you chose your government " +
                                "you chose based on the strengths and weaknesses of that government. If you government cares more " +
                                "more about public opinion, using Kerbals will have a greater inpact on your funding but you will also " +
                                "be penalized for Kerbal death more. If your government cares more about their own confidence in your " +
                                "program, using autonomous rockets is a safer, cheaper, and more affective. Each year you will recieve " +
                                "a year review showing the achievements and failures and you will be paid by your total PO/SC scores.\n\n" +
                                "[*] Public Opinion (PO)\n" +
                                "To raise public opinion, have more Kerbals in active flights. The amount of science generated from " +
                                "science stations will also increase public opinion. Kerbal death will negatively impact public opinion\n\n" +
                                "[*] State Confidence (SC)\n" +
                                "To raise state confidence, have satelites with antenas in orbit of celestial bodies other than the Sun. " +
                                "You can have 10 satelites in orbit of each celestial body affect your SC score. Resource mining will " +
                                "also increase your SC score. Destroyed vessels will have a negative impact on the SC score.";

            ViewTextArea TextArea = new ViewTextArea(guideLabel);

            TextArea.setRelativeTo(Window);
            TextArea.setTop(40);
            TextArea.setLeft(130);
            TextArea.setWidth(Window.getWidth() - 140);
            TextArea.setHeight(Window.getHeight() - 40);
            TextArea.setColor(Color.white);

            this.addComponent(TextArea);
        }
        private void createWindow()
        {
            Window = new ViewWindow("Review");
            Window.setMargins(300, 100);

            Image = new ViewImage("assets/kerbalfunding.jpg");
            Image.setRelativeTo(Window);
            Image.setPercentWidth(100);

            Label = new ViewLabel("Could be worse.");
            Label.setRelativeTo(Image);
            Label.setPercentWidth(80);
            Label.setPercentHeight(20);
            Label.setPercentLeft(10);
            Label.setPercentTop(80);
            Label.setFontSize(18);
            Label.setColor(Color.white);

            Confirm = new ViewButton("Ok", OnConfirm);
            Confirm.setRelativeTo(Window);
            Confirm.setWidth(100);
            Confirm.setHeight(30);
            Confirm.setRight(5);
            Confirm.setBottom(5);

            if (!Rev.pastReview)
            {
                Rev.touch();
            }

            ReviewText = new ViewTextArea(Rev.GetSummaryText());
            ReviewText.setRelativeTo(Image);
            ReviewText.setPercentWidth(100);
            ReviewText.setTop(Image.getHeight() + 10);
            ReviewText.setHeight(Window.getHeight() - Image.getHeight() - Confirm.getHeight() - 20);
            ReviewText.setColor(Color.white);

            this.addComponent(Window);
            this.addComponent(Image);
            this.addComponent(Label);
            this.addComponent(Confirm);
            this.addComponent(ReviewText);

            List <ViewSummaryRow> summaryRows = Rev.GetText();

            for (int i = 0; i < summaryRows.Count; i++)
            {
                ViewSummaryRow row = summaryRows[i];
                row.setRelativeTo(ReviewText);
                row.setHeight(30);
                row.setPercentWidth(100);
                row.setTop(15 * i + 10);
                row.setLeft(300);
                row.setColor(Color.white);
                this.addComponent(row);
            }
        }
    public static void draw (View Vw, ViewWindow Window) {
      Window.title = "Current State";
      Instance GameInstance = StateFundingGlobal.fetch.GameInstance;
      Review Rev = GameInstance.ActiveReview;
      Rev.touch ();

      ViewTextArea TextArea = new ViewTextArea (GameInstance.ActiveReview.GetText());
      TextArea.setRelativeTo (Window);
      TextArea.setTop (40);
      TextArea.setLeft (130);
      TextArea.setWidth (Window.getWidth () - 140);
      TextArea.setHeight (Window.getHeight () - 40);
      TextArea.setColor (Color.white);

      Vw.addComponent (TextArea);
    }
        public static void draw(View Vw, ViewWindow Window)
        {
            Window.title = "Current State";
            Instance GameInstance = StateFundingGlobal.fetch.GameInstance;
            Review   Rev          = GameInstance.ActiveReview;

            Rev.touch();

            ViewTextArea TextArea = new ViewTextArea(GameInstance.ActiveReview.GetText());

            TextArea.setRelativeTo(Window);
            TextArea.setTop(40);
            TextArea.setLeft(130);
            TextArea.setWidth(Window.getWidth() - 140);
            TextArea.setHeight(Window.getHeight() - 40);
            TextArea.setColor(Color.white);

            Vw.addComponent(TextArea);
        }
        private void LoadCurrentState()
        {
            reloadBase ();

              Window.title = "Current State";
              Instance GameInstance = StateFundingGlobal.fetch.GameInstance;
              Review Rev = GameInstance.ActiveReview;
              Rev.touch ();

              ViewTextArea TextArea = new ViewTextArea (GameInstance.ActiveReview.GetText());
              TextArea.setRelativeTo (Window);
              TextArea.setTop (40);
              TextArea.setLeft (130);
              TextArea.setWidth (Window.getWidth () - 140);
              TextArea.setHeight (Window.getHeight () - 40);
              TextArea.setColor (Color.white);

              this.addComponent (TextArea);
        }
Exemple #7
0
    private void createWindow() {
      Window = new ViewWindow ("Review");
      Window.setMargins (300, 100);

      Image = new ViewImage ("assets/kerbalfunding.jpg");
      Image.setRelativeTo (Window);
      Image.setPercentWidth (100);

      Label = new ViewLabel ("Could be worse.");
      Label.setRelativeTo (Image);
      Label.setPercentWidth (80);
      Label.setPercentHeight (20);
      Label.setPercentLeft (10);
      Label.setPercentTop (80);
      Label.setFontSize (18);
      Label.setColor (Color.white);

      Confirm = new ViewButton ("Ok", OnConfirm);
      Confirm.setRelativeTo (Window);
      Confirm.setWidth (100);
      Confirm.setHeight (30);
      Confirm.setRight (5);
      Confirm.setBottom (5);

      if (!Rev.pastReview) {
        Rev.touch ();
      }

      ReviewText = new ViewTextArea (Rev.GetText());
      ReviewText.setRelativeTo (Image);
      ReviewText.setPercentWidth (100);
      ReviewText.setTop (Image.getHeight() + 10);
      ReviewText.setHeight (Window.getHeight () - Image.getHeight () - Confirm.getHeight () - 20);
      ReviewText.setColor (Color.white);

      this.addComponent (Window);
      this.addComponent (Image);
      this.addComponent (Label);
      this.addComponent (Confirm);
      this.addComponent (ReviewText);
    }
        private void LoadCurrentState()
        {
            reloadBase();

            Window.title = "Current State";
            Instance GameInstance = StateFundingGlobal.fetch.GameInstance;
            Review   Rev          = GameInstance.ActiveReview;

            Rev.touch();

            ViewTextArea TextArea = new ViewTextArea(GameInstance.ActiveReview.GetText());

            TextArea.setRelativeTo(Window);
            TextArea.setTop(40);
            TextArea.setLeft(130);
            TextArea.setWidth(Window.getWidth() - 140);
            TextArea.setHeight(Window.getHeight() - 40);
            TextArea.setColor(Color.white);

            this.addComponent(TextArea);
        }
        public static void draw(View Vw, ViewWindow Window)
        {
            Window.title = "Current State";
            InstanceData GameInstance = StateFundingGlobal.fetch.GameInstance;

            if (GameInstance == null)
            {
                Log.Error("StateFundingHubCurrentView.draw, Inst is null");
                return;
            }

            Review Rev = GameInstance.ActiveReview;

            Rev.touch();
            ViewTextArea TextArea = new ViewTextArea(GameInstance.ActiveReview.GetSummaryText());

            TextArea.setRelativeTo(Window);
            TextArea.setTop(40);
            TextArea.setLeft(130);
            TextArea.setWidth(Window.getWidth() - 140);
            TextArea.setHeight(Window.getHeight() - 40);
            TextArea.setColor(Color.white);

            Vw.addComponent(TextArea);

            List <ViewSummaryRow> summaryRows = Rev.GetText();

            for (int i = 0; i < summaryRows.Count; i++)
            {
                ViewSummaryRow row = summaryRows[i];
                row.setRelativeTo(TextArea);
                row.setHeight(30);
                row.setPercentWidth(100);
                row.setTop(200 + 20 * i + 10);
                row.setColor(Color.white);
                Vw.addComponent(row);
            }
        }