Sign in to follow this  
glhf

How do you make a loading bar?

Recommended Posts

glhf    585
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
Alex Melbourne    294
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
khagin    110
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

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