summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2023-02-07 17:48:15 -0500
committerFox Caminiti <fox@foxcam.net>2023-02-07 17:48:15 -0500
commitb9d111d0136f32d1c43b12eb6e5595fcead9c025 (patch)
tree784e903244c0490191a8b9c8e9380e1e64cc5606 /src/include
parentee654e9217487f6fca12356ec8af82319c309592 (diff)
viewport improvements
Diffstat (limited to 'src/include')
-rw-r--r--src/include/all.h8
-rw-r--r--src/include/layer.h2
-rw-r--r--src/include/main.h5
3 files changed, 10 insertions, 5 deletions
diff --git a/src/include/all.h b/src/include/all.h
index 82731ff..cdd14a8 100644
--- a/src/include/all.h
+++ b/src/include/all.h
@@ -77,7 +77,7 @@ static void
Property_AddKeyframe(memory *Memory, memory_table_list TableName, property_channel *Property, int Frame, uint16 *ArrayLocation);
static block_composition *
-Precomp_Init(project_data *File, memory *Memory);
+Precomp_Init(project_data *File, memory *Memory, block_composition *DupeComp = NULL);
static uint32
Effect_Init(project_state *State, memory *Memory, uint32 EffectEntryIndex, int EffectCount);
@@ -123,7 +123,7 @@ Property_IsGraphSelected(memory *Memory, property_channel *Property, uint16 *Arr
static void
Project_Layer_Duplicate(project_data *File, project_state *State, memory *Memory,
- sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, v2 Offset, bool32 FakeOnly);
+ sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, v2 Offset, bool32 FakeOnly, bool32 NewPrecomp);
static void
Project_ShapeLayer_New(project_data *File, project_state *State, memory *Memory);
@@ -222,7 +222,7 @@ static bool32 ImGui_TestBoxSelection_Point(ImVec2 Pos, ImGuiIO &io, bool32 *Test
static void
Layer_TestBoxSelect(memory *Memory, project_state *State, ui *UI, sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray,
- uint16 PrincipalIndex, v2 MinPos, v2 MaxPos);
+ uint16 PrincipalIndex, layer_transforms ExtraT, v2 MinPos, v2 MaxPos);
void AV_IsFileSupported(char *filename, bool32 *IsVideo, bool32 *HasAudio);
@@ -376,7 +376,7 @@ Interact_Transform_Begin(project_data *File, memory *Memory, project_state *Stat
static void
Layer_RecursiveDeselect(memory *Memory, sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, uint16 TargetIndex, uint16 PrincipalIndex);
-static void
+static bool32
Main_InputTest(project_data *File, project_state *State, memory *Memory, sorted_file Sorted, ui *UI, SDL_Window *window, GLuint textureID);
static void
diff --git a/src/include/layer.h b/src/include/layer.h
index d354c89..074a274 100644
--- a/src/include/layer.h
+++ b/src/include/layer.h
@@ -24,7 +24,7 @@ static void
Layer_Select_RecurseUp(memory *Memory, project_state *State, int32 i, int16 RecursionIdx[MAX_PRECOMP_RECURSIONS], uint32 Recursions);
static void
-Layer_DeselectAll(project_data *File, project_state *State, memory *Memory);
+Layer_DeselectAll(project_data *File, project_state *State, memory *Memory, bool32 AllowComp = 0);
static bool32
Layer_LoopChannels(project_state *State, memory *Memory, sorted_property_array **SortedProperty, uint16 **SortedKeyframe, block_layer *Layer,
diff --git a/src/include/main.h b/src/include/main.h
index 0ee8511..9c1da89 100644
--- a/src/include/main.h
+++ b/src/include/main.h
@@ -465,6 +465,7 @@ struct project_state
{
bool32 UpdateKeyframes = 0;
bool32 UpdateFrame = 1; // only refreshes frame; set UpdateKeyframes to update animation
+ bool32 UpdateScreen = 1; // refreshes entire UI; influenced by raw key/mouse input
bool32 DebugDisableCache = 1;
// bad
@@ -743,6 +744,10 @@ struct block_layer {
bool32 IsVisible;
bool32 IsLocked;
+ // Valid values this can be:
+ // 0x01 - standard select
+ // 0x02 - precomp layer
+ // 0x04 - transient box selection state when shift is held
bool32 IsSelected;
bool32 IsAdjustment;