1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 02:57:26 +08:00
Commit Graph

1321 Commits

Author SHA1 Message Date
Dean Herbert
843b10ef34
Add back incorrectly removed control point display toggle 2024-08-22 01:05:47 +09:00
OliBomby
423feadd64 Revert "add arrow indicator"
This reverts commit 1ce9e97fd4.
2024-08-21 14:12:58 +02:00
Dean Herbert
fef56cc29e
Remove expanding behaviour of timeline completely 2024-08-21 16:57:52 +09:00
Dean Herbert
7e6490133d
Adjust visuals of tick display (and fine tune some other timeline elements) 2024-08-21 16:46:14 +09:00
Dean Herbert
1a48a6f654
Reduce size of hit objects on timeline 2024-08-21 16:46:13 +09:00
Dean Herbert
3065f808a7
Simplify timing point display on timeline 2024-08-21 16:46:13 +09:00
Dean Herbert
a0002943a1
Adjust centre marker visuals a bit 2024-08-21 16:46:12 +09:00
OliBomby
1ce9e97fd4 add arrow indicator 2024-08-20 23:38:38 +02:00
OliBomby
ae6d855f8d Merge remote-tracking branch 'upstream/master' into doubleclick 2024-08-20 23:19:27 +02:00
Bartłomiej Dach
bb964e32fa
Fix crash on attempting to edit particular beatmaps
Closes https://github.com/ppy/osu/issues/29492.

I'm not immediately sure why this happened, but some old locally
modified beatmaps in my local realm database have a `BeatDivisor` of 0
stored, which is then passed to
`BindableBeatDivisor.SetArbitraryDivisor()`, which then blows up.

To stop this from happening, just refuse to use values outside of a sane
range.
2024-08-20 13:51:58 +02:00
Bartłomiej Dach
c9f1ef5361
Fix incorrect bank set / sample addition logic
Closes https://github.com/ppy/osu/issues/29361.

Typical case of a few early-returns gone wrong leading to `NodeSamples`
not being checked correctly.
2024-08-20 12:37:01 +02:00
Bartłomiej Dach
42675be6cf
Merge branch 'master' into additions 2024-08-19 11:13:43 +02:00
Andrei Zavatski
3cd5820b5b Make PositionSnapGrid a BufferedContainer 2024-08-17 10:34:39 +03:00
OliBomby
2abcdd0064 Redesign sample bank toggles 2024-08-13 22:05:01 +02:00
Bartłomiej Dach
06c2952fe8
Merge branch 'master' into grids-3 2024-08-12 13:55:35 +02:00
Dean Herbert
8fdd94090b
Show object inspector values during placement 2024-08-09 18:02:37 +09:00
Dean Herbert
b5a19707d0
Merge branch 'master' into additions 2024-08-08 03:31:11 +09:00
Bartłomiej Dach
437812eebe
Merge pull request #29279 from normalid-awa/bugfix/editor/delete-operation-wont-close-the-menu
Close context menus when deselecting items in editor
2024-08-07 13:25:13 +02:00
Dan Balasescu
b91461e661
Refactor + CI fixes 2024-08-06 15:17:52 +09:00
jkh675
cb877b7675 Close the menu when selecting other object 2024-08-06 13:09:48 +08:00
jkh675
75c0c6a5f9 Make the OsuContextMenu nullable in SelectionHandler 2024-08-05 16:32:49 +08:00
Dean Herbert
0557b9ab79
Allow placement deletion with middle mouse
This is in addition to Shift + Right-click.

I thik middle mouse feels more natural and is a good permanent solution
to this issue.

Note that this also *allows triggering the context menu from placement
mode*. Until now it's done nothing. This may be annoying to users with
muscle memory but I want to make the change and harvest feedback. I
think showing the context menu is more correct behaviour (although
arguably it should return to placement mode on dismiss?).
2024-08-05 14:25:09 +09:00
jkh675
b32d97b4c0 Remove decreapted property 2024-08-04 21:27:25 +08:00
jkh675
2145368d17 Merge EditorContextMenuContainer into OsuContextMenuContainer 2024-08-04 21:00:43 +08:00
jkh675
7c83d6a883 Cleanup code 2024-08-04 19:56:41 +08:00
jkh675
3cc5466774 Refactor the code to follow IoC principle and more flexible 2024-08-04 19:39:06 +08:00
jkh675
27d6c4cecb Implement on beatmap editor 2024-08-04 19:16:14 +08:00
jkh675
5c5fcd7e7e Allow key event pass through selection handler 2024-08-04 19:11:21 +08:00
jkh675
83aeb27c73 Replace original menu container to the custom one 2024-08-04 19:08:31 +08:00
Dean Herbert
548fd9cbf9
Show breaks behind objects in timeline
Closes https://github.com/ppy/osu/issues/29227.
2024-08-01 19:47:44 +09:00
Dean Herbert
2d52bab77b
Always show timing points in timeline when at the timing screen
Supersedes https://github.com/ppy/osu/pull/29196.
2024-07-31 19:43:08 +09:00
Dean Herbert
e329427d6e
Apply nullability to Timeline 2024-07-31 19:28:32 +09:00
Salman Ahmed
621f4dfece Enforce new line between X/Y coordinate in editor position inspector 2024-07-30 02:45:21 +03:00
Dean Herbert
4983e5f33e
Merge pull request #29039 from bdach/multiple-selection-sample-popover
Make sample popover change properties of all samples in multiple selection
2024-07-24 22:49:20 +09:00
Bartłomiej Dach
1ed7e4b075
Make sample popover change properties of all samples in multiple selection
Closes https://github.com/ppy/osu/issues/28916.

