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

Move seeking logic into a custom editor clock #2356

Merged
merged 13 commits into from Apr 12, 2018
Merged

Conversation

smoogipoo
Copy link
Contributor

  • Editor now has an EditorClock.
  • Moves the seek handling from HitObjectComposer to EditorClock.
  • Cleans up a lot of testcases by encapsulating the clock construction/handling logic.
  • Exposed as an IAdjustableClock to editor components through DI - if we need components to snap later on then we may expose it as the EditorClock itself, but as we discussed earlier this is not needed for now.

{
base.Update();

// We don't have any explicit way to start/stop the track, but want a relatively accurate IsRunning state

This comment was marked as off-topic.

@@ -17,8 +17,15 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
/// </summary>
public class SummaryTimeline : BottomBarContainer
{
private readonly IAdjustableClock adjustableClock;

public SummaryTimeline(IAdjustableClock adjustableClock)

This comment was marked as off-topic.

smoogipoo and others added 4 commits April 12, 2018 13:35
Beatmap track shouldn't be start/stopped anyway - the IAdjustableClock should be DI'd in to perform the functionality.
ControlPointInfo = controlPointInfo;
}

public bool SeekSnapped(double position)

This comment was marked as off-topic.

}

/// <summary>
/// Seek to the closest valid snap value.

This comment was marked as off-topic.

}

/// <summary>
/// Seeks the current time one beat-snapped beat-length backwards.

This comment was marked as off-topic.

public void SeekBackward(bool snapped = false) => seek(-1, snapped);

/// <summary>
/// Seeks the current time one beat-snapped beat-length forwards.

This comment was marked as off-topic.

@peppy peppy merged commit 3de460f into ppy:master Apr 12, 2018
@smoogipoo smoogipoo deleted the editor-clock branch June 15, 2018 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants