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.cpp20
1 files changed, 16 insertions, 4 deletions
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;