mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Use more lenient column bounds for checking active state
This commit is contained in:
parent
21377d2a4d
commit
921e8af3b0
@ -345,13 +345,13 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
// DrawWidth/DrawPosition do not include shear effects, and we want to know the full extents of the columns post-shear,
|
// DrawWidth/DrawPosition do not include shear effects, and we want to know the full extents of the columns post-shear,
|
||||||
// so we have to manually compensate.
|
// so we have to manually compensate.
|
||||||
var topLeft = column.ToSpaceOfOtherDrawable(new Vector2(-column.DrawHeight * SHEAR, 0), ScrollContent);
|
var topLeft = column.ToSpaceOfOtherDrawable(Vector2.Zero, ScrollContent);
|
||||||
var topRight = column.ToSpaceOfOtherDrawable(new Vector2(column.DrawWidth, 0), ScrollContent);
|
var bottomRight = column.ToSpaceOfOtherDrawable(new Vector2(column.DrawWidth - column.DrawHeight * SHEAR, 0), ScrollContent);
|
||||||
|
|
||||||
bool isCurrentlyVisible = Precision.AlmostBigger(topLeft.X, leftVisibleBound)
|
bool isCurrentlyVisible = Precision.AlmostBigger(topLeft.X, leftVisibleBound)
|
||||||
&& Precision.DefinitelyBigger(rightVisibleBound, topRight.X);
|
&& Precision.DefinitelyBigger(rightVisibleBound, bottomRight.X);
|
||||||
bool isBeingScrolledToward = Precision.AlmostBigger(topLeft.X, leftMovementBound)
|
bool isBeingScrolledToward = Precision.AlmostBigger(topLeft.X, leftMovementBound)
|
||||||
&& Precision.DefinitelyBigger(rightMovementBound, topRight.X);
|
&& Precision.DefinitelyBigger(rightMovementBound, bottomRight.X);
|
||||||
|
|
||||||
column.Active.Value = isCurrentlyVisible || isBeingScrolledToward;
|
column.Active.Value = isCurrentlyVisible || isBeingScrolledToward;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user