summaryrefslogtreecommitdiff
path: root/src/imgui_ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui_ui.cpp')
-rw-r--r--src/imgui_ui.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/imgui_ui.cpp b/src/imgui_ui.cpp
index 817fc1d..57d3f79 100644
--- a/src/imgui_ui.cpp
+++ b/src/imgui_ui.cpp
@@ -381,6 +381,7 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->Frame_Current = ((State->Frame_Current - 1) < 0) ? 0 : State->Frame_Current - 1;
State->UpdateFrame = true;
State->UpdateKeyframes = true;
+ State->Interact_Transform = {};
if (State->UncommitedKeyframe) {
Memory->PurgeCache = true;
State->UncommitedKeyframe = false;
@@ -392,6 +393,7 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
State->Frame_Current = ((State->Frame_Current + 1) >= MainComp->Frame_Count) ? 0 : State->Frame_Current + 1;
State->UpdateFrame = true;
State->UpdateKeyframes = true;
+ State->Interact_Transform = {};
if (State->UncommitedKeyframe) {
Memory->PurgeCache = true;
State->UncommitedKeyframe = false;
@@ -586,7 +588,7 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
int h = 0, c = 0, i = 0;
while (Block_Loop(Memory, F_Layers, File->Layer_Count, &h, &c, &i)) {
block_layer *Layer = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, i);
- if ((Layer->IsSelected & 0x01) && Layer->IsPrecomp) {
+ if (((Layer->IsSelected & 0x01) || (Layer->IsSelected & 0x02)) && Layer->IsPrecomp) {
Layer->Precomp_Toggled ^= 1;
}
}
@@ -594,7 +596,15 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me
if (ImGui::IsKeyPressed(ImGuiKey_Delete))
{
- State->HotkeyInput = hotkey_deletelayer;
+ Bezier_Delete_Selected(File, State, Memory,
+ Sorted.LayerArray, Sorted.CompArray,
+ Sorted.PropertyStart, Sorted.PropertyArray);
+#if 0
+ if (State->FocusedWindow == focus_timeline) {
+ } else {
+ State->HotkeyInput = hotkey_deletelayer;
+ }
+#endif
}
if (io.KeyShift && ImGui::IsKeyPressed(ImGuiKey_Slash))
@@ -704,6 +714,18 @@ ImGui_Menu(project_data *File, project_state *State, ui *UI, memory *Memory, ImG
}
if (ImGui::BeginMenu("Layer"))
{
+#if WINDOWS
+#else
+ if (ImGui::BeginMenu("Import sources from directory"))
+ {
+ ImGui::InputText("Path to directory", State->DummyName2, 512);
+ if (ImGui::IsItemDeactivated() && ImGui::IsKeyPressed(ImGuiKey_Enter)) {
+ File_LoadDirectory(File, State, Memory, State->DummyName2);
+ State->UpdateFrame = true;
+ }
+ ImGui::EndMenu();
+ }
+#endif
if (ImGui::BeginMenu("Import source from file"))
{
ImGui::InputText("Path to image", State->DummyName2, 512);