Problem with progress ring

@lessmsios: glad that the update fixed things for you. I like the simplicity of an enterframe listener because it allows a nice smooth transition, as well as a simple update of the position by adjusting the object’s .position property. It sounds way more expensive an operation than it is. Think of it as akin to updating an object’s .x and .y properties on every frame. No particularly heavy lifting required: I just asjust 2 display rect’s rotations to reflect the ring’s position.

As for supporting gradient, I’ll give it some thought, but I may not get around to implementing it too soon. I’m picky about having those things look seamless, and part of the optimizations for the plugin involved reducing the number of display objects nested in the ring object: I no longer use many pie-shaped segments, but instead use just 2 rects: one for each hemisphere (left & right). So I’d need to rethink that strategy to support a gradient fill.

But thanks for buying, and for helping to make it better with your notes!

If I wish to allow the user to change bgColor and/or ringColor to a color of their choice after the ring is created, how can this be done? PLEASE don’t say the ring has to be recreated!

@lessmsios: unfortunately, at the moment you’d need to recreate the ring object to change the color. I’ll put adding :setBgColor and :setRingColor methods on my to-do list. 

@schroederapps: Thanks! Perhaps add other properties like:

  • radius

  • boarder

  • boarder color

  • refresh (property changes take effect when called)

I’ll just recreate it for now.

David

@lessmsios:

I’ve pushed up an update to the plugin that adds methods for changing the strokeWidth, strokeColor, bgColor and ringColor of your ring object on-the-fly, after they’re created.

Changing the size of the object is best handled using the xScale and yScale properties of the ring object, and that doesn’t require any new changes to the plugin.

It could take an hour or more before the changes are actually live. In the meantime, you can check the updated documentation at https://schroederapps.github.io/progress_ring/

Looks good, thanks! More efficient than deleting/creating over and over.

Made an app for iOS and Android using your ring called “Fast Up”. I charge for it but you can still see pics of it. There is occasionally a vertical line (at 0 and 180 deg.) that appears no matter where on the screen or the size, probably just 1 pixel wide. For now it’s not an issue so I haven’t researched conditions when it happens.

Thanks again!

@lessmsios: I picked up a copy of your app (always happy to support a fellow Corona developer!), and I wasn’t personally able to reproduce the issue, at least not in my few minutes of trying.

If you can make a reproducible test case, please send it to me (jason@schroederapps.com) and I’ll work with it to edge out the problem in a future plugin update. Thanks!

Hi, thanks for the cool plugin! I just bought it and am integrating it…

I am also experiencing a vertical line at 180 degrees, when the ring position passes that mark. It only happens when counterclockwise = true

For me it happens using your test app (progressRing_sample) as well as my app. In your sample app all I need to do is turn counterclockwise on and it shows there (Corona daily 2018.3257, Mac OS 10.13.2).

I just test my app on iPhone device, and issue doesn’t happen there, looks like only in the simulator FYI.

Thanks for the feedback @dooq! I will investigate and try to correct the issue with the line showing when running counter-clockwise. Given that it’s only happening in the simulator, it could be because of how the simulator handles scaling when not running at 100% pixel-perfect size. That might explain why it’s not happening on-device. But I’ll see what I can turn up.

Thanks again!

Yep, zooming the simulator skin to max size makes the line disappear :slight_smile:

(Been using the iPhone 6 skin zoomed out 1 step)

This is a pic of the ring from my app on the settings page, actual iPad Pro. The colors and ranges were changed - still the vertical line (bottom half) which appears to be 1 pixel in width. The line will appear from top to bottom.

http://lessms.me/ring-line.png

Hey guys - thanks for the continued feedback and details. I think I’ve fixed this. I pushed up a new change to the plugin’s repository, so it should download to your simulators in the next hour or so. Give it a try tonight and see if you are able to reproduce the issue. I think it’s fixed. Thanks!

On one of my apps I did some simple tricks to have a multi-colored ring. Would be nice if you wanted to improve your ring to incorporate multi-colors as a standard feature. Perhaps a table with tables for each color percentage?

percentages = {

    { fore = {r,g,b,a}, back = {r,g,b,a}, percent = nn },

    { fore = {r,g,b,a}, back = {r,g,b,a}, percent = nn },

    { fore = {r,g,b,a}, back = {r,g,b,a}, percent = nn },

}

Thanks for the suggestion @lessmsios! I’ll give it some thought, but I may not have time to dig back into this plugin very soon.

But as long as this thread is active again, I’ll take a moment to highlight my latest plugin: only $1 to add a Doom-inspired scene transition to your game or app!

https://marketplace.coronalabs.com/corona-plugins/screen-melt