Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ImAxel0 committed May 29, 2024
1 parent 53930bc commit 8c95059
Showing 1 changed file with 36 additions and 33 deletions.
69 changes: 36 additions & 33 deletions Openthesia/ScreenCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,10 @@ public static void RenderScreen(bool playMode = false)

GetInputs();

var showTopBar = ImGui.IsMouseHoveringRect(Vector2.Zero, new(ImGui.GetIO().DisplaySize.X, 150));

if (playMode)
{
var showTopBar = ImGui.IsMouseHoveringRect(Vector2.Zero, new(ImGui.GetIO().DisplaySize.X, 150));

if (showTopBar || LockTopBar)
{
ImGui.SetNextWindowPos(new(ImGui.GetIO().DisplaySize.X / 2 - 85, CanvasPos.Y + 50));
Expand Down Expand Up @@ -657,8 +657,6 @@ public static void RenderScreen(bool playMode = false)
{
GetPlaybackInputs();

var showTopBar = ImGui.IsMouseHoveringRect(Vector2.Zero, new(ImGui.GetIO().DisplaySize.X, 150));

if (showTopBar || LockTopBar)
{
ImGui.SetNextItemWidth(ImGui.GetIO().DisplaySize.X);
Expand Down Expand Up @@ -763,41 +761,46 @@ 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();
if (showTopBar || LockTopBar)
{
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;
var neonIcon = Settings.NeonFx ? FontAwesome6.Lightbulb : FontAwesome6.PowerOff;

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.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(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(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.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 8c95059

Please sign in to comment.