Esempio n. 1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (pages.Count > 0)
            {
                for (int i = 0; i <= pages[page].Count - 1; i++)
                {
                    pages[page][i].Draw(spriteBatch);
                }
            }

            if (slidingOver)
            {
                for (int i = 0; i <= pages[transitionPage].Count - 1; i++)
                {
                    pages[transitionPage][i].Draw(spriteBatch);
                }
            }

            nextButton.Draw(spriteBatch);
            prevButton.Draw(spriteBatch, null, SpriteEffects.FlipHorizontally);

            spriteBatch.DrawString(font, nextGiftIn, nextGiftInPos, Color.Black);

            if (giftP?.Active == true)
            {
                giftP.Draw(spriteBatch);
            }
        }
Esempio n. 2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
     spriteBatch.Draw(giftImg, giftRect, giftColor);
     spriteBatch.DrawString(font, name, namePos, giftColor);
     openButton.Draw(spriteBatch);
 }
Esempio n. 3
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(bgImg, bgRect, Color.White);
            spriteBatch.DrawString(font, congratsText, congratsPos, Color.Black);
            if (success)
            {
                nextLevelButton.Draw(spriteBatch);
            }
            levelSelectButton.Draw(spriteBatch);
            replayButton.Draw(spriteBatch);

            if (success && unlocks.Count > 0)
            {
                // Don't draw unlocks unless you've actually unlocked something
                spriteBatch.Draw(unlockBgImg, unlockBgRect, Color.White);
                for (int i = 0; i < drawAliens.Count; i++)
                {
                    drawAliens[i].Draw(spriteBatch);
                }
                for (int i = 0; i < projImgs.Count; i++)
                {
                    spriteBatch.Draw(projImgs[i], projRects[i], Color.White);
                }
                for (int i = 0; i < otherUnlockImgs.Count; i++)
                {
                    spriteBatch.Draw(otherUnlockImgs[i], otherUnlockRects[i], Color.White);
                }
                for (int i = 0; i < unlocks.Count; i++)
                {
                    spriteBatch.DrawString(font, unlocks[i], unlockPositions[i], Color.Black);
                }
            }
        }
Esempio n. 4
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
     spriteBatch.Draw(icon, iconRect, Color.Black);
     spriteBatch.DrawString(font, valueString + ": " + currentValue, valuePos, Color.LightGray);
     upgradeButton.Draw(spriteBatch);
     spriteBatch.DrawString(font, costString, costPos, Color.Gold);
 }
Esempio n. 5
0
 public void Draw(SpriteBatch spriteBatch)
 {
     toggleButton.Draw(spriteBatch);
     if (Toggled)
     {
         spriteBatch.Draw(falseImg, falseRect, Color.White);
     }
 }
Esempio n. 6
0
 public void Draw(SpriteBatch spriteBatch)
 {
     questButton.Draw(spriteBatch);
     spriteBatch.DrawString(font, labelText, labelLoc, Color.White);
     if (popup.Showing)
     {
         popup.Draw(spriteBatch);
     }
 }
Esempio n. 7
0
        public void Draw(SpriteBatch spriteBatch)
        {
            materialButton.Draw(spriteBatch);
            cannonButton.Draw(spriteBatch);
            giftsButton.Draw(spriteBatch);

            switch (state)
            {
            case ShopState.Materials:
                #region Materials
                for (int i = 0; i <= materialPages[page].Count - 1; i++)
                {
                    materialPages[page][i].Draw(spriteBatch);
                }

                if (slidingOver)
                {
                    for (int i = 0; i <= materialPages[transitionPage].Count - 1; i++)
                    {
                        materialPages[transitionPage][i].Draw(spriteBatch);
                    }
                }

                if (mInfoHover.Active)
                {
                    mInfoHover.Draw(spriteBatch);
                }

                //nextButton.Draw(spriteBatch);
                //prevButton.Draw(spriteBatch, null, SpriteEffects.FlipHorizontally);
                break;
                #endregion

            case ShopState.Cannons:
                #region Cannons
                for (int i = 0; i < cannonInterfaces.Count; i++)
                {
                    cannonInterfaces[i].Draw(spriteBatch);
                }

                if (cInfoHover.Active)
                {
                    cInfoHover.Draw(spriteBatch);
                }
                break;
                #endregion

            case ShopState.Gifts:
                #region Gifts
                for (int i = 0; i < giftInterfaces.Count; i++)
                {
                    giftInterfaces[i].Draw(spriteBatch);
                }
                break;
                #endregion
            }
        }
