Skip to content
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

Tab strip #2331

Merged
merged 5 commits into from Apr 4, 2018
Merged

Tab strip #2331

merged 5 commits into from Apr 4, 2018

Conversation

@DrabWeb
Copy link
Member

@DrabWeb DrabWeb commented Mar 29, 2018

image

@@ -17,6 +17,8 @@ public class BreadcrumbControl<T> : OsuTabControl<T>

protected override TabItem<T> CreateTabItem(T value) => new BreadcrumbTabItem(value);

protected override float StripWidth() => base.StripWidth() - (padding + 8);

This comment has been minimized.

@DrabWeb

DrabWeb Mar 29, 2018
Author Member

This will be made better with the changes in #2324.

@smoogipoo smoogipoo added this to the April 2018 milestone Mar 30, 2018
@smoogipoo smoogipoo added the type:UI label Mar 30, 2018

// dont bother calculating if the strip is invisible
if (strip.Colour.MaxAlpha > 0)
strip.ResizeWidthTo(StripWidth(), 500, Easing.OutQuint);

This comment has been minimized.

@smoogipoo

smoogipoo Apr 4, 2018
Contributor

We previously found out doing per-frame transforms is kinda expensive. Use the interpolation functions directly instead of this:
strip.Width = Interpolation.ValueAt(MathHelper.Clamp(Clock.ElapsedFrameTime, 0, 1000), strip.Width, StripWidth(), 0, 500, Easing.OutQuint);

@smoogipoo smoogipoo merged commit fc09970 into ppy:master Apr 4, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants