Ejemplo n.º 1
0
        public void Draw(SpriteBatch spriteBatch, GraphicsDeviceManager graphics)
        {
            Background.Draw(spriteBatch, graphics);

            // Banner
            string WeekString = "Week of " + ThisMonday.ToString("M/d");

            DrawingUtils.DrawTextBanner(spriteBatch, graphics, Arial, WeekString, Color.Red, Color.Black);
            Notebook.Draw(spriteBatch, graphics);

            // create calendar
            Calendar.Draw(spriteBatch, graphics);

            // Confirm activity to move on to the next day
            DrawingUtils.DrawFilledRectangle(spriteBatch, graphics, ActivityRect, Color.Beige);
            DrawingUtils.DrawOpenRectangle(spriteBatch, graphics, ActivityRect, Color.DarkSlateBlue, 3);

            // Formulate Activity - "Today I will [blank] with [blank]"
            spriteBatch.DrawString(JustBreathe, "Today I will ...", new Vector2(ActivityRect.X, ActivityRect.Y), Color.Navy);
            ActivitiesList.Draw(spriteBatch, graphics);
            spriteBatch.DrawString(JustBreathe, "with", new Vector2(ActivityRect.X + 250, ActivityRect.Y + 100), Color.Navy);
            PeopleList.Draw(spriteBatch, graphics);

            // Add tables for current Main Character stats (need to find a different way to update them live
            string[] Aspects = new string[6] {
                "charm", "courage", "empathy", "intelligence", "strength", "money"
            };
            StatsTable = new InfoTable(MainCharacter.Stats, Aspects, new Rectangle(110, 400, 200, 252), JustBreathe);
            string[] People = Case.Suspects.Concat(Case.TestimonyOnly).ToArray();
            RelTable = new InfoTable(MainCharacter.Relationships, People, new Rectangle(350, 400, 200, 252), JustBreathe);
            StatsTable.Draw(spriteBatch, graphics);
            RelTable.Draw(spriteBatch, graphics);

            if (GState == CalendarState.ConfirmActivity)
            {
                ConfirmButton.Draw(spriteBatch, graphics);
            }
        }
Ejemplo n.º 2
0
        private void DrawRightPage(SpriteBatch spriteBatch, GraphicsDeviceManager graphics)
        {
            Vector2 TextPosRight = new Vector2(OpenNotebookRect.X + 0.55f * OpenNotebookRect.Width, OpenNotebookRect.Y);

            switch (GState)
            {
            case NotebookState.Stats:
                Rectangle StatTableRect = new Rectangle((TextPosRight + TextOffset).ToPoint(),
                                                        new Point(OpenNotebookRect.Width / 5, OpenNotebookRect.Height / 2));
                if (MainOptionsList.SelectedOption == "stats")
                {
                    spriteBatch.DrawString(JustBreathe, "My Stats: ", TextPosRight, Color.Black);
                    string[] Aspects = new string[6] {
                        "charm", "courage", "empathy", "intelligence", "strength", "money"
                    };
                    InfoTable StatTable = new InfoTable(MainCharacter.Stats, Aspects, StatTableRect, JustBreathe);
                    StatTable.Draw(spriteBatch, graphics);
                }
                else if (MainOptionsList.SelectedOption == "relationships")
                {
                    spriteBatch.DrawString(JustBreathe, "Friendship Levels: ", TextPosRight, Color.Black);
                    string[]  People   = Case.Suspects.Concat(Case.TestimonyOnly).ToArray();
                    InfoTable RelTable = new InfoTable(MainCharacter.Relationships, People, StatTableRect, JustBreathe);
                    RelTable.Draw(spriteBatch, graphics);
                }
                break;

            case NotebookState.ClickedQuitGame:
            case NotebookState.Options:
                if (MainOptionsList.SelectedOption == "savequit")
                {
                    if (QuitButton == null)
                    {
                        SaveButton = new Button("Save Game", Arial, TextPosRight);
                        QuitButton = new Button("Quit Game", Arial, TextPosRight + new Vector2(0.0f, 2 * SaveButton.Rect.Height));
                    }
                    QuitButton.Draw(spriteBatch, graphics);
                    SaveButton.Draw(spriteBatch, graphics);
                }
                break;

            case NotebookState.Profiles:
                if (MainOptionsList.SelectedOption != null)
                {
                    DrawCharacterEntry(spriteBatch, graphics, AllChars.AllChars[MainOptionsList.SelectedOption], TextPosRight);
                }
                break;

            case NotebookState.Testimonies:
            case NotebookState.SelectedTestimony:

                // must select a character and a topic to view testimony. Only previously heard testimonies will appear
                if (TopicOptionsList.SelectedOption != null && MainOptionsList?.SelectedOption != null)
                {
                    List <Testimony> Testimonies = (from testimony in TestimonyList.Testimonies
                                                    where testimony.TopicTag == TopicOptionsList.SelectedOption &&
                                                    testimony.CharacterKey == MainOptionsList.SelectedOption &&
                                                    MainCharacter.TestimonyIds.Contains(testimony.Id)
                                                    select testimony).ToList();

                    if (Testimonies.Count > 0)
                    {
                        TestimonyId[0] = Testimonies[0].IdContradict;
                    }

                    DrawTestimonies(spriteBatch, graphics, Testimonies, TextPosRight);

                    if (SeekingTestimony)
                    {
                        if (SelectTestimonyButton == null)
                        {
                            SelectTestimonyButton = new Button("Select", JustBreathe25,
                                                               TextPosRight + new Vector2(0, OpenNotebookRect.Height - 50));
                        }
                        SelectTestimonyButton.Draw(spriteBatch, graphics);
                    }
                }
                break;

            default:
                break;
            }
        }