Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
- Increased note blocks roundness
- Note blocks roundness can be personalized in the settings window
- Added black border on note blocks when glowing effect is turned off to improve notes separation
- Pan button is now middle mouse when in edit mode to avoid conflict with right mouse button
- Minor changes
  • Loading branch information
ImAxel0 committed Jun 16, 2024
1 parent 51eb467 commit ea2bb3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Openthesia/ScreenCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ScreenCanvas
private static bool _isRectMode;
private static bool _isRightRect;
private static bool _isHoveringTextBtn;
private static bool _isProgressBarHovered;
private static float _panVelocity;

private static float _fallSpeed = 2f;
Expand Down Expand Up @@ -307,7 +308,7 @@ private static void DrawPlaybackNotes()
}
}

if (IsEditMode)
if (IsEditMode && !_isProgressBarHovered)
{
if (ImGui.GetIO().KeyCtrl && ImGui.IsMouseDown(ImGuiMouseButton.Left) && !_isRectMode)
{
Expand Down Expand Up @@ -768,14 +769,15 @@ public static void RenderScreen(bool playMode = false)
ImGuiTheme.Style.Colors[(int)ImGuiCol.SliderGrab] = Settings.R_HandColor;
ImGuiTheme.Style.Colors[(int)ImGuiCol.SliderGrabActive] = Settings.R_HandColor;

if (ImGui.SliderFloat("##Progress slider", ref MidiPlayer.Seconds, 0, (float)MidiFileData.MidiFile.GetDuration<MetricTimeSpan>().TotalSeconds, "%.1f",
if (ImGui.SliderFloat("##Progress slider", ref MidiPlayer.Seconds, 0, (float)MidiFileData.MidiFile.GetDuration<MetricTimeSpan>().TotalSeconds, "%.1f",
ImGuiSliderFlags.NoRoundToFormat | ImGuiSliderFlags.AlwaysClamp | ImGuiSliderFlags.NoInput))
{
long ms = (long)(MidiPlayer.Seconds * 1000000);
MidiPlayer.Playback.MoveToTime(new MetricTimeSpan(ms));
MidiPlayer.Timer = MidiPlayer.Seconds * 100 * _fallSpeed;
}
if (ImGui.IsItemHovered() && ImGui.IsMouseDragging(ImGuiMouseButton.Left))
_isProgressBarHovered = ImGui.IsItemHovered();
if (_isProgressBarHovered && ImGui.IsMouseDragging(ImGuiMouseButton.Left))
{
ImGui.SetMouseCursor(ImGuiMouseCursor.ResizeEW);
}
Expand Down
2 changes: 1 addition & 1 deletion Openthesia/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class Settings
private static bool _fpsCounter;
public static bool FpsCounter { get { return _fpsCounter; } }

private static int _noteRoundness = 5;
private static int _noteRoundness = 7;
public static int NoteRoundness { get { return _noteRoundness; } }

public static Themes Theme { get; private set; } = Themes.Sky;
Expand Down

0 comments on commit ea2bb3d

Please sign in to comment.