Esempio n. 8
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
            spriteBatch.Draw(cannonBgImg, cannonBgRect, Color.White);
            spriteBatch.Draw(cannonTubeImg, cannonTubeRect, Color.White);
            spriteBatch.Draw(cannonExtImg, cannonExtRect, Color.White);
            spriteBatch.DrawString(font, name, namePos, Color.Goldenrod);

            buyOrSelect.Draw(spriteBatch);
        }
Esempio n. 9
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(bgImg, bgRect, Color.White);
     spriteBatch.DrawString(font, questText, questTextLoc, Color.White);
     progressBar.Draw(spriteBatch, Color.Lime, Color.White);
     closeButton.Draw(spriteBatch);
     skipButton.Draw(spriteBatch);
     spriteBatch.Draw(coinIcon, coinRect, Color.White);
     spriteBatch.DrawString(font, rewardString, rewardLoc, Color.Goldenrod);
 }
Esempio n. 10
0
 public void Draw(SpriteBatch spriteBatch)
 {
     enButton.Draw(spriteBatch);
     esButton.Draw(spriteBatch);
     //frButton.Draw(spriteBatch);
     //itButton.Draw(spriteBatch);
     //eoButton.Draw(spriteBatch);
     //deButton.Draw(spriteBatch);
     //ukButton.Draw(spriteBatch);
     //tlButton.Draw(spriteBatch);
 }
Esempio n. 11
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (Visible)
     {
         spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
         spriteBatch.DrawString(font, name, namePos, Color.LightGray);
         spriteBatch.Draw(itemImg, itemRect, Color.White);
         buyOnceButton.Draw(spriteBatch);
         buyTenButton.Draw(spriteBatch);
         buyFiftyButton.Draw(spriteBatch);
     }
 }
Esempio n. 12
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(bgImg, bgRect, Color.White);

            spriteBatch.DrawString(mediumFont, hotbarLabel, hotbarLblLoc, Color.White);
            hotbarDisplay.Draw(spriteBatch);
            cannonDisplay.Draw(spriteBatch);
            goalDisplay.Draw(spriteBatch);
            spriteBatch.DrawString(mediumFont, chanceOfSuccess, chanceLoc, Color.White);

            proceedButton.Draw(spriteBatch);
            cancelButton.Draw(spriteBatch);
        }
