From 7cfb7ce652d1c13ab72392d95dc93d967bf505fb Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Sun, 14 Aug 2022 12:38:08 -0400 Subject: concave masking; software anti aliasing --- my_imgui_widgets.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'my_imgui_widgets.cpp') diff --git a/my_imgui_widgets.cpp b/my_imgui_widgets.cpp index e334f63..656804d 100644 --- a/my_imgui_widgets.cpp +++ b/my_imgui_widgets.cpp @@ -597,6 +597,14 @@ ImGui_Viewport(project_data File, project_state *State, ui *UI, comp_buffer Comp } */ + ImGui::OpenPopupOnItemClick("context", ImGuiPopupFlags_MouseButtonMiddle); + if (ImGui::BeginPopup("context")) { + if (ImGui::MenuItem("Scalar", NULL, false, InstructionMode != instruction_mode_scalar)) { InstructionMode = instruction_mode_scalar; State->UpdateFrame = true; } + if (ImGui::MenuItem("SSE", NULL, false, InstructionMode != instruction_mode_sse)) { InstructionMode = instruction_mode_sse; State->UpdateFrame = true; } + if (ImGui::MenuItem("AVX2", NULL, false, InstructionMode != instruction_mode_avx)) { InstructionMode = instruction_mode_avx; State->UpdateFrame = true; } + ImGui::EndPopup(); + } + if (IsHovered && IsActivated && ImGui::IsMouseDown(ImGuiMouseButton_Left)) { // Point to zoom in on if Z is held @@ -643,15 +651,6 @@ ImGui_Viewport(project_data File, project_state *State, ui *UI, comp_buffer Comp } - ImGui::OpenPopupOnItemClick("context", ImGuiPopupFlags_MouseButtonMiddle); - if (ImGui::BeginPopup("context")) { - if (ImGui::MenuItem("Scalar", NULL, false, InstructionMode != instruction_mode_scalar)) { InstructionMode = instruction_mode_scalar; State->UpdateFrame = true; } - if (ImGui::MenuItem("SSE", NULL, false, InstructionMode != instruction_mode_sse)) { InstructionMode = instruction_mode_sse; State->UpdateFrame = true; } - if (ImGui::MenuItem("AVX2", NULL, false, InstructionMode != instruction_mode_avx)) { InstructionMode = instruction_mode_avx; State->UpdateFrame = true; } - ImGui::EndPopup(); - } - - ImGui::End(); } -- cgit v1.2.3