I was thinking about a sprite based method - Have a bitmap of a complete circle (100% progress), and an texture of a half circle of the background color. Make two bitmaps of the blank half circle and overlap the completed circle with those, set the anchor point to the circle center, and set the rotation to expose a wedge of the completed circle. That would get you from 0 to 50% (50% when the two blank ones are aligned.) Then make a bitmap of the 0-50% portion of the 100% progress texture, and overlap the others with that. Remove one of the two blank halves and rotate the other to expose the 50 to 100% side. Possibly overlap all of that with a text field for a numerical display.
The advantage of that method is you could use any texture image for the progress circle.
I have a little time right now... maybe I'll try whipping that up.
One could use any sort of image for the completed progress, including a ring (with a blank center), perhaps with the color progressing from red to green, etc.
Not to discredit hgy29's method in any way - that's really slick, and has the advantage of not requiring any texture editing. This is just another option.
Comments
http://giderosmobile.com/forum/discussion/6374/path2d-circle-indicator/p1
Likes: mertocan
Likes: pie, totebo, MoKaLux
Likes: hgy29
Is there a way to make the corners of the bar clean and crisp (not bevelled)? See screenshot to show what I mean.
The advantage of that method is you could use any texture image for the progress circle.
I have a little time right now... maybe I'll try whipping that up.
Paul
Source code is here: http://www.pishtech.com/progress_circle.zip
One could use any sort of image for the completed progress, including a ring (with a blank center), perhaps with the color progressing from red to green, etc.
Not to discredit hgy29's method in any way - that's really slick, and has the advantage of not requiring any texture editing. This is just another option.
Paul
Likes: antix, pie, totebo, hgy29, keszegh