From b39d7ecf069c5a992425c63abd25e429605daa6b Mon Sep 17 00:00:00 2001 From: WilliamQiufeng Date: Sat, 13 Apr 2024 11:55:33 +0800 Subject: [PATCH] Add GetBookmarkAt() to qua --- Quaver.API/Maps/Qua.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Quaver.API/Maps/Qua.cs b/Quaver.API/Maps/Qua.cs index 0e0fc4b86..9ea82d7dc 100644 --- a/Quaver.API/Maps/Qua.cs +++ b/Quaver.API/Maps/Qua.cs @@ -583,6 +583,17 @@ public TimingPointInfo GetTimingPointAt(double time) return TimingPoints[index]; } + /// + /// Gets the bookmark at a particular time in the map. + /// + /// + /// + public BookmarkInfo GetBookmarkAt(int time) + { + var index = Bookmarks.FindIndex(b => b.StartTime == time); + return index == -1 ? null : Bookmarks[index]; + } + /// /// Gets a scroll velocity at a particular time in the map ///