New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CircularProgress.FillTo method #1538

Merged
merged 7 commits into from May 11, 2018

Conversation

3 participants
@UselessToucan
Contributor

UselessToucan commented Apr 28, 2018

namespace osu.Framework.Graphics.UserInterface
{
public class CircularProgress : Drawable, IHasCurrentValue<double>
{
public Bindable<double> Current { get; } = new Bindable<double>();
private double currentValue

This comment has been minimized.

@jorolf

jorolf Apr 28, 2018

Contributor

imho this.TransformTo should support bindables to avoid this kind of stuff

@@ -59,6 +64,8 @@ protected override void ApplyDrawNode(DrawNode node)
base.ApplyDrawNode(node);
}
public TransformSequence<CircularProgress> FillTo(double value, int duration) => this.TransformTo(nameof(currentValue), value, duration);

This comment has been minimized.

@jorolf

jorolf Apr 28, 2018

Contributor

And this should probably be moved to TransformExtensions and TransformSequenceExtensions

@smoogipoo smoogipoo added this to the May 2018 milestone May 2, 2018

@smoogipoo

This comment has been minimized.

Contributor

smoogipoo commented May 2, 2018

Awaiting #1539 to be merged.

@smoogipoo smoogipoo added the blocked label May 2, 2018

UselessToucan added some commits May 9, 2018

@@ -59,6 +60,8 @@ protected override void ApplyDrawNode(DrawNode node)
base.ApplyDrawNode(node);
}
public TransformSequence<CircularProgress> FillTo(double value, int duration) => this.TransformBindableTo(Current, value, duration);

This comment has been minimized.

@smoogipoo

smoogipoo May 10, 2018

Contributor

This should have the same signature as Transformable methods, including the easing parameter.

This comment has been minimized.

@smoogipoo

smoogipoo May 10, 2018

Contributor

Also this should have an extension method:

public static class CircularProgressExtensions
{
    public static TransformSequence<CircularProgress> FillTo(this TransformSequence<CircularProgress> t, ...) => ...
}

Just as a separate class at the bottom of the file.

@smoogipoo smoogipoo removed the blocked label May 11, 2018

smoogipoo added some commits May 11, 2018

@smoogipoo smoogipoo merged commit 517e496 into ppy:master May 11, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@UselessToucan UselessToucan deleted the UselessToucan:circular_progress_fill_to branch May 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment