private void reloadBase()
        {
            this.removeAll();

            SideMenu = new ArrayList();

            Window = new ViewWindow("");
            Window.setWidth(800);
            Window.setHeight(Screen.height - 200);
            Window.setLeft((Screen.width - 800) / 2);
            Window.setTop(100);

            this.addComponent(Window);
            SideMenu.Add(new ViewButton("Current State", LoadCurrentState));
            foreach (Factor factor in GameInstance.ActiveReview.factors)
            {
                if (factor.View != null)
                {
                    SideMenu.Add(new ViewButton(factor.View.getSideMenuText(), LoadView(factor, GameInstance.ActiveReview)));
                }
            }
            SideMenu.Add(new ViewButton("Past Reviews", LoadPastReviews));

            for (var i = 0; i < SideMenu.ToArray().Length; i++)
            {
                ViewButton Btn = (ViewButton)SideMenu.ToArray()[i];
                Btn.setRelativeTo(Window);
                Btn.setLeft(10);
                Btn.setTop(10 + i * 45);
                Btn.setWidth(120);
                Btn.setHeight(35);
                this.addComponent(Btn);
            }
        }
Esempio n. 2
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);
        }
Esempio n. 4
0
        private void reloadBase()
        {
            this.removeAll();

            SideMenu = new ArrayList();

            Window = new ViewWindow("");
            Window.setMargins(300, 100);

            this.addComponent(Window);

            SideMenu.Add(new ViewButton("Current State", LoadCurrentState));
            SideMenu.Add(new ViewButton("Sat Coverage", LoadSatelliteCoverage));
            SideMenu.Add(new ViewButton("Science Stations", LoadScienceStations));
            SideMenu.Add(new ViewButton("Mining Rigs", LoadMiningRigs));
            SideMenu.Add(new ViewButton("Kerbals", LoadKerbals));
            SideMenu.Add(new ViewButton("Past Reviews", LoadPastReviews));

            for (var i = 0; i < SideMenu.ToArray().Length; i++)
            {
                ViewButton Btn = (ViewButton)SideMenu.ToArray() [i];
                Btn.setRelativeTo(Window);
                Btn.setLeft(10);
                Btn.setTop(10 + i * 45);
                Btn.setWidth(120);
                Btn.setHeight(35);
                this.addComponent(Btn);
            }
        }
        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. 8
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);
    }