1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 10:57:30 +08:00
Commit Graph

553 Commits

Author SHA1 Message Date
Naxess
be4520fe33 Fix index out of range possibility 2021-04-08 11:46:00 +02:00
Naxess
0341023d13 Improve UX of selecting PerfectCurve 2021-04-08 09:06:28 +02:00
Naxess
725edfcbf3 Add path type menu change method 2021-04-08 09:05:35 +02:00
Naxess
d6490899e2 Simplify slider path bindings
Adds a slight performance overhead, but solves the memory leak and makes the code much easier to follow.
2021-04-08 03:21:56 +02:00
Naxess
d1d56c636a Convert pathTypes to local variable
Not entirely sure what holds the reference to pathTypes now (the binding to`slider.Path.ControlPoints` maybe?), but this does seem to work still.
2021-04-08 01:43:06 +02:00
Naxess
b8ab1c7682 Track path type changes for PointsInSegment 2021-04-07 17:19:12 +02:00
Naxess
9c4604e3c5 Add example checks 2021-04-07 14:36:53 +02:00
Naxess
0343ef7f14 Add ruleset-specific checker 2021-04-07 14:36:43 +02:00
Naxess
7e47922fb7
Merge branch 'master' into circular-arc-freeze 2021-04-01 17:09:45 +02:00
Naxess
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
Naxess
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
Dean Herbert
b82247aabe Add inline comments and use Vector2.Zero 2021-03-30 14:13:16 +09:00
Dean Herbert
eda45e0e28 Merge branch 'master' into scale-breaking-bounds 2021-03-30 14:05:19 +09:00
Naxess
70d5b616f2 Add scaling path type recovery 2021-03-29 15:49:49 +02:00
Leon Gebler
17b16d4f89 Clarify purpose of getClampedScale() 2021-03-29 14:17:30 +02:00
Leon Gebler
1d99a63f17 Limit minimum size for single slider scaling 2021-03-29 14:16:27 +02:00
Dean Herbert
690debe507
Merge pull request #12030 from LeNitrous/editor-platform-clipboard-copy 2021-03-29 19:31:16 +09:00
Nathan Alo
9a02f3868c return a string instead 2021-03-29 17:29:05 +08:00
Leon Gebler
a50c4be8ab Add missing space 2021-03-26 17:41:36 +01:00
Leon Gebler
305c2e31cf Clarify todo comment 2021-03-26 16:53:17 +01:00
Leon Gebler
25ea60cb92 Remove return values from HandleScale submethods 2021-03-26 16:40:10 +01:00
Leon Gebler
5d272bef97 Remember ContolPoint positions instead of recalculating them 2021-03-26 16:31:04 +01:00
Nathan Alo
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
Naxess
51f0477df4 Move bounding box logic to framework 2021-03-26 04:42:46 +01:00
Naxess
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
Naxess
9df059b01d Add bounding box limit 2021-03-24 17:25:28 +01:00
Leon Gebler
e67ab3cca7 Change single slider scaling to a method that works 2021-03-24 12:24:11 +01:00
Leon Gebler
3d471d239f Clamp multi-object scale instead of cancelling it 2021-03-24 12:24:11 +01:00
Leon Gebler
def0e5c42e Fix off-by-one error in isQuadInBounds 2021-03-24 12:24:11 +01:00
Naxess
e0240ab9d9 Increase exterior threshold 2021-03-24 05:55:34 +01:00
Naxess
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
Naxess
0bcd38e661 Simplify path type maintenance when dragging 2021-03-24 02:57:47 +01:00
Naxess
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
Naxess
067178e537 Maintain path type when dragging/placing 2021-03-22 15:59:06 +01:00
Bartłomiej Dach
e67c759eef Mark control point visualiser as possibly-null 2021-03-19 22:44:31 +01:00
Bartłomiej Dach
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
Dean Herbert
27c38db14d Add tooltips for slider path nodes which aren't inheriting 2021-03-19 16:58:08 +09:00
Dean Herbert
5f31304d05 Give each type of slider path type a unique colour to help visually distinguish them 2021-03-19 14:00:26 +09:00
Leon Gebler
877e19421b Refactor movement while scaling 2021-02-23 21:02:00 +01:00
Leon Gebler
2a4139a207 Refactor isQuadInBounds 2021-02-23 21:02:00 +01:00
Leon Gebler
71b30bdbbb Adjust tuple usage 2021-02-23 21:02:00 +01:00
Leon Gebler
3491021f72 Move moveSelection into HandleMovement 2021-02-23 21:02:00 +01:00
Leon Gebler
33985d9e7c Rewrite scaling bounds check to behave more intuively 2021-02-21 18:11:32 +01:00
Leon Gebler
2c6f92d12f Move bounds check from moveSelection to HandleMovement 2021-02-21 17:38:50 +01:00
Leon Gebler
562a4cefdb Simplify HandleScale by extracting methods 2021-02-21 12:12:32 +01:00
Leon Gebler
0b8009938a Prevent selection from breaking playfield bounds when scaling 2021-02-21 00:14:39 +01:00
Leon Gebler
cc4c5f72d8 Move logic to keep selection in bounds into it's own method 2021-02-21 00:14:39 +01:00
smoogipoo
3aa3692ed4 Disable snaking out when tracking is disabled 2021-02-05 15:56:13 +09:00
Dan Balasescu
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
Dean Herbert
2f1d4bf51b Add missing braces 2021-01-18 17:13:47 +09:00
Dean Herbert
c79ab63743 Fix sliders with an even number of repeats not allowing rotation/scale transforms 2021-01-18 16:59:16 +09:00
Dean Herbert
02d2b2742b Fix selection box not updating with hitcircles/sliders far in the future or past 2021-01-18 16:57:36 +09:00
Dean Herbert
87176edca1 Fix crash when attempting to scale two hitobjects on the same axis 2020-12-22 12:52:57 +09:00
ekrctb
245be2c5ed Adjust namespace 2020-12-04 20:21:53 +09:00
Dan Balasescu
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
Dean Herbert
b256c54619 Scale slider control point display in line with circle size 2020-12-01 14:17:36 +09:00
Dean Herbert
c8c1848bb8 Fix slider control point dragging not correctly accounting for drag deadzone 2020-12-01 13:46:30 +09:00
Dean Herbert
9811c46e35 Rename application method to better describe what it actually does 2020-11-26 19:16:18 +09:00
Dan Balasescu
aad6cf4ad3
Merge branch 'master' into editor-multiple-object-positional-snap 2020-11-26 17:06:47 +09:00
Dean Herbert
c9a41f9dae Make all objects in selection candidates for spatial snapping
Closes #10898.
2020-11-24 17:35:54 +09:00
Dan Balasescu
87ce8a53ff
Merge branch 'master' into on-drawable-hitobject-added 2020-11-24 16:09:57 +09:00
ekrctb
5247ebaf53 Restore accidently removed comment 2020-11-22 18:51:16 +09:00
ekrctb
295ca38cda Merge remote-tracking branch 'origin/master' into on-drawable-hitobject-added 2020-11-21 15:25:16 +09:00
ekrctb
4345d8dcb6 Event -> virtual method 2020-11-21 15:20:33 +09:00
ekrctb
82aefa3868 Rework and rename to OnNewDrawableHitObject.
The semantics is changed and hopefully more clear.
2020-11-21 00:27:19 +09:00
smoogipoo
96abee3fde Fix silent NRE in slider selection blueprint 2020-11-20 22:43:10 +09:00
ekrctb
cd16a3fa61 Use event instead of using custom pools (osu) 2020-11-20 17:56:47 +09:00
Dean Herbert
b547abafb2 Fix slider right click context menus not being shown outside the valid playfield area
Closes #10816.
2020-11-20 13:46:23 +09:00
kamp
2d66423fbd Simplify inequality 2020-11-17 23:04:38 +01:00
kamp
c8fb49d540 Apply suggestions and remove redundant updateConnectingPath call 2020-11-17 22:23:46 +01:00
kamp
c6618f08aa Fix slider control point connections not being updated 2020-11-16 21:26:08 +01:00
kamp
268bbcf77d Clamp selection movement instead of refusing to move on borders 2020-11-15 14:22:46 +01:00
Dean Herbert
deea75b2e9 Fix typo in comment 2020-11-14 18:05:51 +09:00
Dean Herbert
7ac4d2c4be Move "drawable" to first prefix 2020-11-14 18:05:30 +09:00
Dean Herbert
90f37ff4ab Rejig namespaces 2020-11-14 18:04:59 +09:00
Dean Herbert
354e748e45
Merge branch 'master' into osu-hitobject-pooling-playfield 2020-11-14 15:44:00 +09:00
Bartłomiej Dach
3985fb1fa7
Merge branch 'master' into allow-reversing-spinners 2020-11-13 19:48:40 +01:00
smoogipoo
5b60f32c7f Move implementation into OsuPlayfield 2020-11-14 01:03:23 +09:00
smoogipoo
f7f70d41df Add osu! editor pooling support 2020-11-13 17:28:26 +09:00
smoogipoo
942ecde0e1 Merge branch 'master' into pooling-editor-support 2020-11-13 17:23:35 +09:00
smoogipoo
4ef2e9548c Pass HitObjectComposer to BlueprintContainer via ctor 2020-11-13 16:59:37 +09:00
kamp
66544544d3
Merge branch 'master' into allow-reversing-spinners 2020-11-13 00:40:49 +01:00
kamp
45ce6cc82d Allow spinners to be reversed 2020-11-13 00:36:47 +01:00
kamp
1439c0f392 Prevent SelectionBox handles from appearing when a stack of circles is selected 2020-11-12 23:19:29 +01:00
kamp
42c543472d Remove unnecessary null coalesce 2020-11-07 01:56:41 +01:00
kamp
b47a2a03d5 Fix nullref when quickdeleting slider that hasn't been selected yet 2020-11-07 01:53:14 +01:00
Dan Balasescu
f230250faf
Merge branch 'master' into editor-slider-control-point-quick-delete 2020-11-06 21:47:37 +09:00
Dean Herbert
3f24fabb57 Add change handler support for contorl point deletion 2020-11-05 15:05:43 +09:00
Dean Herbert
242ec1ca82 Don't override PathControlPointVisualiser's positional handling
It turns out it was relying on this to deselect control points on
clicking away from them.
2020-11-05 14:58:30 +09:00
Dean Herbert
eed9894d3a Remove usage of case-when (caught me off-gaurd) 2020-11-05 13:58:41 +09:00
smoogipoo
9a7fcadabc Use BDL for top-level osu! DHOs 2020-11-05 13:51:46 +09:00
Dean Herbert
9f333ac58a Add the ability to delete slider control points using shift+right click
Closes https://github.com/ppy/osu/issues/10672.

