Esempio n. 1
0
    private void createWindow() {
      Toast = new ViewWindow ("");
      Toast.setWidth (300);
      Toast.setHeight (100);
      Toast.setBottom (10);
      Toast.setRight (10);

      ToastLabel = new ViewLabel ("New Review Report Avaialble");
      ToastLabel.setRelativeTo (Toast);
      ToastLabel.setWidth (290);
      ToastLabel.setHeight (90);
      ToastLabel.setLeft (10);
      ToastLabel.setTop (10);
      ToastLabel.setColor (Color.white);

      OpenReview = new ViewButton ("View Review", OnOpenReview);
      OpenReview.setRelativeTo (Toast);
      OpenReview.setWidth (90);
      OpenReview.setHeight (40);
      OpenReview.setRight (10);
      OpenReview.setTop (10);

      Dismiss = new ViewButton ("Dismiss", OnDismiss);
      Dismiss.setRelativeTo (Toast);
      Dismiss.setWidth (90);
      Dismiss.setHeight (40);
      Dismiss.setRight (10);
      Dismiss.setBottom (10);

      this.addComponent (Toast);
      this.addComponent (ToastLabel);
      this.addComponent (OpenReview);
      this.addComponent (Dismiss);
    }
        private void createWindow()
        {
            Toast = new ViewWindow("");
            Toast.setWidth(300);
            Toast.setHeight(100);
            Toast.setBottom(10);
            Toast.setRight(10);

            ToastLabel = new ViewLabel("New Review Report Avaialble");
            ToastLabel.setRelativeTo(Toast);
            ToastLabel.setWidth(290);
            ToastLabel.setHeight(90);
            ToastLabel.setLeft(10);
            ToastLabel.setTop(10);
            ToastLabel.setColor(Color.white);

            OpenReview = new ViewButton("View Review", OnOpenReview);
            OpenReview.setRelativeTo(Toast);
            OpenReview.setWidth(90);
            OpenReview.setHeight(40);
            OpenReview.setRight(10);
            OpenReview.setTop(10);

            Dismiss = new ViewButton("Dismiss", OnDismiss);
            Dismiss.setRelativeTo(Toast);
            Dismiss.setWidth(90);
            Dismiss.setHeight(40);
            Dismiss.setRight(10);
            Dismiss.setBottom(10);

            this.addComponent(Toast);
            this.addComponent(ToastLabel);
            this.addComponent(OpenReview);
            this.addComponent(Dismiss);
        }
        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);
    }
Esempio n. 6
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);
    }