The previous behaviour *may* have been intended, but it was honestly
quite baffling. This seems like a saner variant.
2024-07-24 12:15:12 +02:00
Dean Herbert
aed7ba9508
Change order of application to avoid bias to side with more room to drag
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2024-07-23 20:56:21 +09:00
Dean Herbert
cc4ed0ff3f
Use non-screen-space coordinates and add time-based drag ramping for better control 2024-07-23 18:59:22 +09:00
Bartłomiej Dach
38fc6f70f6
Add tolerance when drag-scrolling editor timeline
Closes https://github.com/ppy/osu/issues/28983.

While the direct cause of this is most likely mouse confine in
full-screen, it shouldn't/can't really be disabled just for this,
and I also get this on linux in *windowed* mode.

In checking other apps, adding some tolerance to this sort of
drag-scroll behaviour seems like a sane UX improvement anyways.
2024-07-23 11:10:18 +02:00
Dean Herbert
c4de2bbb60
Ignore "too many ticks" in timeline (triggers in normal cases) 2024-07-19 19:57:47 +09:00
Bartłomiej Dach
4dd225fdc8
Fix compose blueprint container not unsubscribing from event
Closes https://github.com/ppy/osu/issues/28938.

This is related to reloading the composer on timing point changes in
scrolling rulesets. The lack of unsubscription from this would cause
blueprints to be created for disposed composers via the
`hitObjectAdded()` flow.

The following line looks as if a sync load should be forced on a newly
created placement blueprint:

    da4d37c4ad/osu.Game/Screens/Edit/Compose/Components/ComposeBlueprintContainer.cs (L364)

however, it is not the case if the parent
(`placementBlueprintContainer`) is disposed, which it would be in this
case. Therefore, the blueprint stays `NotLoaded` rather than `Ready`,
therefore it never receives its DI dependencies, therefore it dies on
an `EditorBeatmap` nullref.
2024-07-19 08:32:36 +02:00
Salman Ahmed
a570949459 Fix selection box initialy visible despite no items selected 2024-07-19 03:00:44 +03:00
OliBomby
ba501a8eb8 fix addition bank toggle can be switched off with selection 2024-07-16 11:30:52 +02:00
OliBomby
9f02a1f1bf fix addition on node sample not working 2024-07-14 22:50:15 +02:00
OliBomby
df7a42a00e fix placement samples 2024-07-14 22:33:23 +02:00
OliBomby
5e86a01e5e allow hotkeys in sample point piece 2024-07-14 20:59:46 +02:00
OliBomby
952540024e addition bank toggles in compose 2024-07-14 20:43:16 +02:00
Bartłomiej Dach
5e00995948
Merge branch 'master' into tooltips 2024-07-12 11:01:03 +02:00
Bartłomiej Dach
518dc17518
Merge pull request #28788 from bdach/timeline-redesign
Redesign editor timelines to address most frequent user complaints
2024-07-12 10:58:59 +02:00
Dean Herbert
4be5d056c5
Reduce opacity of centre marker slightly 2024-07-12 17:23:48 +09:00
Dean Herbert
d2cb07b157
Add a bit more padding between node overlays and hitobjects in timeline 2024-07-12 17:22:36 +09:00
Dean Herbert
2454722601
Add tooltips to summary timeline display 2024-07-12 16:39:41 +09:00
Dean Herbert
275e7aa451
Adjust timeline centre marker visuals and bring in front of ticks 2024-07-12 16:37:03 +09:00
Dean Herbert
ca2fc72959
Adjust timeline centre marker visuals and bring in front of ticks 2024-07-12 16:29:40 +09:00
Dean Herbert
f65ab6736d
Adjust breaks in timeline to be centered with waveform / hitobjects 2024-07-12 15:45:58 +09:00
Dean Herbert
2ad2ae0c16
Add slight offset for timeline BPM display to avoid overlaps 2024-07-12 14:34:01 +09:00
Dean Herbert
9a7a0cdb34
Adjust timeline ticks to add a bit more body back 2024-07-12 14:29:18 +09:00
Bartłomiej Dach
ccc4d288b2
Merge pull request #28821 from peppy/fix-editor-dim
Fix editor UI transparency being incorrectly opaque when hovering slider control points
2024-07-11 12:05:10 +02:00
Dean Herbert
95464ebf36
Merge branch 'master' into timeline-redesign 2024-07-11 18:38:17 +09:00
Dean Herbert
fe421edd8f
Fix editor UI transparency being incorrectly opaque when hovering slider control points
As mentioned at
https://github.com/ppy/osu/pull/28787#issuecomment-2221150025.
2024-07-11 16:41:21 +09:00
Salman Ahmed
ce93455aa8 Extend behaviour to sample edit popover 2024-07-10 15:16:10 +03:00
Bartłomiej Dach
5d5dd0de00
Redesign bottom timeline pieces to match stable better 2024-07-09 09:25:22 +02:00
Bartłomiej Dach
50818da166
Ensure timeline ticks aren't hidden by other pieces
Addresses https://github.com/ppy/osu/issues/28667.
2024-07-09 09:25:22 +02:00
Dean Herbert
aadcc5384d
Adjust editor transparent tweens to be less "flashy"
Touched on in https://github.com/ppy/osu/discussions/28581.

