Sign in to follow this  

How do you make a loading bar?

This topic is 1988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to make a loading bar for while the game is checking for updates and downloading them.
How do I get started on this?

Share this post


Link to post
Share on other sites
All loading bars to is present the internal state of the program to the player. Store the percentage of completion in a variable somewhere and then read this when your rendering the bar to see how much you should fill in.

Share this post


Link to post
Share on other sites
Make a texture for your loading bar and then when drawing it, multiply the width of the bar at 100% completion by the current percentage. Like so:

[source lang="csharp"]Texture loadingTexture = LoadTexture("loadingBar");

float completionPercent = loader.PercentComplete;

Draw(loadingTexture, x, y, loadingTexture.Width * completionPercent, loadingTexture.Height);[/source] Edited by khagin

Share this post


Link to post
Share on other sites

This topic is 1988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this