Fixed problem where overlapping animation clips would trigger multiple drag animation block commands.
This commit is contained in:
parent
d5309819e6
commit
2fbc916c79
|
@ -485,6 +485,7 @@ DrawAnimationTimeline (animation_system* AnimationSystem, animation_timeline_sta
|
|||
|
||||
// Animation Blocks
|
||||
b32 MouseDownAndNotHandled = MouseButtonTransitionedDown(Mouse.LeftButtonState);
|
||||
gs_list_handle DragBlockHandle = {0};
|
||||
for (u32 i = 0; i < AnimationSystem->Blocks.Used; i++)
|
||||
{
|
||||
gs_list_entry<animation_block>* AnimationBlockEntry = AnimationSystem->Blocks.GetEntryAtIndex(i);
|
||||
|
@ -508,13 +509,17 @@ DrawAnimationTimeline (animation_system* AnimationSystem, animation_timeline_sta
|
|||
BlockColor = PinkV4;
|
||||
}
|
||||
rect BlockBounds = DrawAnimationBlock(AnimationBlockAt, BlockColor, AdjustedViewRange, TimelineBounds, RenderBuffer);
|
||||
if (PointIsInRange(Mouse.Pos, BlockBounds.Min, BlockBounds.Max)
|
||||
&& MouseButtonTransitionedDown(Mouse.LeftButtonState))
|
||||
if (PointIsInRange(Mouse.Pos, BlockBounds.Min, BlockBounds.Max))
|
||||
{
|
||||
DragBlockHandle = CurrentBlockHandle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (MouseDownAndNotHandled && ListHandleIsValid(DragBlockHandle))
|
||||
{
|
||||
MouseDownAndNotHandled = false;
|
||||
SelectAndBeginDragAnimationBlock(CurrentBlockHandle, AdjustedViewRange, TimelineBounds, State);
|
||||
}
|
||||
}
|
||||
SelectAndBeginDragAnimationBlock(DragBlockHandle, AdjustedViewRange, TimelineBounds, State);
|
||||
}
|
||||
|
||||
// Time Slider
|
||||
|
|
2
todo.txt
2
todo.txt
|
@ -78,7 +78,7 @@ Ground Up Reengineering
|
|||
x display more than one layer
|
||||
x add/remove layers
|
||||
- layer masks by sculpture
|
||||
- blend modes - create a copy of the led's per layer, handle blending outside of patterns
|
||||
x blend modes - create a copy of the led's per layer, handle blending outside of patterns
|
||||
- interface for animation system
|
||||
- add/remove layers
|
||||
- select blend modes
|
||||
|
|
Loading…
Reference in New Issue