After a bit more usage of the editor I do agree with this and think that
making the fades a bit more gentle helps a lot.
2024-07-09 16:16:19 +09:00
OliBomby
c05f48979b fix naming violation 2024-07-05 14:33:05 +02:00
OliBomby
8d46d6c697 always seek on click 2024-07-05 14:18:17 +02:00
OliBomby
7d6ade7e84 shift alt seek to open next sample edit popover 2024-07-05 14:16:51 +02:00
Bartłomiej Dach
4c59ec1d94
Fix incorrect ternary state computation for bank toggles
Closes https://github.com/ppy/osu/issues/28741.

Regressed in a7b066f3ee.

The intent of the original change there was to ensure that addition
banks being set will put the ternary state toggles in indeterminate
state (to at least provide a visual indication that the selection does
not use a single bank). This would previously not be the case due to
the use of `.All()` in the original condition (a single object/node
was considered to have a bank enabled if and only if *all* samples
within it used it). However the attempt to fix that via switching
to `Any()` was not correct.

The logic used in the offending commit operates on extracted `Samples`
and `NodeSamples` from the selection, and would consider the ternary
toggle:

- fully off if none of the samples/node samples contained a sample with
  the given bank,
- indeterminate if the some of the samples/node samples contained a
  sample with the given bank,
- fully on if at least one sample from every samples/node samples
  contained a sample with the given bank.

This is a *two-tiered* process, as in first a *binary* on/off state is
extracted from each object's samples/node samples, and *then* a ternary
state is extracted from all objects/nodes. This is insufficient to
express the *desired* behaviour, which is that the toggle should be:

- fully off if *none of the individual samples in the selection* use
  the given bank,
- indeterminate if *at least one individual sample in the selection*
  uses the given bank,
- fully on if *all individual samples in the selection* use the given
  bank.

The second wording is flattened, and no longer tries to consider "nodes"
or "objects", it just looks at all of the samples in the selection
without concern as to whether they're from separate objects/nodes
or not.

To explain why this discrepancy caused the bug, consider a single object
with a `soft` normal bank and `drum` addition bank. Selecting the object
would cause a ternary button state update; as per the incorrect logic,
there were two samples on the object and each had its own separate
banks, so two ternary toggles would have their state set to `True`
(rather than the correct `Indeterminate`), thus triggering a bindable
feedback loop that would cause one of these banks to win and actually
overwrite the other.

