Commit Graph

1005 Commits

Author SHA1 Message Date
14af86d6c5 Use the same code path for all scaling 2021-05-19 21:46:41 +09:00
6a3c58b9ad Implement proper scaling algorithms 2021-05-19 19:58:55 +09:00
825d61e22c Separate default beatmap skins from DefaultSkin 2021-05-19 12:06:10 +03:00
9806d94b74 Move beatmap skin info creation to static method at IBeatmapSkin 2021-05-19 11:58:00 +03:00
c98d036b48 Merge branch 'master' into catch-hide-combo-workaround 2021-05-18 17:47:20 +03:00
08ee1e4853 Remove HUD skin component lookup in favour of MainHUDComponents target system 2021-05-18 12:37:23 +03:00
d661e98fa6 Move common functionality out of OsuSelectionHandler and implement flip support 2021-05-18 18:34:06 +09:00
c80e736712 Change SkinBlueprint to use the origin point as the selection point
Not sure how this feels, but it makes using the same point throughout
the editor possible, which I think is the correct way forward for now.
2021-05-18 18:33:06 +09:00
10c730b37d Add new default locations for hit bar error displays 2021-05-18 15:50:50 +09:00
f667ea3fd0 Replace AllowDefaultHUDComponentsFallback with a temporary override at LegacyBeatmapSkin 2021-05-17 21:34:53 +03:00
ea4dfd3374 Merge pull request #12842 from peppy/song-progress-skinnable
Add layout customisation support for `SongProgress`
2021-05-17 20:15:01 +09:00
42d2711dc6 Use ShouldBeConsideredForInput instead of ReceivePositionalInputAtSubTree 2021-05-17 19:29:59 +09:00
60f3e628bc Fix song progress being interactable inside toolbox button 2021-05-17 19:05:22 +09:00
da0913ca2d Make SongProgress a skinnable component 2021-05-17 18:52:56 +09:00
0d7a349500 Exclude interfaces from skinnable types 2021-05-17 18:16:09 +09:00
4c25fe750f Disallow beatmap skin to fall back to default HUD components
This should become a more generalized `AllowDefaultSkinFallback` when default legacy skin fallback is supported.
2021-05-15 14:32:16 +03:00
7665bdfbbb Merge branch 'master' into null-assignment-warning-enable 2021-05-15 01:08:34 +02:00
69fc072429 Ignore skin component json data if deserialisation fails instead
Crashing was not really the best thing to do there given the preceding
code that already allowed a few continues in case of a missing file.
2021-05-15 01:08:11 +02:00
fa6b5515b7 Ignore possible null from JsonConvert.DeserializeObject()
Nothing better can be done if a `null` is indeed returned.
2021-05-15 00:09:34 +02:00
628e7a71ed Ignore possible nulls in Type.GetType() calls
They're mostly used in extensibility scenarios, so everything happens in
runtime. There is no better resolution than to crash with a null
reference exception.
2021-05-15 00:09:34 +02:00
3d3c5028e6 Trim unnecessary array copy 2021-05-14 22:33:26 +02:00
743b4fbff1 Pass correct member name to ArgumentExceptions 2021-05-14 22:16:37 +02:00
876f53bf3b Fix copy-paste oversights in xmldoc & exception messages 2021-05-14 22:15:43 +02:00
d09da02673 Fix deleting skin elements not saving out to skin
Closes https://github.com/ppy/osu/issues/12786.
2021-05-14 16:03:22 +09:00
46e7d9e0ed Randomise the values displayed in the skinning toolbox
To stop the spam of "WYSI" comments everywhere. I guess I underestimated
the negative effect this would have.
2021-05-14 12:15:58 +09:00
6a64a705b8 Merge branch 'master' into skin-blueprint-aspect-lock 2021-05-13 17:53:00 +02:00
25b1443c50 Remove dead branch and mark implementation as temporary
The previous implementation was checking if the `x0` or `x2` anchors
were selected to decide on which way to transfer the drawable's scale,
but that check actually ends up being always true for corner anchors. To
visualise, this is how the corner anchors correspond to `Anchor` flags:

    x0  x1  x2
    |   |   |
