Old 04-15-2009, 02:10 PM   #1 (permalink)
Zune Guardian
 
BroiledVictory's Avatar
 
Join Date: Dec 2008
Location: Washington State
Posts: 693
BroiledVictory will become famous soon enough
Send a message via MSN to BroiledVictory Send a message via Skype™ to BroiledVictory
Default Text won't show.

In my app, Musician the text won't show, I know it has to do with the background because the text will appear if there is no background can someone help?
Code:
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.White);
            spriteBatch.Begin(SpriteBlendMode.AlphaBlend);
            if (Menu == true)
            {
                spriteBatch.DrawString(Arial, "Play to start, Right and Left to change background",
                    new Vector2(10, 10), Color.Blue, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            }

                if (bgchoice == 1)
                {
                    spriteBatch.Draw(bg1, mainFrame, Color.White);
                }

                if (bgchoice == 2)
                {  spriteBatch.Draw(bg2, mainFrame, Color.White);
                }
                if (bgchoice == 3)
                { 
                    spriteBatch.Draw(bg3, mainFrame, Color.White);       
                }

                if (bgchoice == 4)
                {               
                    spriteBatch.Draw(bg4, mainFrame, Color.White);              
                }

                if (bgchoice == 5)
                {
                    spriteBatch.Draw(bg5, mainFrame, Color.White);
                }

                if (bgchoice == 6)
                {
                    spriteBatch.Draw(bg6, mainFrame, Color.White);
                }
                spriteBatch.End();
            base.Draw(gameTime);
            }
        }
    }
__________________


Quote:
Originally Posted by R. Lee Ermey, host of Lock N' Load
STOP YOUR FROWNING, AND GRAB A BROWNING
Thanks Jay2 for the sexy sig.




BroiledVictory is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 04-15-2009, 02:17 PM   #2 (permalink)
lost in paradise with rae
Support Team
Development Front
Super Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 3,119
Red Sky is a glorious beacon of lightRed Sky is a glorious beacon of lightRed Sky is a glorious beacon of light
Send a message via MSN to Red Sky Send a message via Skype™ to Red Sky
Default

It draws in the order you call it. Put draw string after the background stuff.

Basically, the string is being drawn, then the background on top of it.





Red Sky is offline   Reply With Quote
Old 04-16-2009, 08:51 PM   #3 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 899
Tiptup300 has disabled reputation
Default

You should have over 100 different bg images. That would be cool.



Tiptup300 is offline   Reply With Quote
Old 04-18-2009, 11:26 AM   #4 (permalink)
Zune Guardian
 
BroiledVictory's Avatar
 
Join Date: Dec 2008
Location: Washington State
Posts: 693
BroiledVictory will become famous soon enough
Send a message via MSN to BroiledVictory Send a message via Skype™ to BroiledVictory
Default

@TipTup300
Version 0.3 is already like 3 mb... I don't think the memory will allow for that much... But I'll take the request for more.
__________________


Quote:
Originally Posted by R. Lee Ermey, host of Lock N' Load
STOP YOUR FROWNING, AND GRAB A BROWNING
Thanks Jay2 for the sexy sig.




BroiledVictory is offline   Reply With Quote
Old 04-18-2009, 10:47 PM   #5 (permalink)
torpedo the mothership
Development Front
Super Moderator
Expert Zuner
 
itsnotabigtruck's Avatar
 
Join Date: May 2008
Posts: 2,732
itsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant futureitsnotabigtruck has a brilliant future
Awards Showcase
Elektrolik's Submissive Favorite staff member Most helpful 
Total Awards: 3
Default

Quote:
Originally Posted by SmileDog View Post
@TipTup300
Version 0.3 is already like 3 mb... I don't think the memory will allow for that much... But I'll take the request for more.


If you really have to put in a switchable background feature, instead of using an abomination of if statements such as what you've got now, load only one background and store it in a class-level variable (aka field), then render it every time in your Draw function.
__________________

signature by vettexl





itsnotabigtruck is offline   Reply With Quote
Old 04-19-2009, 08:14 PM   #6 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 899
Tiptup300 has disabled reputation
Default

I personally like his method. ;D



Tiptup300 is offline   Reply With Quote
Old 04-20-2009, 06:11 AM   #7 (permalink)
lost in paradise with rae
Support Team
Development Front
Super Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 3,119
Red Sky is a glorious beacon of lightRed Sky is a glorious beacon of lightRed Sky is a glorious beacon of light
Send a message via MSN to Red Sky Send a message via Skype™ to Red Sky
Default

In my Runaway game, I actually use a switch for it. I guess it's neater than all the if statements, but it gets the job done relatively the same, doesn't it?





Red Sky is offline   Reply With Quote
Old 04-20-2009, 07:39 PM   #8 (permalink)
Zune Guardian
 
BroiledVictory's Avatar
 
Join Date: Dec 2008
Location: Washington State
Posts: 693
BroiledVictory will become famous soon enough
Send a message via MSN to BroiledVictory Send a message via Skype™ to BroiledVictory
Default

_A Few Things_
A) Why isn't this thread been Locked?It's already locked.
J)I am still getting used to C#, thanks for the advice and solution RedSky and Truck.
L)I'm an "if" addict.
__________________


Quote:
Originally Posted by R. Lee Ermey, host of Lock N' Load
STOP YOUR FROWNING, AND GRAB A BROWNING
Thanks Jay2 for the sexy sig.




BroiledVictory is offline   Reply With Quote
Old 04-21-2009, 02:43 PM   #9 (permalink)
Back to the remedy!
Retired Staff
Expert Zuner
 
Bolt's Avatar
 
Join Date: Oct 2008
Location: In your closet, in your head
Posts: 3,308
Bolt is a splendid one to beholdBolt is a splendid one to beholdBolt is a splendid one to beholdBolt is a splendid one to beholdBolt is a splendid one to beholdBolt is a splendid one to behold
Send a message via Yahoo to Bolt
Default

Where does it say it was locked?
__________________



Bolt is offline   Reply With Quote
Old 04-23-2009, 08:05 PM   #10 (permalink)
Zune Guardian
 
BroiledVictory's Avatar
 
Join Date: Dec 2008
Location: Washington State
Posts: 693
BroiledVictory will become famous soon enough
Send a message via MSN to BroiledVictory Send a message via Skype™ to BroiledVictory
Default

I for some reason I don't remember saying the It's already locked part.
__________________


Quote:
Originally Posted by R. Lee Ermey, host of Lock N' Load
STOP YOUR FROWNING, AND GRAB A BROWNING
Thanks Jay2 for the sexy sig.




BroiledVictory is offline   Reply With Quote
Reply

Bookmarks

Thread Tools