Note that the addition indeterminate state computation *still* needs
to do the two-tiered process, because there it actually makes sense (for
a selection to have an addition fully on rather than indeterminate,
*every* object/node *must* contain that addition).
2024-07-05 09:27:21 +02:00
OliBomby
b9c6674a58 Allow seeking to sample point on double-click 2024-07-04 11:47:45 +02:00
OliBomby
d0715c5f12 scale along rotated axis 2024-07-03 16:23:19 +02:00
Bartłomiej Dach
17ce9cd162
Merge branch 'master' into grids-2 2024-07-03 10:57:05 +02:00
Dean Herbert
824a00b018
Merge pull request #28707 from bdach/remove-breaks
Add option to remove breaks via timeline context menu
2024-07-03 16:29:25 +09:00
Dean Herbert
abfcac7466
Fix nullability 2024-07-03 15:31:46 +09:00
Dean Herbert
b6dc483fc1
Add missing change handler to ensure undo/redo works for break removal 2024-07-03 14:23:31 +09:00
Salman Ahmed
cb350470e5
Merge branch 'master' into update-framework-has-flag 2024-07-03 07:06:13 +03:00
Dean Herbert
5350945340
Update HasFlag usages 2024-07-03 00:19:04 +09:00
Bartłomiej Dach
a7b066f3ee
Include node samples when changing additions and banks 2024-07-02 16:22:15 +02:00
Bartłomiej Dach
9414aec8bf
Add capability to remove breaks via context menu 2024-07-02 14:55:04 +02:00
Bartłomiej Dach
1b741dada3
Show distance in pixels to previous/next object in osu! hitobject inspector 2024-06-27 14:46:57 +02:00
Bartłomiej Dach
2fda45cad4
Fix crashes when opening scale/rotation popovers during selection box operations 2024-06-25 15:20:59 +02:00
Bartłomiej Dach
03cdfd0660
Fix timeline break piece crashing on drag if there are no objects before start or after end
This fixes the direct cause of https://github.com/ppy/osu/issues/28577.
2024-06-25 12:25:37 +02:00
Olivier Schipper
74399542d2
Use math instead of hardcoded constant values
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2024-06-20 17:27:15 +02:00
Dean Herbert
14104e57d4
Merge branch 'master' into timeline-drag-selection-crash 2024-06-20 15:16:10 +09:00
Dean Herbert
a718af8af5
Adjust break colours to match closer to stable 2024-06-19 22:02:10 +08:00
Dean Herbert
00443403b6
Merge branch 'master' into break-autogeneration 2024-06-19 21:49:17 +09:00
Dean Herbert
32a7885f10
Merge pull request #28523 from bdach/break-display-and-adjustment
Display breaks on editor timeline & allow manually adjusting their duration
2024-06-19 21:48:54 +09:00
Dean Herbert
00a866b699
Change colour to match bottom timeline (and adjust tween sligthly) 2024-06-19 20:30:43 +08:00
Bartłomiej Dach
4022a8b06c
Implement automatic break period generation 2024-06-19 10:22:06 +02:00
Bartłomiej Dach
1f692f5fc7
Make BreakPeriod a struct 2024-06-19 09:01:33 +02:00
Bartłomiej Dach
6a6ccbc09f
Make list of breaks bindable 2024-06-19 07:44:03 +02:00
Bartłomiej Dach
814f1e552f
Implement ability to manually adjust breaks 2024-06-18 15:51:29 +02:00
Bartłomiej Dach
a9e662a2b6
Add break display to editor timeline 2024-06-18 14:55:59 +02:00
Bartłomiej Dach
659505f711
Adjust calls to GetContainingInputManager() 2024-06-18 07:41:19 +02:00
Bartłomiej Dach
8a4ae5d23d
Null-propagate all calls to GetContainingFocusManager() 2024-06-18 07:30:46 +02:00
Dean Herbert
316125d47a
Merge pull request #23443 from OliBomby/edit-nodesample
Make NodeSamples editable
2024-06-18 11:12:02 +09:00
Bartłomiej Dach
7cfe8d8df2
Reduce editor opacity of several editor components when hovering over composer
Addresses https://github.com/ppy/osu/discussions/24384.
2024-06-17 12:14:28 +02:00
Bartłomiej Dach
07f1994a13
Align beat snap control width with right toolbox 2024-06-17 11:47:37 +02:00
Bartłomiej Dach
03049d45bb
Remove stuff that looks bad after moving timeline toggle controls 2024-06-17 10:23:00 +02:00
Bartłomiej Dach
b42752c9f0
Move timeline toggle controls to "view" menu 2024-06-17 10:16:40 +02:00
Bartłomiej Dach
bdeea37a44
Commit active placement when starting drag selection via timeline
This was reported in https://github.com/ppy/osu/pull/28474, albeit the
code changes proposed there did not fix the issue at all.

See 8b6385f7d0 for demonstration of the
crash scenario. Basically what is happening there is:

- The starting premise is that there is a spinner placement active.
- At this time, a drag selection is started via the timeline.
- Once the drag selection finds at least one suitable object to select,
  it mutates `SelectedItems`.
- When selection changes for any reason, the `HitObjectComposer`
  decides to switch to the "select" tool, regardless of why
  the selection changed.
- Changing the active tool causes the current placement - if any -
  to be committed, which mutates the beatmap.
- Back at the drag box selection code, this causes a "collection
  modified when enumerating" exception.

The proposed fix here is to eagerly commit active placement - if any -
when drag selection is initiated via the timeline, which avoids this
issue. This also appears to vaguely match stable behaviour and is sort
of consistent with the logic of committing any outstanding changes upon
switching to the selection tool.
2024-06-14 09:32:40 +02:00
OliBomby
869cd40195 Fixed samples without additions contributing to common addition bank while not having an editable addition bank 2024-06-11 21:31:18 +02:00