From 83ce428d8bb5f4a762abf879adec076bc34cf36a Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Wed, 27 Jul 2022 11:00:45 -0400 Subject: full support for odd-dimension bitmaps and comps --- my_imgui_widgets.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'my_imgui_widgets.cpp') diff --git a/my_imgui_widgets.cpp b/my_imgui_widgets.cpp index c199aa4..1190430 100644 --- a/my_imgui_widgets.cpp +++ b/my_imgui_widgets.cpp @@ -196,6 +196,17 @@ ImGui_Viewport(project_data File, project_state *State, ui *UI, pixel_buffer Com UI->CompPos.x += io.MouseDelta.x; UI->CompPos.y += io.MouseDelta.y; } + // if (IsActive && ImGui::IsMouseDown(ImGuiMouseButton_Right)) + // { + // Debug.ToggleRenders = true; + // } + ImGui::OpenPopupOnItemClick("context", ImGuiPopupFlags_MouseButtonRight); + if (ImGui::BeginPopup("context")) { + if (ImGui::MenuItem("Scalar", NULL, false, InstructionMode != scalar_only)) { InstructionMode = scalar_only; } + if (ImGui::MenuItem("SSE", NULL, false, InstructionMode != sse_enabled)) { InstructionMode = sse_enabled; } + if (ImGui::MenuItem("AVX2", NULL, false, InstructionMode != avx_enabled)) { InstructionMode = avx_enabled; } + ImGui::EndPopup(); + } if (IsActive && ImGui::IsMouseDragging(ImGuiMouseButton_Left, -1.0f) && ImGui::IsKeyDown(ImGuiKey_Z)) { real32 Distance = io.MouseDelta.x + io.MouseDelta.y; @@ -999,10 +1010,11 @@ ImGui_ProcessInputs(project_data *File, project_state *State, pixel_buffer *Comp } #if DEBUG - if (ImGui::IsKeyPressed(ImGuiKey_E)) { - SwitchBool(AVXEnabled); - State->UpdateFrame = true; - } + if (ImGui::IsKeyPressed(ImGuiKey_Z)) + { + // SwitchBool(D); + // State->UpdateFrame = true; + } if (ImGui::IsKeyPressed(ImGuiKey_M)) { Debug.Markers[Debug.MarkerIndex] = File->CurrentFrame; -- cgit v1.2.3