diff options
Diffstat (limited to 'my_imgui_widgets.cpp')
-rw-r--r-- | my_imgui_widgets.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/my_imgui_widgets.cpp b/my_imgui_widgets.cpp index ea2e314..ac0739e 100644 --- a/my_imgui_widgets.cpp +++ b/my_imgui_widgets.cpp @@ -111,7 +111,6 @@ static void ImGui_DebugUndoTree(project_data *File, memory *Memory) { ImGui::SetNextWindowSize(ImVec2(200, 800)); - ImGui::SetNextWindowPos(ImVec2(2498, 10)); ImGui::Begin("undotree"); for (int i = 0; i < Memory->Action.NumberOfEntries; i++) { action_entry Entry = Memory->Action.Entry[i]; @@ -802,7 +801,7 @@ ImGui_File(project_data *File, project_state *State, memory *Memory, ui *UI, ImG ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); if (State->DemoButton) { if (ImGui::Button("Generate demo scene")) { - // CreateDemoScene(File, Memory); + CreateDemoScene(File, State, Memory); State->UpdateKeyframes = true; State->UpdateFrame = true; State->DemoButton = false; @@ -885,6 +884,7 @@ ImGui_EffectsPanel(project_data *File, project_state *State, memory *Memory, ui if (State->filter.PassFilter(EffectList[i].Name)) { if (EffectSel == p && State->MostRecentlySelectedLayer != -1) { AddEffect(File->Layer[State->MostRecentlySelectedLayer], Memory, i); + State->UpdateFrame = true; } p++; } @@ -902,6 +902,7 @@ ImGui_EffectsPanel(project_data *File, project_state *State, memory *Memory, ui if (ImGui::IsItemClicked()) { if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left) && State->MostRecentlySelectedLayer != -1) { AddEffect(File->Layer[State->MostRecentlySelectedLayer], Memory, i); + State->UpdateFrame = true; } } p++; @@ -999,9 +1000,9 @@ ImGui_Timeline(project_data *File, project_state *State, memory *Memory, ui *UI, UI->DraggingKeyframeThreshold += io.MouseDelta.x; if (abs(UI->DraggingKeyframeThreshold) >= UI->TimelineZoom) { int16 Increment = UI->DraggingKeyframeThreshold/UI->TimelineZoom; - if (File->CurrentFrame <= 0 && Increment < File->StartFrame) + if (File->CurrentFrame + Increment <= 0) File->CurrentFrame = 0; - else if (File->CurrentFrame >= File->EndFrame && Increment > File->EndFrame) { + else if (File->CurrentFrame + Increment >= File->EndFrame) { File->CurrentFrame = File->EndFrame; } else { File->CurrentFrame += Increment; |