summaryrefslogtreecommitdiff
path: root/my_imgui_widgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'my_imgui_widgets.cpp')
-rw-r--r--my_imgui_widgets.cpp17
1 files changed, 8 insertions, 9 deletions
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();
}