From 3b8bd135662d99506e8a2ebb30b0d46b57861f74 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Thu, 29 Sep 2022 20:58:54 -0400 Subject: rewritten graph ui start --- main.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'main.h') diff --git a/main.h b/main.h index 967354f..42befc8 100644 --- a/main.h +++ b/main.h @@ -483,7 +483,16 @@ struct ui_graph { struct ui { real32 TimelineSplit = 600; + real32 GraphPropsSplit = 200; real32 TimelineZoom; + real32 GraphZoom = 30; + + // Under 1 is zoomed in! + real32 TimelinePercentZoomed = 1.0f; + real32 TimelinePercentOffset = 0.0f; + + real32 Y_TimelinePercentZoomed = 1.0f; + real32 Y_TimelinePercentOffset = 0.0f; // Note that I don't use "zoom" to mean the scale in relation to the // original (i.e. default = 1.0f); it's the literal screen size in pixels @@ -499,6 +508,10 @@ struct ui real32 ScrollXOffset; real32 ScrollYOffset; + // Custom scrolling for the timeline, as ImGui's didn't work well + real32 G_ScrollXOffset; + real32 G_ScrollYOffset; + // NOTE(fox): Keeping track of mouse delta myself since the ImGui threshold // dragging API doesn't let you do things like subtract the delta easily. real32 DraggingKeyframeThreshold; -- cgit v1.2.3