mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Implement scene switcher
This commit is contained in:
1 parent
3600e535d5
commit
775b49bd8a
15 files changed
+473
-314
No files matched your search
@@ -1,17 +1,18 @@
|
||||
package com.moulberry.flashback.editor;
|
||||
|
||||
import com.moulberry.flashback.keyframe.KeyframeType;
|
||||
import com.moulberry.flashback.state.EditorScene;
|
||||
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()) {
|
||||
public boolean checkValid(EditorScene scene) {
|
||||
if (this.trackIndex < 0 || this.trackIndex >= scene.keyframeTracks.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
KeyframeTrack keyframeTrack = state.keyframeTracks.get(this.trackIndex);
|
||||
KeyframeTrack keyframeTrack = scene.keyframeTracks.get(this.trackIndex);
|
||||
if (keyframeTrack.keyframeType != this.type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user