Msypon Posted April 18, 2013 Share Posted April 18, 2013 How to make a custom progress bar with image? Link to comment
Woovie Posted April 18, 2013 Share Posted April 18, 2013 dxDrawImageSection can be used to draw part of the image. For a 0-100% progress bar, to show a certain percent, math.floor or math.ceil ( ( % to show * image total width ) \ 100 ). Then you use that as the width amount for your dxDrawImageSection as the section you want to draw. Link to comment
50p Posted April 18, 2013 Share Posted April 18, 2013 If you're looking for some more advanced technique then you can use a shader. So that you can create a render target and draw on it with dxDrawRectangle or any other dx function and then apply a shader with a masking texture to it. That's how author of the GTA IV HUD resource achieved the radar drawing and health bar around the radar. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now