From bf01cea7274d9ac8ae13fd447c8568c95da31614 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Tue, 25 Oct 2022 23:47:17 -0400 Subject: graph development --- main.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'main.h') diff --git a/main.h b/main.h index cfdb816..00d97c9 100644 --- a/main.h +++ b/main.h @@ -77,10 +77,11 @@ enum interpolation_type }; struct bezier_point { + uint8 Occupied; v2 Pos[3]; interpolation_type Type; - uint16 ImguiID; - uint8 IsSelected; + uint8 IsSelected; //[3] + uint8 Color; }; struct block_bezier { @@ -125,15 +126,25 @@ struct sorted_layer uint16 Block_Layer_Index; }; +enum timeline_mode +{ + timeline_mode_default, + timeline_mode_graph +}; + struct ui { ImVec2 CompZoom; // In screen pixels, not percentage. ImVec2 CompPos; + ImDrawListSplitter Test; + // Under 1 is zoomed in! ImVec2 TimelinePercentZoomed; ImVec2 TimelinePercentOffset; + timeline_mode TimelineMode = timeline_mode_graph; + bool32 BoxSelect; ImVec2 DragDelta_Prev; // TODO(fox): Make native ImGui? @@ -267,6 +278,13 @@ struct property_header real32 MaxVal; }; +struct graph_info +{ + real32 MinVal = FLT_MAX; + real32 MaxVal = FLT_MIN; + real32 LowestOffset = FLT_MIN; +}; + struct property_info { real32 MinVal = FLT_MAX; -- cgit v1.2.3