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);
            }
        }
        private void createWindow()
        {
            Window = new ViewWindow("State Funding");
            Window.setMargins(300, 100);

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


            Label = new ViewLabel(
                "We've been told it was in the best interest of our government to have a space program for some reason. " +
                "We're not rocket scientists, but you are. We will provide funding, make our wildest dreams come true. " +
                "Or at least just help us keep our jobs."
                );
            Label.setRelativeTo(Image);
            Label.setPercentWidth(80);
            Label.setPercentHeight(20);
            Label.setPercentLeft(10);
            Label.setPercentTop(80);
            Label.setFontSize(18);
            Label.setColor(Color.white);

            GovernmentDescription = new ViewLabel("");
            GovernmentDescription.setRelativeTo(Image);
            GovernmentDescription.setWidth(300);
            GovernmentDescription.setHeight(Window.getHeight() - Image.getHeight() - 20);
            GovernmentDescription.setTop(Image.getHeight() + 10);
            GovernmentDescription.setLeft(120);
            GovernmentDescription.setColor(Color.white);
            GovernmentDescription.setFontSize(14);

            GovernmentGameplayDescription = new ViewLabel("");
            GovernmentGameplayDescription.setRelativeTo(Image);
            GovernmentGameplayDescription.setWidth(300);
            GovernmentGameplayDescription.setHeight(Window.getHeight() - Image.getHeight() - 20);
            GovernmentGameplayDescription.setTop(Image.getHeight() + 10);
            GovernmentGameplayDescription.setLeft(440);
            GovernmentGameplayDescription.setColor(Color.white);
            GovernmentGameplayDescription.setFontSize(14);

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

            this.addComponent(Window);
            this.addComponent(Image);
            this.addComponent(Label);
            this.addComponent(GovernmentDescription);
            this.addComponent(GovernmentGameplayDescription);
            this.addComponent(Confirm);
        }
        private void createWindow()
        {
            Window = new ViewWindow ("State Funding");
              Window.setMargins (300, 100);

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

              Label = new ViewLabel (
            "We've been told it was in the best interest of our government to have a space program for some reason. " +
            "We're not rocket scientists, but you are. We will provide funding, make our wildest dreams come true. " +
            "Or at least just help us keep our jobs."
              );
              Label.setRelativeTo (Image);
              Label.setPercentWidth (80);
              Label.setPercentHeight (20);
              Label.setPercentLeft (10);
              Label.setPercentTop (80);
              Label.setFontSize (18);
              Label.setColor (Color.white);

              GovernmentDescription = new ViewLabel ("");
              GovernmentDescription.setRelativeTo (Image);
              GovernmentDescription.setWidth (300);
              GovernmentDescription.setHeight (Window.getHeight () - Image.getHeight () - 20);
              GovernmentDescription.setTop (Image.getHeight () + 10);
              GovernmentDescription.setLeft (120);
              GovernmentDescription.setColor (Color.white);
              GovernmentDescription.setFontSize (14);

              GovernmentGameplayDescription = new ViewLabel ("");
              GovernmentGameplayDescription.setRelativeTo (Image);
              GovernmentGameplayDescription.setWidth (300);
              GovernmentGameplayDescription.setHeight (Window.getHeight () - Image.getHeight () - 20);
              GovernmentGameplayDescription.setTop (Image.getHeight () + 10);
              GovernmentGameplayDescription.setLeft (440);
              GovernmentGameplayDescription.setColor (Color.white);
              GovernmentGameplayDescription.setFontSize (14);

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

              this.addComponent (Window);
              this.addComponent (Image);
              this.addComponent (Label);
              this.addComponent (GovernmentDescription);
              this.addComponent (GovernmentGameplayDescription);
              this.addComponent (Confirm);
        }
Exemple #4
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);
    }