@@ -585,19 +585,18 @@ void Application::drawScene() {
585
585
}
586
586
});
587
587
588
- // Registry.view<Position, Sequentity::Track, Color>().each([&](const auto& position,
589
- // const auto& track,
590
- // const auto& color) {
591
- // Sequentity::Intersect(track, sqty.current_time, [&](auto& event) {
592
- // if (event.type == TranslateEvent) {
593
- // auto data = static_cast<ToolEventData*>(event.data);
594
- // auto input = data->input[data->start];
595
- // Position pos = position + (input.absolute - data->origin);
596
- // auto impos = ImVec2(Vector2(Vector2i(pos.x, pos.y)));
597
- // Widgets::Cursor(impos, color);
598
- // }
599
- // });
600
- // });
588
+ Sequentity::Intersect (Events, sqty.current_time , [&](entt::entity subject, entt::entity event_entity) {
589
+ auto & event = Events.get <Sequentity::Event>(event_entity);
590
+ auto & position = Registry.get <Position>(subject);
591
+
592
+ if (event.type == TranslateEvent) {
593
+ auto data = static_cast <ToolEventData*>(event.data );
594
+ auto input = data->input [data->start ];
595
+ Position pos = position + (input.absolute - data->origin );
596
+ auto impos = ImVec2 (Vector2 (Vector2i (pos.x , pos.y )));
597
+ Widgets::Cursor (impos, ImColor{1 .0f , 1 .0f , 1 .0f });
598
+ }
599
+ });
601
600
}
602
601
603
602
ImGui::End ();
0 commit comments