diff options
Diffstat (limited to 'src/imgui_ui.cpp')
-rw-r--r-- | src/imgui_ui.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/imgui_ui.cpp b/src/imgui_ui.cpp index 5d0f65d..5d8b319 100644 --- a/src/imgui_ui.cpp +++ b/src/imgui_ui.cpp @@ -140,6 +140,15 @@ ImGui_ColorPanel(project_data *File, project_state *State, ui *UI, memory *Memor } } + if (State->Tool == tool_rectangle) { + if (ImGui::MenuItem("Rect", NULL, (State->ShapeMode == 0))) { + State->ShapeMode = 0; + } + if (ImGui::MenuItem("Ellipse", NULL, (State->ShapeMode == 1))) { + State->ShapeMode = 1; + } + } + if (State->Tool == tool_brush) { real32 BrushSizeMin = 0; real32 BrushSizeMax = 1024; @@ -449,6 +458,9 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me State->Interact_Modifier = 0; } } + if (ImGui::IsKeyPressed(ImGuiKey_A)) { + State->Tool = tool_default_pointmove; + } if (ImGui::IsKeyPressed(ImGuiKey_V)) { State->Tool = tool_default; } @@ -518,9 +530,17 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me } } } else if (State->FocusedWindow == focus_viewport) { - if (ImGui::IsKeyPressed(ImGuiKey_T)) { - Interact_Transform_Begin(File, Memory, State, io.MousePos, Sorted.CompArray, Sorted.LayerArray); - State->Tool = tool_default; + if (ImGui::IsKeyPressed(ImGuiKey_S)) { + State->Interact_Offset[1] = SDL_GetPerformanceCounter(); + State->Interact_Offset[2] = io.MousePos.x; + State->Interact_Offset[3] = io.MousePos.y; + State->Interact_Active = interact_type_viewport_transform; + } + if (ImGui::IsKeyPressed(ImGuiKey_R)) { + State->Interact_Offset[1] = SDL_GetPerformanceCounter(); + State->Interact_Offset[2] = io.MousePos.x; + State->Interact_Offset[3] = io.MousePos.y; + State->Interact_Active = interact_type_viewport_transform; } } } |