Skip to content

Commit

Permalink
fix repeat sliders half
Browse files Browse the repository at this point in the history
  • Loading branch information
OliBomby committed Dec 20, 2023
1 parent 3aaf0b3 commit 66f4dcc
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ private void updateCirclePieceColour()
{
Color4 colour = colours.Yellow;

if (IsHovered)
if (IsHovered && Slider.RepeatCount % 2 == 0)
colour = colour.Lighten(1);

CirclePiece.Colour = colour;
}

protected override bool OnDragStart(DragStartEvent e)
{
if (e.Button == MouseButton.Right || !inputManager.CurrentState.Keyboard.ShiftPressed)
// Disable dragging if the slider has an uneven number of repeats because the slider tail will be on the wrong side of the path.
if (e.Button == MouseButton.Right || !inputManager.CurrentState.Keyboard.ShiftPressed || Slider.RepeatCount % 2 == 1)
return false;

isDragging = true;
Expand Down

0 comments on commit 66f4dcc

Please sign in to comment.