From c40fb7c82be088db4166e92f131865f72b975f56 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Fri, 27 Jan 2023 22:49:03 -0500 Subject: selection improvements --- src/include/all.h | 4 ++++ src/include/functions.h | 2 ++ src/include/main.h | 1 + 3 files changed, 7 insertions(+) (limited to 'src/include') diff --git a/src/include/all.h b/src/include/all.h index e2a2a2f..08a96e6 100644 --- a/src/include/all.h +++ b/src/include/all.h @@ -507,6 +507,10 @@ Transform_Recurse(project_state *State, memory *Memory, block_composition *MainC sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, real32 *MinX, real32 *MinY, real32 *MaxX, real32 *MaxY); + +inline void +ImGui_DrawCenteredRect(ImDrawList *draw_list, ImVec2 Point, real32 Width, uint32 col); + static bool32 Layer_TestForPoint(memory *Memory, project_state *State, ui *UI, sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, uint16 PrincipalIndex, v2 CompUV); diff --git a/src/include/functions.h b/src/include/functions.h index 4ded552..4c4ea2d 100644 --- a/src/include/functions.h +++ b/src/include/functions.h @@ -44,6 +44,8 @@ static layer_transforms Transform_Inverse(layer_transforms T); static v2 T_CompPosToLayerPos(layer_transforms T, uint32 FileWidth, uint32 FileHeight, uint32 SourceWidth, uint32 SourceHeight, real32 X, real32 Y); +inline void +ImGui_DrawCenteredRect(ImDrawList *draw_list, ImVec2 Point, real32 Width, uint32 col) static void ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Memory, ImGuiIO io, sorted_file Sorted); static void ImGui_PropertiesPanel(project_data *File, project_state *State, ui *UI, memory *Memory, ImGuiIO io, sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, sorted_property_array *SortedPropertyStart, uint16 *SortedKeyframeArray); diff --git a/src/include/main.h b/src/include/main.h index 38e9105..e1d1787 100644 --- a/src/include/main.h +++ b/src/include/main.h @@ -490,6 +490,7 @@ struct project_state interact_transform Interact_Transform; interact_type Interact_Active; int32 Interact_Modifier; + bool32 Interact_OutOfDrag; // TODO(fox): replace this real32 Interact_Offset[12]; real32 Interact_Dup_Previous[2]; void *Interact_Address; -- cgit v1.2.3