Skip to content

Commit

Permalink
hid left controls when top bar isn't locked
Browse files Browse the repository at this point in the history
  • Loading branch information
ImAxel0 committed May 27, 2024
1 parent 32fcc99 commit 53930bc
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions Openthesia/ScreenCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -764,41 +764,40 @@ public static void RenderScreen(bool playMode = false)
ImGui.EndCombo();
}
}
}
}

ImGui.PushFont(FontController.Font16_Icon16);
ImGui.SetCursorScreenPos(new(25, CanvasPos.Y + 50));
if (ImGui.Button(FontAwesome6.ArrowLeftLong, new(100, 50)) || ImGui.IsKeyPressed(ImGuiKey.Escape, false))
{
MidiPlayer.Playback?.Stop();
MidiPlayer.Playback?.MoveToStart();
MidiPlayer.IsTimerRunning = false;
MidiPlayer.Timer = 0;
SetLearningMode(false);
var route = playMode ? Router.Routes.Home : Router.Routes.MidiList;
Router.SetRoute(route);
}
ImGui.PopFont();

var neonIcon = Settings.NeonFx ? FontAwesome6.Lightbulb : FontAwesome6.PowerOff;
ImGui.PushFont(FontController.Font16_Icon16);
ImGui.SetCursorScreenPos(new(25, CanvasPos.Y + 50));
if (ImGui.Button(FontAwesome6.ArrowLeftLong, new(100, 50)) || ImGui.IsKeyPressed(ImGuiKey.Escape, false))
{
MidiPlayer.Playback?.Stop();
MidiPlayer.Playback?.MoveToStart();
MidiPlayer.IsTimerRunning = false;
MidiPlayer.Timer = 0;
SetLearningMode(false);
var route = playMode ? Router.Routes.Home : Router.Routes.MidiList;
Router.SetRoute(route);
}
ImGui.PopFont();

ImGui.PushFont(FontController.Font16_Icon16);
ImGui.SetCursorScreenPos(new(25, CanvasPos.Y + 110));
if (ImGui.Button(neonIcon, new(35, 35)))
{
Settings.SetNeonFx(!Settings.NeonFx);
}
ImGui.PopFont();
var neonIcon = Settings.NeonFx ? FontAwesome6.Lightbulb : FontAwesome6.PowerOff;

ImGui.SetCursorScreenPos(new(70, CanvasPos.Y + 110));
ImGui.ColorEdit4("Left Hand Color", ref Settings.L_HandColor, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.NoLabel
| ImGuiColorEditFlags.NoDragDrop | ImGuiColorEditFlags.NoOptions | ImGuiColorEditFlags.NoAlpha);
ImGui.PushFont(FontController.Font16_Icon16);
ImGui.SetCursorScreenPos(new(25, CanvasPos.Y + 110));
if (ImGui.Button(neonIcon, new(35, 35)))
{
Settings.SetNeonFx(!Settings.NeonFx);
}
ImGui.PopFont();

ImGui.SetCursorScreenPos(new(115, CanvasPos.Y + 110));
ImGui.ColorEdit4("Right Hand Color", ref Settings.R_HandColor, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.NoLabel
| ImGuiColorEditFlags.NoDragDrop | ImGuiColorEditFlags.NoOptions | ImGuiColorEditFlags.NoAlpha);
ImGui.SetCursorScreenPos(new(70, CanvasPos.Y + 110));
ImGui.ColorEdit4("Left Hand Color", ref Settings.L_HandColor, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.NoLabel
| ImGuiColorEditFlags.NoDragDrop | ImGuiColorEditFlags.NoOptions | ImGuiColorEditFlags.NoAlpha);

ImGui.SetCursorScreenPos(new(115, CanvasPos.Y + 110));
ImGui.ColorEdit4("Right Hand Color", ref Settings.R_HandColor, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.NoLabel
| ImGuiColorEditFlags.NoDragDrop | ImGuiColorEditFlags.NoOptions | ImGuiColorEditFlags.NoAlpha);
}
}
ImGui.PopFont();
}
}

0 comments on commit 53930bc

Please sign in to comment.