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.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/my_imgui_widgets.cpp b/my_imgui_widgets.cpp
index 1190430..440694b 100644
--- a/my_imgui_widgets.cpp
+++ b/my_imgui_widgets.cpp
@@ -200,7 +200,7 @@ ImGui_Viewport(project_data File, project_state *State, ui *UI, pixel_buffer Com
// {
// Debug.ToggleRenders = true;
// }
- ImGui::OpenPopupOnItemClick("context", ImGuiPopupFlags_MouseButtonRight);
+ ImGui::OpenPopupOnItemClick("context", ImGuiPopupFlags_MouseButtonMiddle);
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; }
@@ -295,6 +295,15 @@ ImGui_File(project_data *File, project_state *State, memory *Memory, ui *UI, ImG
State->DemoButton = false;
}
}
+ if (State->GridButton) {
+ ImGui::SameLine();
+ if (ImGui::Button("Generate square grid")) {
+ CreateGrid(File, Memory);
+ State->UpdateKeyframes = true;
+ State->UpdateFrame = true;
+ State->GridButton = false;
+ }
+ }
for (int16 i = 0; i < File->NumberOfSources; i++) {
ImGui::PushID(i);
ImGui::InputText("##source", File->Source[i], STRING_SIZE);
@@ -932,14 +941,16 @@ ImGui_Timeline(project_data *File, project_state *State, memory *Memory, ui *UI,
if (IsRectTouching(WindowMinAbs, WindowMaxAbs, io.MousePos, io.MousePos + 1)) {
if (io.KeyCtrl && io.MouseWheel) {
- real32 ZoomAmount = io.MouseWheel*8;
+ real32 ZoomAmount = io.MouseWheel*16;
real32 LocalMousePos = ImGui::GetMousePos().x - TimelineStartingPos.x;
real32 ZoomRatio = LocalMousePos / UI->TimelineZoom;
UI->TimelineZoom += ZoomAmount;
UI->ScrollXOffset -= ZoomAmount*ZoomRatio;
+ } else if (io.KeyShift && io.MouseWheel) {
+ UI->ScrollXOffset += io.MouseWheel*16;
} else {
- UI->ScrollXOffset += io.MouseWheelH*8;
- UI->ScrollYOffset += io.MouseWheel*8;
+ UI->ScrollXOffset += io.MouseWheelH*16;
+ UI->ScrollYOffset += io.MouseWheel*16;
}
}
@@ -987,6 +998,9 @@ ImGui_ProcessInputs(project_data *File, project_state *State, pixel_buffer *Comp
if (ImGui::IsKeyPressed(ImGuiKey_A) && State->NumberOfSelectedLayers)
TransformsInteract(File, State, UI, sliding_anchorpoint);
+ if (ImGui::IsKeyPressed(ImGuiKey_1))
+ LoadTestFootage(File, State, Memory);
+
if (ImGui::IsKeyPressed(ImGuiKey_Delete))
{
switch (State->RecentSelectionType)
@@ -1010,11 +1024,6 @@ ImGui_ProcessInputs(project_data *File, project_state *State, pixel_buffer *Comp
}
#if DEBUG
- if (ImGui::IsKeyPressed(ImGuiKey_Z))
- {
- // SwitchBool(D);
- // State->UpdateFrame = true;
- }
if (ImGui::IsKeyPressed(ImGuiKey_M))
{
Debug.Markers[Debug.MarkerIndex] = File->CurrentFrame;