Esempio n. 13
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (showing)
            {
                spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
                spriteBatch.DrawString(font, Text, textPos, Color.LightGray);
                hideButton.Draw(spriteBatch);

                if (viewButton != null)
                {
                    viewButton.Draw(spriteBatch);
                }
            }
        }
        public void Draw(SpriteBatch spriteBatch, User user)
        {
            sweeper.Draw(spriteBatch);
            spriteBatch.Draw(bgImg, bgTopRect, Color.Gray);
            spriteBatch.Draw(bgImg, bgBottomRect, GameInfo.Planet.GroundColor);
            sweeperButton.Draw(spriteBatch);
            rapidFireButton.Draw(spriteBatch);
            healthBar.Draw(spriteBatch, GameInfo.GetColorForAmount((int)healthBar.Value, (int)healthBar.MaxValue), Color.White);
            progressBar.Draw(spriteBatch, Color.RoyalBlue, Color.Transparent);
            for (int i = 0; i <= projImgs.Count - 1; i++)
            {
                if (projImgs[i] != null && projAmounts[i] > 0)
                {
                    spriteBatch.Draw(projImgs[i], projRects[i], Color.White);
                }
            }
            if (showingToolTip)
            {
                spriteBatch.Draw(bgImg, toolTipRect, Color.Gray);
                spriteBatch.DrawString(mediumFont, toolTip, toolTipLoc, Color.White);
            }
            Color usernameColor = Color.White;

            if (!(user.AvatarR == user.AvatarG && user.AvatarR == user.AvatarB &&
                  user.AvatarR <= 200))
            {
                // The above checks if all the username colors are equal (creating a gray shade that
                // is hard to see against the background).
                // However, shades above the value of 200 are allowed
                usernameColor = new Color(user.AvatarR, user.AvatarG, user.AvatarB);
            }
            spriteBatch.DrawString(bigFont, username, usernamePos, usernameColor);
            if (projAmounts[0] != 0)
            {
                // If the the first slot is empty, then they all are
                spriteBatch.Draw(highlightedImg, highlightedRect, Color.White);
            }
            for (int i = 0; i <= projImgs.Count - 1; i++)
            {
                // Draw the counts after the hightlight rectangle so that we can see them on selected projectiles
                if (projImgs[i] != null && projAmounts[i] > 0)
                {
                    spriteBatch.DrawString(mediumFont, projAmountStrings[i], projAmountPositions[i], Color.Black);
                }
            }
            DrawUserInfoDisplay(spriteBatch, user);
            DrawLives(spriteBatch, user, true);
        }
Esempio n. 15
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);

            nameButton.Draw(spriteBatch, nameShadeColor);
            delButton.Draw(spriteBatch, delShadeColor);

            spriteBatch.Draw(alienImg, alienRect, alienColor);
            spriteBatch.Draw(alienEyeImg, alienEyeRect, Color.White);
            spriteBatch.Draw(projImg, projRect, Color.White);

            for (int i = 0; i < lifeRects.Count; i++)
            {
                spriteBatch.Draw(lifeImg, lifeRects[i], lifeColors[i]);
            }
        }
Esempio n. 16
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(rectImg, fullRect, Color.Black * 0.5f);
     if (alienLoaded)
     {
         spriteBatch.Draw(rectImg, instructRect, Color.DarkGray);
         spriteBatch.DrawString(mediumFont, instructions, instructPos, Color.White);
         spriteBatch.Draw(rectImg, highlightRect, Color.White * 0.5f);
         if (stage == 0)
         {
             // Allow user to skip
             skipTutorialButton.Draw(spriteBatch);
         }
     }
     spriteBatch.Draw(alienImg, alienRect, Color.White);
     spriteBatch.Draw(alienEyeSheet, alienEyeDrawRect, alienEyeSourceRect, Color.White);
 }
Esempio n. 17
0
        public void Draw(SpriteBatch spriteBatch)
        {
            switch (state)
            {
            case SettingsState.Profile:

                spriteBatch.DrawString(bigFont, usernamePre, usernamePrePos, Textbox.ColorTheme);
                usernameBox.Draw(spriteBatch);

                rSlider.Draw(spriteBatch);
                gSlider.Draw(spriteBatch);
                bSlider.Draw(spriteBatch);

                spriteBatch.Draw(alienImg, alienRect, alienColor);
                spriteBatch.Draw(alienEyeImg, alienEyeRect, Color.White);

                spriteBatch.Draw(projImgs[projIndex], projRect, Color.White);
                nextProj.Draw(spriteBatch);
                prevProj.Draw(spriteBatch, null, SpriteEffects.FlipHorizontally);

                break;

            case SettingsState.Graphics:

                brightnessSlider.Draw(spriteBatch);

                break;

            case SettingsState.Sound:

                systemSlider.Draw(spriteBatch);
                musicSlider.Draw(spriteBatch);
                sfxSlider.Draw(spriteBatch);
                muteToggle.Draw(spriteBatch);
                dirXInstallButton.Draw(spriteBatch);

                break;
            }

            profileButton.Draw(spriteBatch);
            graphicsButton.Draw(spriteBatch);
            soundButton.Draw(spriteBatch);

            submit.Draw(spriteBatch);
            replayTutorial.Draw(spriteBatch);
        }
