From fffb3474ee0321d73a47db01dbc4b6b19670ddc5 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Mon, 13 Feb 2023 11:12:47 -0500 Subject: drag and drop file loading --- src/imgui_ui.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/imgui_ui.cpp') diff --git a/src/imgui_ui.cpp b/src/imgui_ui.cpp index 62fcb2a..817fc1d 100644 --- a/src/imgui_ui.cpp +++ b/src/imgui_ui.cpp @@ -530,6 +530,7 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me } } } else if (State->FocusedWindow == focus_viewport) { + /* if (ImGui::IsKeyPressed(ImGuiKey_S)) { State->Interact_Offset[1] = SDL_GetPerformanceCounter(); State->Interact_Offset[2] = io.MousePos.x; @@ -542,6 +543,7 @@ ImGui_ProcessInputs(project_data *File, project_state *State, ui *UI, memory *Me State->Interact_Offset[3] = io.MousePos.y; State->Interact_Active = interact_type_viewport_transform; } + */ } } if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { @@ -672,6 +674,9 @@ ImGui_Menu(project_data *File, project_state *State, ui *UI, memory *Memory, ImG { if (ImGui::BeginMenu("File")) { + if (ImGui::IsWindowFocused()) { + State->MenuFocused = 1; + } if (ImGui::MenuItem("Save", "Ctrl+S")) { if (State->Filename[0] == '\0') -- cgit v1.2.3