Skip to content

Commit

Permalink
Changed anchor to centre for Hit Circles and Judgements
Browse files Browse the repository at this point in the history
Fixed issue #4.
  • Loading branch information
goodtrailer committed Apr 16, 2021
1 parent eb4209d commit ffe65e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void load(TextureStore textures)

private void updatePosition()
{
Vector2[] positions = PositionExtensions.GetPositions(ScreenCenterDistanceBindable.Value, GapBindable.Value, true, Anchor.TopLeft);
Vector2[] positions = PositionExtensions.GetPositions(ScreenCenterDistanceBindable.Value, GapBindable.Value, true, Anchor.Centre);
Position = positions[(int)ButtonBindable.Value];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public DrawableSoyokazeHitObject(SoyokazeHitObject hitObject)
{
Alpha = 1;
Origin = Anchor.Centre;
Anchor = Anchor.Centre;
}

[BackgroundDependencyLoader]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ public DrawableSoyokazeJudgement(JudgementResult result, DrawableHitObject drawa
: base(result, drawableObject)
{
Origin = Anchor.Centre;
Anchor = Anchor.Centre;

SoyokazeAction button = (drawableObject as DrawableSoyokazeHitObject)?.ButtonBindable.Value ?? default;
int screenCenterDistance = configManager.Get<int>(SoyokazeConfig.JudgementScreenCenterDistance);
int gap = configManager.Get<int>(SoyokazeConfig.JudgementGap);

Vector2[] positions = PositionExtensions.GetPositions(screenCenterDistance, gap, true, Anchor.TopLeft);
Vector2[] positions = PositionExtensions.GetPositions(screenCenterDistance, gap, true, Anchor.Centre);
Position = positions[(int)button];
}

Expand Down

0 comments on commit ffe65e1

Please sign in to comment.