y0 -O---O---O-
    |   |   |
y1 -O---+---O-
    |   |   |
y2 -O---O---O-
    |   |   |

The Os indicate where the reference anchors are on a selection box.
The first conditional eliminates the middle ones, which makes sense.
But after excluding them from further deliberations (marking via X):

    x0  x1  x2
    |   |   |
y0 -O---X---O-
    |   |   |
y1 -X---+---X-
    |   |   |
y2 -O---X---O-
    |   |   |

The remaining anchors always have `x0` or `x2` set. So to avoid
confusion, just always transfer one way for now. At some point this
should be torn out in favour of an actual implementation of the desired
behaviour.
2021-05-13 17:50:12 +02:00
0fa90a80d4 Merge branch 'master' into skin-blueprint-aspect-lock 2021-05-13 23:38:53 +09:00
3ecbb9ec4b Merge branch 'master' into skin-blueprint-anchor-origin 2021-05-13 23:38:04 +09:00
98830dadda Merge pull request #12762 from peppy/skin-blueprint-visual-improvements
Improve the visual appearance of skin editor blueprints
2021-05-13 23:37:21 +09:00
cef39eb4fa Merge pull request #12766 from peppy/stable-anchor-origin
Keep component positions stable when changing anchor/origin
2021-05-13 23:36:40 +09:00
caa3e1dca5 Merge pull request #12767 from peppy/save-on-forced-exit
Save skin editor changes on forced exit
2021-05-13 23:35:52 +09:00
4183a1c556 Merge pull request #12769 from peppy/remove-skinnable-hud-classes
Remove remaining test usage of SkinnableXXX HUD components
2021-05-13 22:56:18 +09:00
6c12cae105 Remove unnecessary property 2021-05-13 22:25:11 +09:00
c57a2f43fa Merge branch 'master' into skin-blueprint-visual-improvements 2021-05-13 22:22:42 +09:00
4cf4817ad2 Remove redundant parens 2021-05-13 22:11:58 +09:00
d2fdd1e521 Merge branch 'master' into stable-anchor-origin 2021-05-13 22:06:21 +09:00
67f795cfa6 Merge branch 'master' into save-on-forced-exit 2021-05-13 22:00:38 +09:00
1e23c53507 Fix inspection 2021-05-13 21:59:38 +09:00
d5b14b6b99 Merge branch 'master' into remove-skinnable-hud-classes 2021-05-13 21:06:48 +09:00
b939318922 Merge branch 'skin-serialisation' into skin-editor-default-placement-location 2021-05-13 19:09:34 +09:00
e5f765d1a8 Fix broken exception message 2021-05-13 19:06:58 +09:00
bda0ea463a Merge branch 'skin-serialisation' into save-on-forced-exit 2021-05-13 19:05:47 +09:00
c8b7cfc753 Merge branch 'skin-serialisation' into remove-skinnable-hud-classes 2021-05-13 19:05:08 +09:00
07e475cd13 Fix skin blueprint box drawing incorrectly when both scale and rotation are applied 2021-05-13 18:54:40 +09:00
2f025f1967 SkinnableTargetWrapper -> SkinnableTargetComponentsContainer 2021-05-13 18:54:30 +09:00
01bc71acd2 Improve ability to parse xmldoc of SkinnableTargetWrapper
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2021-05-13 18:40:28 +09:00
df77b28b48 Add a flimsy guard against null parent to avoid crashes on exit sequence 2021-05-13 18:39:21 +09:00
9f8e6979dd Fix display of skin blueprints when flipped 2021-05-13 18:00:25 +09:00
1cda55393e Add aspect ratio locking and flip support to skin editor 2021-05-13 17:51:57 +09:00