Jump to content

Image progress bar


Msypon

Recommended Posts

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...