Add current time marker
This commit is contained in:
parent
e78c0fa96a
commit
1c4c092967
4
main.cpp
4
main.cpp
@ -244,6 +244,10 @@ void renderImGui() {
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the current timeline position marker
|
||||
float position_marker = (timeline_position * zoom_level - pan_offset) / timeline_duration * timeline_width;
|
||||
draw_list->AddLine(ImVec2(cursor_pos.x + position_marker, cursor_pos.y), ImVec2(cursor_pos.x + position_marker, cursor_pos.y + 100), IM_COL32(0, 0, 255, 255), 2.0f);
|
||||
|
||||
// Allow adding markers with snapping to grid
|
||||
if (ImGui::Button("Add Marker")) {
|
||||
float snap_position = std::round(timeline_position / beat_interval) * beat_interval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user