diff options
Diffstat (limited to 'src/imgui_ui.cpp')
-rw-r--r-- | src/imgui_ui.cpp | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/src/imgui_ui.cpp b/src/imgui_ui.cpp index 84e2b91..5d0f65d 100644 --- a/src/imgui_ui.cpp +++ b/src/imgui_ui.cpp @@ -9,7 +9,6 @@ ImGui_File(project_data *File, project_state *State, memory *Memory, ImGuiIO io, { ImGui::Begin("Files"); ImGui::Text("%s: %hu", "Layers", File->Layer_Count); - ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); if (ImGui::IsKeyPressed(ImGuiKey_Backspace)) { @@ -90,18 +89,6 @@ ImGui_File(project_data *File, project_state *State, memory *Memory, ImGuiIO io, // if (!ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) // Source_DeselectAll(File, Memory); -#if DEBUG - - for (int i = 0; i < Debug.Temp.WatchedProperties; i++) { - if (Debug.Temp.DebugPropertyType[i] == d_float) { - ImGui::Text("%s: %f", Debug.Temp.String[i], Debug.Temp.Val[i].f); - } else if (Debug.Temp.DebugPropertyType[i] == d_int) { - ImGui::Text("%s: %i", Debug.Temp.String[i], Debug.Temp.Val[i].i); - } else if (Debug.Temp.DebugPropertyType[i] == d_uint) { - ImGui::Text("%s: %u", Debug.Temp.String[i], Debug.Temp.Val[i].u); - } - } -#endif ImGui::End(); } @@ -144,6 +131,15 @@ ImGui_ColorPanel(project_data *File, project_state *State, ui *UI, memory *Memor UI->AltColor = Temp; } + if (State->Tool == tool_default) { + if (ImGui::MenuItem("All", NULL, (State->SelectionMode == 0))) { + State->SelectionMode = 0; + } + if (ImGui::MenuItem("Exclude precomps", NULL, (State->SelectionMode == 1))) { + State->SelectionMode = 1; + } + } + if (State->Tool == tool_brush) { real32 BrushSizeMin = 0; real32 BrushSizeMax = 1024; @@ -167,6 +163,20 @@ ImGui_ColorPanel(project_data *File, project_state *State, ui *UI, memory *Memor // ImGui_Opt_Shape(&State->Pen.Opt); } +#if DEBUG + + for (int i = 0; i < Debug.Temp.WatchedProperties; i++) { + if (Debug.Temp.DebugPropertyType[i] == d_float) { + ImGui::Text("%s: %f", Debug.Temp.String[i], Debug.Temp.Val[i].f); + } else if (Debug.Temp.DebugPropertyType[i] == d_int) { + ImGui::Text("%s: %i", Debug.Temp.String[i], Debug.Temp.Val[i].i); + } else if (Debug.Temp.DebugPropertyType[i] == d_uint) { + ImGui::Text("%s: %u", Debug.Temp.String[i], Debug.Temp.Val[i].u); + } + } + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); +#endif + ImGui::End(); } @@ -395,6 +405,9 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me } // if (ImGui::IsKeyPressed(ImGuiKey_RightBracket)) { // } + if (ImGui::IsKeyPressed(ImGuiKey_GraveAccent)) { + Layer_ApplyPreviousSelection(File, State, Memory); + } if (ImGui::IsKeyPressed(ImGuiKey_X)) { if (State->TimelineMode == timeline_mode_graph && State->Interact_Active == interact_type_keyframe_move) { @@ -683,6 +696,8 @@ ImGui_Menu(project_data *File, project_state *State, ui *UI, memory *Memory, ImG UI->Mode = 0; if (ImGui::Selectable("Vector view", UI->Mode == 1)) UI->Mode = 1; + if (ImGui::MenuItem("Clip viewport canvas", NULL, State->ViewportEnabled == 0)) + State->ViewportEnabled ^= 1; #if STABLE if (ImGui::Selectable("Stable Diffusion tools", UI->StableEnabled)) UI->StableEnabled ^= 1; |