Esempio n. 18
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (Active)
            {
                spriteBatch.Draw(fullImg, fullRect, new Color(150, 150, 150));
                spriteBatch.Draw(bgImg, bgRect, Color.White);
                spriteBatch.DrawString(font, infoText, infoTextPos, Color.Black);

                enButton.Draw(spriteBatch);
                esButton.Draw(spriteBatch);
                //frButton.Draw(spriteBatch);
                //itButton.Draw(spriteBatch);
                //eoButton.Draw(spriteBatch);
                //deButton.Draw(spriteBatch);
                //ukButton.Draw(spriteBatch);
                //tlButton.Draw(spriteBatch);
            }
        }
        public void Draw(SpriteBatch spriteBatch)
        {
            nextButton.Draw(spriteBatch);
            prevButton.Draw(spriteBatch, null, SpriteEffects.FlipHorizontally);

            foreach (AchievementDisplay a in pages[page])
            {
                a.Draw(spriteBatch);
            }

            if (slidingOver)
            {
                foreach (AchievementDisplay a in pages[transitionPage])
                {
                    a.Draw(spriteBatch);
                }
            }
        }
Esempio n. 20
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (Active)
     {
         spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
         spriteBatch.Draw(itemImg, itemRect, Color.White);
         spriteBatch.DrawString(font, itemString, itemStringPos, new Color(DrawHelper.GetDominantColor(itemImg), 255.0f));
         spriteBatch.DrawString(font, skipTip, skipTipPos, Color.White);
         if (done)
         {
             claimButton.Draw(spriteBatch);
         }
         for (int i = 0; i < particles.Count; i++)
         {
             spriteBatch.Draw(particleImg,
                              new Rectangle((int)particles[i].X, (int)particles[i].Y, PARTICLE_SIZE, PARTICLE_SIZE), giftColor);
         }
     }
 }
Esempio n. 21
0
        public void Draw(SpriteBatch spriteBatch, User user)
        {
            if (Visible)
            {
                spriteBatch.Draw(bgImg, bgRect, Color.DarkGray);
                Output.Draw(spriteBatch, false);
                craftButton.Draw(spriteBatch);
                for (int i = 0; i < materialImgs.Count; i++)
                {
                    spriteBatch.Draw(materialImgs[i], materialRects[i], Color.White);

                    Color countColor = Color.White;
                    if (user.AmountOfMaterial(materials[i]) < materialCounts[i])
                    {
                        countColor = Color.Red;
                    }
                    spriteBatch.DrawString(font, "x" + materialCounts[i], materialCountLocations[i], countColor);
                }
                spriteBatch.DrawString(font, youHave, youHavePos, Color.LightGray);
            }
        }
Esempio n. 22
0
        public void Draw(SpriteBatch spriteBatch, User user)
        {
            nextButton.Draw(spriteBatch);
            prevButton.Draw(spriteBatch, null, SpriteEffects.FlipHorizontally);

            foreach (CraftingInterface c in pages[page])
            {
                c.Draw(spriteBatch, user);
            }

            if (slidingOver)
            {
                for (int i = 0; i <= pages[transitionPage].Count - 1; i++)
                {
                    pages[transitionPage][i].Draw(spriteBatch, user);
                }
            }

            if (infoHover.Active)
            {
                infoHover.Draw(spriteBatch);
            }
        }
Esempio n. 23
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (active)
            {
                spriteBatch.Draw(image, transRect, transColor);

                spriteBatch.Draw(image, drawRectangle, Color.White);

                spriteBatch.DrawString(font, text, textPosition, Color.White);

                okButton.Draw(spriteBatch);

                if (hasCancelButton)
                {
                    cancelButton.Draw(spriteBatch);
                }

                if (hasCheckbox)
                {
                    queryCheckbox.Draw(spriteBatch, Color.White);
                }
            }
        }