Commit Graph

697 Commits

Author SHA1 Message Date
9c4604e3c5 Add example checks 2021-04-07 14:36:53 +02:00
0343ef7f14 Add ruleset-specific checker 2021-04-07 14:36:43 +02:00
7e47922fb7 Merge branch 'master' into circular-arc-freeze 2021-04-01 17:09:45 +02:00
5022a78e80 Check current point instead of start point
Since each control point will call this when the path updates, the previous would correct the start segment 3 times instead of just once.

This fixes that.
2021-03-31 20:25:46 +02:00
75b8f2535f Move updatePathTypes to PathControlPointPiece
Here we produce a local bound copy of the path version, and bind it to update the path type.

This way, if the path version updates (i.e. any control point changes type or position), we check that all control points have a well-defined path.

Additionally, if the control point piece is disposed of, the GB should also swoop up the subscription because of the local bound copy.
2021-03-31 20:09:56 +02:00
b82247aabe Add inline comments and use Vector2.Zero 2021-03-30 14:13:16 +09:00
eda45e0e28 Merge branch 'master' into scale-breaking-bounds 2021-03-30 14:05:19 +09:00
70d5b616f2 Add scaling path type recovery 2021-03-29 15:49:49 +02:00
17b16d4f89 Clarify purpose of getClampedScale() 2021-03-29 14:17:30 +02:00
1d99a63f17 Limit minimum size for single slider scaling 2021-03-29 14:16:27 +02:00
690debe507 Merge pull request #12030 from LeNitrous/editor-platform-clipboard-copy 2021-03-29 19:31:16 +09:00
9a02f3868c return a string instead 2021-03-29 17:29:05 +08:00
a50c4be8ab Add missing space 2021-03-26 17:41:36 +01:00
305c2e31cf Clarify todo comment 2021-03-26 16:53:17 +01:00
25ea60cb92 Remove return values from HandleScale submethods 2021-03-26 16:40:10 +01:00
5d272bef97 Remember ContolPoint positions instead of recalculating them 2021-03-26 16:31:04 +01:00
b8b7eb4c4b refactor logic to its own component and handle hit object to string conversion to its ruleset-specific composers 2021-03-26 15:25:20 +08:00
51f0477df4 Move bounding box logic to framework 2021-03-26 04:42:46 +01:00
ce9130ca50 Remove determinant limit
This has since been added into the framework through https://github.com/ppy/osu-framework/pull/4302
2021-03-25 17:38:55 +01:00
9df059b01d Add bounding box limit 2021-03-24 17:25:28 +01:00
e67ab3cca7 Change single slider scaling to a method that works 2021-03-24 12:24:11 +01:00
3d471d239f Clamp multi-object scale instead of cancelling it 2021-03-24 12:24:11 +01:00
def0e5c42e Fix off-by-one error in isQuadInBounds 2021-03-24 12:24:11 +01:00
e0240ab9d9 Increase exterior threshold 2021-03-24 05:55:34 +01:00
4ae3eaaac6 Move path type correction
This is better because `PathControlPointVisualizer` is local to the editor, meaning there is no chance that this could affect gameplay.
2021-03-24 03:02:19 +01:00
0bcd38e661 Simplify path type maintenance when dragging 2021-03-24 02:57:47 +01:00
5ee280f941 Update PointsInSegment when adding/removing points
There was a bug where if you created a slider, moved the last point, and then added a point such that it became a PerfectCurve, it would fail to recover after becoming a Bezier.

This fixes that.
2021-03-24 02:56:32 +01:00
067178e537 Maintain path type when dragging/placing 2021-03-22 15:59:06 +01:00
e67c759eef Mark control point visualiser as possibly-null 2021-03-19 22:44:31 +01:00
9634560d4b Fix control point visualiser crashing after deselections
`SliderSelectionBlueprint.OnDeselected()` would expire the
`ControlPointVisualiser` on deselection, leading to its removal from the
blueprint and eventual disposal, but still kept a separate reference to
said visualiser in another field.

This could lead to that stale reference to a disposed child getting read
in `ReceivePositionalInputAt()`, crashing quite a ways down over at the
framework side on futilely trying to compute the bounding box of a
drawable with no parent.
2021-03-19 21:40:22 +01:00
27c38db14d Add tooltips for slider path nodes which aren't inheriting 2021-03-19 16:58:08 +09:00
5f31304d05 Give each type of slider path type a unique colour to help visually distinguish them 2021-03-19 14:00:26 +09:00
877e19421b Refactor movement while scaling 2021-02-23 21:02:00 +01:00
2a4139a207 Refactor isQuadInBounds 2021-02-23 21:02:00 +01:00
71b30bdbbb Adjust tuple usage 2021-02-23 21:02:00 +01:00
3491021f72 Move moveSelection into HandleMovement 2021-02-23 21:02:00 +01:00
33985d9e7c Rewrite scaling bounds check to behave more intuively 2021-02-21 18:11:32 +01:00
2c6f92d12f Move bounds check from moveSelection to HandleMovement 2021-02-21 17:38:50 +01:00
562a4cefdb Simplify HandleScale by extracting methods 2021-02-21 12:12:32 +01:00
0b8009938a Prevent selection from breaking playfield bounds when scaling 2021-02-21 00:14:39 +01:00
cc4c5f72d8 Move logic to keep selection in bounds into it's own method 2021-02-21 00:14:39 +01:00
3aa3692ed4 Disable snaking out when tracking is disabled 2021-02-05 15:56:13 +09:00
95963f2fa2 Merge pull request #11526 from peppy/fix-editor-repeat-slider-adjustment
Fix sliders with an even number of repeats not allowing rotation/scale transforms
2021-01-18 18:56:25 +09:00
2f1d4bf51b Add missing braces 2021-01-18 17:13:47 +09:00
c79ab63743 Fix sliders with an even number of repeats not allowing rotation/scale transforms 2021-01-18 16:59:16 +09:00
02d2b2742b Fix selection box not updating with hitcircles/sliders far in the future or past 2021-01-18 16:57:36 +09:00
87176edca1 Fix crash when attempting to scale two hitobjects on the same axis 2020-12-22 12:52:57 +09:00
245be2c5ed Adjust namespace 2020-12-04 20:21:53 +09:00
be3fed3072 Merge pull request #11024 from peppy/fix-slider-point-drag-offset
Fix slider control point dragging not correctly accounting for drag deadzone
2020-12-02 11:10:06 +09:00
b256c54619 Scale slider control point display in line with circle size 2020-12-01 14:17:36 +09:00