mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Stuff
This commit is contained in:
1 parent
9c4a30d224
commit
666398e480
174 files changed
+8694
-2942
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package com.moulberry.flashback.editor;
|
||||
|
||||
import com.moulberry.flashback.keyframe.KeyframeType;
|
||||
import com.moulberry.flashback.state.EditorState;
|
||||
import com.moulberry.flashback.state.KeyframeTrack;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
|
||||
public record SelectedKeyframes(KeyframeType type, int trackIndex, IntSet keyframeTicks) {
|
||||
public boolean checkValid(EditorState state) {
|
||||
if (this.trackIndex < 0 || this.trackIndex >= state.keyframeTracks.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
KeyframeTrack keyframeTrack = state.keyframeTracks.get(this.trackIndex);
|
||||
if (keyframeTrack.keyframeType != this.type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.keyframeTicks.removeIf(tick -> !keyframeTrack.keyframesByTick.containsKey(tick));
|
||||
return !this.keyframeTicks.isEmpty();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user