Skip to content

Add osu!direct previews - #1286

Merged
peppy merged 18 commits into
ppy:masterfrom
jorolf:direct-previews
Oct 13, 2017
Merged

Add osu!direct previews#1286
peppy merged 18 commits into
ppy:masterfrom
jorolf:direct-previews

Conversation

@jorolf

@jorolf jorolf commented Sep 17, 2017

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread osu.Game/Overlays/Direct/DirectPanel.cs Outdated
private BeatmapManager beatmaps;
private NotificationOverlay notifications;

public abstract Bindable<bool> PreviewPlaying { get; }

This comment was marked as off-topic.

},
});

PreviewPlaying.ValueChanged += newValue => playButton.FadeTo(newValue || IsHovered ? 1 : 0, 120, Easing.InOutQuint);

This comment was marked as off-topic.

base.Update();

if (PreviewPlaying && playButton.Track != null)
progressBar.Width = (float)(playButton.Track.CurrentTime / playButton.Track.Length);

This comment was marked as off-topic.

@peppy

peppy commented Sep 26, 2017

Copy link
Copy Markdown
Member

Please check out the audio loading wrapper in #1253 (which is now merged). You should be able to share a fair bit of implementation with it

@peppy peppy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as commented

Comment thread osu.Game/Overlays/Direct/DirectPanel.cs Outdated
{
if (newValue)
{
if(Preview == null)

This comment was marked as off-topic.

Comment thread osu.Game/Overlays/Direct/PlayButton.cs Outdated
}
}

public PlayButton(Bindable<bool> playing)

This comment was marked as off-topic.

@peppy

peppy commented Oct 2, 2017

Copy link
Copy Markdown
Member

Why didn't you include the actual preview loading logic inside PlayButton? ie. why do both PreviewButton and PlayButton exist, with the track logic duplicated in two places?

@jorolf
jorolf force-pushed the direct-previews branch 2 times, most recently from 1cae591 to 7027a51 Compare October 6, 2017 19:13
peppy added 2 commits October 13, 2017 14:06
Reduced publicly facing properties where possible. Also fixes a potentially bad state issue when the beatmapset was changed while a load was in progress.
@peppy peppy changed the title Direct previews Add osu!direct previews Oct 13, 2017
peppy
peppy previously approved these changes Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants