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

156 Commits

Author SHA1 Message Date
Susko3
f824bd1441 Fix userTriggered not being passed to private helper 2024-05-06 21:52:03 +02:00
Bartłomiej Dach
d7a0fdce07
Merge pull request #28089 from peppy/use-closest-origin
Automatically choose origin (along with anchor) to make skin editor placement easier for users
2024-05-06 14:57:34 +02:00
Bartłomiej Dach
353a07f7a5
Fix code quality inspection 2024-05-06 12:23:11 +02:00
Bartłomiej Dach
f066026503
Fix sizing of gameplay preview in skin editor not updating on scaling mode change
Closes https://github.com/ppy/osu/issues/28115.
2024-05-06 11:55:51 +02:00
Dean Herbert
12cd3bbe1c
Fix incorrect scale handling due to selection point changes 2024-05-06 11:34:37 +08:00
Dean Herbert
2cb367fdce
Disable "origin" menu when in "Closest" placement mode 2024-05-04 13:29:05 +08:00
Dean Herbert
e7ca02ffde
Fix position changing when origin updates during a drag 2024-05-04 13:28:33 +08:00
Dean Herbert
0b61e2cd42
Use closest origin along with closest anchor 2024-05-04 13:09:51 +08:00
Bartłomiej Dach
f78abf801c
Autosave edited skin on change 2024-04-29 14:38:53 +02:00
Dean Herbert
c0dce94f15
Fix newly placed items in skin editor not getting correct anchor placement 2024-04-12 17:08:49 +08:00
Bartłomiej Dach
05fe8968d8
Only interact with clipboard via bound copy 2024-04-03 11:39:12 +02:00
Dan Balasescu
ce68f6adb7
Fix SkinEditor binding event to external bindable 2024-04-03 17:46:26 +09:00
Nguyên Minh Hồ
113dbcd10f
Merge branch 'master' into fix-rotate-editor-button-disabled 2024-03-30 13:56:31 +07:00
Bartłomiej Dach
f9e92c69a8
Merge branch 'master' into fix-skin-editor-init-fail 2024-02-22 14:08:38 +01:00
Bartłomiej Dach
1ca566c6b0
Disable nested input managers on edited screen when skin editor is open 2024-02-19 10:19:25 +01:00
Nguyên Minh Hồ
e1f8bc9692 Rename CanRotate property of SelectionRotationHandler to a more descriptive name 2024-01-25 12:10:50 +07:00
Dean Herbert
cd02d00c03
Fix skin potentially being lost when opening and closing skin editor rapidly 2024-01-16 15:23:07 +09:00
Dean Herbert
451ba1c861
Ensure PresentGameplay doesn't get stuck in loop if no beatmaps available 2024-01-16 15:13:08 +09:00
rushiiMachine
0c8b551c66
SkinEditor lifetime fix & show gameplay
If the SkinEditor was created already but not finished initializing, wait for it to initialize before handling a screen change, which could possibly null the skin editor. Additionally, in the case the skin editor is already loaded but hidden, make sure to show gameplay.
2023-12-27 14:49:42 -08:00
rushiiMachine
85a768d0c8
Don't reuse results delay const 2023-12-26 12:46:50 -08:00
rushiiMachine
1d4db3b7a9
Fix SkinEditorOverlay freezing when ReplayPlayer screen exits early
Originally when popping in, the ReplayPlayer was loaded first (if previous screen was MainMenu), and afterwards the SkinEditor component was loaded asynchronously. However, if the ReplayPlayer screen exits quickly (like in the event the beatmap has no objects), the skin editor component has not finished initializing (this is before it was even added to the component tree, so it's still not marked `Visible`), then the screen exiting will cause `OsuGame` to call SetTarget(newScreen) -> setTarget(...) which sees that the cached `skinEditor` is not visible yet, and hides/nulls the field. This is the point where LoadComponentAsync(editor, ...) finishes, and the callback sees that the cached skinEditor field is now different (null) than the one that was loaded, and never adds it to the component tree. This occurrence is unhandled and as such the SkinEditorOverlay never hides itself, consuming all input infinitely.

This PR changes the loading to start loading the ReplayPlayer *after* the SkinEditor has been loaded and added to the component tree.
Additionally, this lowers the exit delay for ReplayPlayer and changes the "no hit objects" notification to not be an error since it's a controlled exit.
2023-12-26 12:22:00 -08:00
Daniel Power
d4731e0830 Fix scale of skin element bounding box 2023-12-21 08:56:39 -03:30
Bartłomiej Dach
f239d03d75
Forcibly change ruleset to correct one before entering gameplay from main menu
Closes #25663 (again).

As it turns out, in some scenarios it can be the case that the current
game-global `Beatmap` is not valid for the current game-global
`Ruleset`. The validity of one and the other in conjunction is only
really validated by the song select screen; elsewhere there is no
guarantee that the global beatmap is playable using the global ruleset.

However, this only comes up in very specific circumstances, namely one:
when trying to autoplay a catch beatmap with osu! ruleset globally
active via the skin editor flow.

`Player` is responsible for retrieving the beatmap to be played. It does
so by invoking the appropriate beatmap converter and asking it if the
beatmap can be converted:

	6d64538d7a/osu.Game/Beatmaps/WorkingBeatmap.cs (L262-L266)

If the code above throws, `Player` actually silently covers for this, by
trying the beatmap's default ruleset instead:

	6d64538d7a/osu.Game/Screens/Play/Player.cs (L529-L536)

However, for the pairing of osu! ruleset and catch beatmap, this fails,
as `OsuBeatmapConverter`'s condition necessary for permitting conversion
is that the objects have a defined position:

	6d64538d7a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs (L25)

which they will do, due to the fact that all catch beatmaps are really
just osu! beatmaps but with conversion steps applied, and thus `Player`
succeeds to load the catch beatmap in osu! ruleset.

In the skin editor scenario, this would lead to the secondary failure
of the skin editor trying to apply `CatchModAutoplay` on top of all
of that, which would fail at the hard-cast of the beatmap
to `CatchBeatmap`.
2023-12-06 10:35:41 +01:00
Dean Herbert
ca991f1f54
Move flags local to EndlessPlayer 2023-12-06 17:18:35 +09:00
Dean Herbert
c5a08a0711
Remove unused using statement 2023-12-04 23:06:08 +09:00
Bartłomiej Dach
5512298d60
Trim unused resolved bindable 2023-12-04 15:01:23 +01:00
Bartłomiej Dach
8754fa40f4
Source autoplay mod from beatmap about to be presented rather than ambient global 2023-12-04 14:42:51 +01:00
Bartłomiej Dach
063694f544
Do not attempt to load gameplay scene if current beatmap is dummy 2023-12-04 14:42:51 +01:00
Bartłomiej Dach
9d39b70e38
Fix endless player not handling load failure 2023-12-04 14:42:51 +01:00
Bartłomiej Dach
055fb5bd8f
Do not set initial activity in skin editor endless player
Seems like an overreach to say that the user is "watching a replay"
there.
2023-12-04 14:42:51 +01:00
Bartłomiej Dach
7e3bb5f8db
Make skin editor overlay dependency nullable to fix tests 2023-11-27 12:09:13 +09:00
Bartłomiej Dach
3f48f4acdf
Remove blank line 2023-11-27 12:06:08 +09:00
Dean Herbert
7153c823e8
Choose a better beatmap if the intro is still playing
Also skip intro time.
2023-11-24 17:47:20 +09:00
Dean Herbert
95229cb336
Show gameplay when loading the skin editor from the main menu 2023-11-24 17:47:20 +09:00
Dean Herbert
9a6857bfad
Merge pull request #25530 from yesseruser/FlagHUD
Fix skin element "PlayerFlag" responding to clicks/hovers
2023-11-23 16:51:09 +09:00
Dean Herbert
191e8c5487
Add note about skin editor reload jank 2023-11-23 16:39:05 +09:00
Bartłomiej Dach
abbcdaa7f7
Fix skin editor crashing when pasting with nothing in clipboard 2023-11-23 09:55:27 +09:00
Dean Herbert
aa749aeb73
Save any unsaved changes in the skin editor when game changes screens
Closes https://github.com/ppy/osu/issues/25494.
2023-11-21 17:49:57 +09:00
Dean Herbert
405ab499e9
Allow context menus to have visible spacers 2023-11-21 14:24:10 +09:00
Bartłomiej Dach
ccfdf1ffd6
Merge pull request #25402 from peppy/skin-size-editing
Add support for adjusting size of skin elements
2023-11-12 07:31:51 +09:00
Dean Herbert
b0aa4a4257
Add "export" item to skin editor menu 2023-11-11 20:34:35 +09:00
Bartłomiej Dach
8d7539ab70
Merge branch 'master' into skin-size-editing 2023-11-11 19:56:09 +09:00
Bartłomiej Dach
2428a97d44
Fix editor not clearing undo history on skin change 2023-11-11 18:49:44 +09:00
Dean Herbert
35e11c7c63
Rename diagonal scale variable and update xmldoc 2023-11-10 17:55:02 +09:00
Dean Herbert
f25489cc7b
Check X/Y sizing available separately to fix weird edge cases 2023-11-10 17:54:43 +09:00
Dean Herbert
175dae49c6
Reset scale per axis 2023-11-10 14:43:51 +09:00
Dean Herbert
fb361a4e0a
Reset size along with scale for relative items 2023-11-10 14:25:55 +09:00
Dean Herbert
ec3b6e47fb
Change selection handling to adjust Size instead of Scale for edge nodes 2023-11-10 14:22:28 +09:00
Dean Herbert
1f0b914251
Add skin editor dropdown items to reset rotation and scale 2023-11-06 16:18:33 +09:00
Dean Herbert
5341a335a6
Bypass Parent nullability checks for now 2023-10-17 17:48:45 +09:00