Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Jul 24, 2023
1 parent e665fc5 commit 904c52f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public SentakkiHitObjectComposer(SentakkiRuleset ruleset)

private DrawableRulesetDependencies dependencies = null!;


[Cached]
private SlideEditorToolboxGroup slideEditorToolboxGroup = new SlideEditorToolboxGroup();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ private void unmergeSlides(List<Slide> slides)
var slideInfo = slide.SlideInfoList[i];
var cpi = EditorBeatmap.ControlPointInfo;
double beatLengthOriginal = cpi.TimingPointAt(slide.StartTime).BeatLength;
double newSt = slide.StartTime + (slideInfo.ShootDelay - 1) * beatLengthOriginal;
double newSt = slide.StartTime + ((slideInfo.ShootDelay - 1) * beatLengthOriginal);

slideInfo.ShootDelay = 1;
slideInfo.Duration -= newSt - slide.Duration;
Expand Down
11 changes: 3 additions & 8 deletions osu.Game.Rulesets.Sentakki/Edit/SlideEditorToolboxGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using osuTK.Input;
using System;


namespace osu.Game.Rulesets.Sentakki.Edit;

[Cached]
Expand Down Expand Up @@ -71,7 +70,7 @@ public void RequestLaneChange(int newLane)

for (int i = 0; i < 8; ++i)
{
var newPart = new SlideBodyPart(shapeBindable.Value, (newLane + i * rotationFactor).NormalizePath(), mirrored.Value);
var newPart = new SlideBodyPart(shapeBindable.Value, (newLane + (i * rotationFactor)).NormalizePath(), mirrored.Value);

if (SlidePaths.CheckSlideValidity(newPart))
{
Expand All @@ -82,7 +81,6 @@ public void RequestLaneChange(int newLane)
}
}


protected override bool OnKeyDown(KeyDownEvent e)
{
switch (e.Key)
Expand All @@ -92,7 +90,7 @@ protected override bool OnKeyDown(KeyDownEvent e)
break;

case Key.Minus:
shootDelay.Value = Math.Max(0, shootDelay.Value - 1f / beatSnapProvider.BeatDivisor);
shootDelay.Value = Math.Max(0, shootDelay.Value - (1f / beatSnapProvider.BeatDivisor));
break;

case Key.Number0:
Expand Down Expand Up @@ -137,11 +135,8 @@ public ShootDelayCounter() : base("Shoot delay", @"{0:0.##} beats")
{
}



protected override void OnLeftButtonPressed() => Current.Value = Math.Max(0, Current.Value - 1f / beatSnapProvider.BeatDivisor);
protected override void OnLeftButtonPressed() => Current.Value = Math.Max(0, Current.Value - (1f / beatSnapProvider.BeatDivisor));

protected override void OnRightButtonPressed() => Current.Value += 1f / beatSnapProvider.BeatDivisor;
}

}
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Sentakki/Edit/Toolbox/ExpandableCheckbox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using osuTK;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
Expand All @@ -8,7 +7,6 @@
using osu.Game.Graphics.Sprites;
using osu.Framework.Allocation;
using osu.Game.Graphics.UserInterface;
using osu.Framework.Input.Events;

namespace osu.Game.Rulesets.Sentakki.Edit.Toolbox;
public partial class ExpandableCheckbox : CompositeDrawable, IExpandable, IHasCurrentValue<bool>
Expand Down

0 comments on commit 904c52f

Please sign in to comment.