In two minds about how this should be implemented but went in this
direction initially. The other way would be to add local handling of
Shift-Right Click inside PathControlPointPiece (which is already doing
mouse handling itself).
2020-11-03 20:46:33 +09:00
Dean Herbert
267b399f9f Add some simple border styles 2020-10-20 13:59:03 +09:00
Bartłomiej Dach
7c388f1132 Move editor playfield border locally to osu! composer 2020-10-19 21:20:13 +02:00
Bartłomiej Dach
f41879ee7c Show current hit circle placement in timeline 2020-10-10 17:54:37 +02:00
Dean Herbert
681e88af40
Merge branch 'master' into editor-fix-button-states-after-paste 2020-10-09 20:51:09 +09:00
Dan Balasescu
ecfb7e94c5
Merge branch 'master' into fix-editor-batch-handling 2020-10-09 20:06:06 +09:00
Dan Balasescu
62690e4873
Merge pull request #10432 from peppy/editor-reverse-pattern
Add "reverse pattern" support to editor selection handler
2020-10-09 19:19:24 +09:00
Dean Herbert
3838f405dd Fix missed usages 2020-10-09 18:50:05 +09:00
Dean Herbert
a0af2eb6c8 Private protect setters 2020-10-09 16:54:43 +09:00
Dean Herbert
6b9e94ae93 Avoid retaining slider selection blueprints FBO backing textures after deselection 2020-10-09 14:05:00 +09:00
Dean Herbert
34d1439f8e Only update slider selection blueprints paths when visible 2020-10-09 14:04:26 +09:00
Dean Herbert
2a790c76d5 Add reverse implementation for osu! 2020-10-09 06:32:33 +09:00
Dean Herbert
afed832b19 Tidy up EditorBeatmap slightly 2020-10-08 18:06:49 +09:00
Dan Balasescu
6d50a1ed7d
Merge branch 'master' into osu-selection-flip-rotate-buttons 2020-10-05 19:17:33 +09:00
Dean Herbert
b6dc8bb2d3 Fix remaining manual degree-to-radian conversions 2020-10-01 18:10:05 +09:00
Dean Herbert
538973e394 Use float methods for math operations 2020-10-01 17:06:05 +09:00
Dean Herbert
983b693858 Add flip logic to OsuSelectionHandler 2020-10-01 16:24:50 +09:00
Dean Herbert
02f14ab4b0 Rename operation start/end to be more encompassing 2020-10-01 16:24:09 +09:00
Dean Herbert
7fad9ce34a Simplify HandleScale method 2020-09-30 15:20:25 +09:00
Dean Herbert
f1298bed79 Combine scale operations and tidy up scale drag handle construction 2020-09-30 15:08:56 +09:00
Dean Herbert
313b0d149f Refactor scale and rotation operations to share code better
Also adds support for scaling individual sliders.
2020-09-30 14:41:33 +09:00
Dean Herbert
39b55a85df Move a lot of the implementation to base SelectionHandler 2020-09-30 13:52:57 +09:00
Dean Herbert
99a3801267 Tidy up scale/rotation operation code 2020-09-30 13:02:05 +09:00
Dean Herbert
5ae6b2cf5b Fix syntax 2020-09-29 20:10:17 +09:00
Dean Herbert
a2e2cca396 Add proper change handler support 2020-09-29 20:08:56 +09:00
Dean Herbert
934db14e03 Add rotation support 2020-09-29 20:08:56 +09:00
Dean Herbert
33b24b6f46 Refactor to be able to get a quad for the current selection 2020-09-29 20:08:56 +09:00
Dean Herbert
0a10e40ce0 Add scaling support to osu! editor 2020-09-29 20:08:56 +09:00
Dan Balasescu
1b6ef60f36
Merge branch 'master' into editor-fix-slider-drag-after-snaking 2020-09-28 17:45:04 +09:00
Dean Herbert
63b5b8b841 Fix sliders not dragging correctly after snaking has begun
Closes #10278.
2020-09-28 17:33:00 +09:00
Dean Herbert
5237fa7bf2 Remove unused local in case statement 2020-09-28 16:37:54 +09:00
Dean Herbert
467a16bf75 Fix fade out extension logic (and make it generally look better for sliders) 2020-09-28 16:21:20 +09:00
Dean Herbert
346d14d40b Rename variables to match 2020-09-25 17:45:19 +09:00
Dean Herbert
22511c36c3 Ensure toggles are not instantiated more than once for safety 2020-09-25 17:43:09 +09:00
Dean Herbert
ae68dcd962 Add ternary toggle buttons to editor toolbox selection 2020-09-25 16:38:12 +09:00
Dean Herbert
0f8551e9ea Merge branch 'editor-ternary-states' into new-combo-toggle 2020-09-25 15:36:33 +09:00
Dean Herbert
bca774a0d4 Allow BlueprintContainer to specify toggles 2020-09-25 14:09:31 +09:00
Dean Herbert
d9e8ac6842 Add support for slider end snapping 2020-09-24 16:24:35 +09:00
Dean Herbert
44be0ab762 Add basic osu! object to object snapping 2020-09-24 16:24:35 +09:00
Dan Balasescu
625c146460
Merge pull request #10199 from peppy/fix-editor-binding-crash
Fix bindings not correctly being cleaned up in OsuHitObjectComposer
2020-09-23 12:38:18 +09:00
Dan Balasescu
53788968c8
Merge pull request #10205 from peppy/fix-composer-distance-snap-selection
Fix compose mode not showing distance snap grid when entering with a selection
2020-09-23 11:55:42 +09:00
Dean Herbert
b1f7cfbd5b Reduce children levels in RingPiece 2020-09-22 17:34:21 +09:00
Dean Herbert
8e43266460 Fix compose mode not showing distance snap grid when entering with a selection 2020-09-22 16:02:07 +09:00
Dean Herbert
842f8bea55 Fix bindings not correctly being cleaned up in OsuHitObjectComposer 2020-09-21 18:15:33 +09:00
Dan Balasescu
6f6adb61d7
Merge pull request #10099 from peppy/add-editor-tool-icons
Add icons for editor toolbox tools
2020-09-09 22:22:58 +09:00
Dean Herbert
fb2aced3ac Add toggle for distance snap 2020-09-09 19:15:35 +09:00
Dean Herbert
c9f5005efd Add icons for editor toolbox tools 2020-09-09 18:40:01 +09:00
Dean Herbert
8fa8c561e7 Pass hitobjects as a parameter to CreateBlueprintContainer 2020-05-29 12:20:50 +09:00
Dean Herbert
f5c974dd89 Hide non-alive selection blueprints by default 2020-05-27 13:40:16 +09:00
Dan Balasescu
b5de30ef3d
Merge branch 'master' into editor-scrolling-playfield-support 2020-05-26 14:46:58 +09:00
Dean Herbert
e7442ec3a2 Remove need for ManiaSnapResult 2020-05-25 19:33:03 +09:00
smoogipoo
ebe2e97372 Merge branch 'master' into editor-clock-transform 2020-05-25 19:01:04 +09:00
Dean Herbert
decdc58de5 Merge branch 'editor-clock-cache' into editor-clock-transform 2020-05-24 12:55:47 +09:00
Dean Herbert
a8dbfe2791 Fix distance snap grid not disappearing when exiting playfield 2020-05-23 10:57:17 +09:00
Dean Herbert
bc82c2d3b7 Move drawable addition above event bindings 2020-05-23 10:44:53 +09:00
Dean Herbert
a3a9810344 Merge branch 'master' into editor-clock-cache 2020-05-23 00:44:04 +09:00
Dean Herbert
1311fd2f64
Merge branch 'master' into editor-move-distance-snap-grid 2020-05-23 00:42:43 +09:00
Dean Herbert
af30d1201f Fix slider path control point blueprint not working correctly 2020-05-22 18:57:28 +09:00
Dean Herbert
d18eb663b1 Add tweening seek support to EditorClock 2020-05-22 16:47:52 +09:00