Dean Herbert
1a29098f3b
Change default value and add comment explaining why skins are never "locally available"
2022-01-13 12:50:18 +09:00
Dean Herbert
b2d09b7b10
Fix further warnings
2022-01-12 23:42:12 +09:00
Dean Herbert
08da948afc
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-12 19:22:55 +09:00
Dean Herbert
8c8c5f4c33
Fix skin hash repopulation not working since realm migration
2022-01-12 18:32:51 +09:00
Dean Herbert
a4de0f93fa
Move manager Update
methods to be explicit to where they are still used by legacy code
...
Also fixes skin hash repopulation being completely broken.
2022-01-12 17:49:11 +09:00
Dean Herbert
d8e75a9de4
Reimplmeent IsAvailableLocally
as an abstract
method
2022-01-12 17:49:10 +09:00
Dean Herbert
667cdb2475
Fix skin lookup when there's no beatmap file available
2022-01-12 17:00:16 +09:00
Dean Herbert
4763fe54d6
Remove unused store classes
2022-01-12 16:39:36 +09:00
Dean Herbert
3cd996eb4a
Merge branch 'master' into async-deadlock-safety
2022-01-07 17:28:59 +09:00
Dean Herbert
00177a3ae1
Update usages to new naming
2022-01-06 22:54:43 +09:00
Dean Herbert
243a1a3cf7
Fix incorrect origin specification for SkinSelectionHandler
flips
2022-01-06 14:47:44 +09:00
Dean Herbert
866ae3472b
Add global flip hotkeys
2022-01-05 16:48:07 +09:00
Dean Herbert
73b40e6833
Replace usage of .Result
with .WaitSafelyForResult
2022-01-04 11:51:41 +09:00
Dean Herbert
089b756f93
Invert logic to make reading easier
2021-12-30 16:03:16 +09:00
Dean Herbert
ef49f2ed0e
Add extra extra safety against attempting to load a previously expired editor
2021-12-30 16:02:31 +09:00
Dean Herbert
b1a444180f
Fix Show
then Reset
potentially resulting in incorrect load target
2021-12-29 21:46:34 +09:00
Dean Herbert
471eea750a
Fix calling SkinEditorOverlay.Show
before the overlay is loaded causing an exception
...
As seen at https://github.com/ppy/osu/runs/4652969942?check_suite_focus=true .
2021-12-29 21:18:17 +09:00
Bartłomiej Dach
724b601d2a
Rename AllowSampleLookup
argument to something saner
2021-12-26 14:29:07 +01:00
Bartłomiej Dach
dc21c8901e
Always allow looking up storyboard samples from beatmap skin
2021-12-26 14:25:28 +01:00
Dean Herbert
9d85beddbe
Fix null reference in some tests due to missing realm context factory
2021-12-15 11:16:37 +09:00
Dean Herbert
441b7baa93
Provide a realm factory to usages of ToLive
/RealmLive
2021-12-14 14:26:34 +09:00
Dean Herbert
8d9c37a825
Merge branch 'master' into primary-key-consistency
2021-12-08 21:34:38 +09:00
Dan Balasescu
7ef960839b
Merge pull request #15898 from peppy/skin-export-instntiation-info
...
Serialise and deserialise `SkinInfo.InstantiationInfo` to allow for more correct imports
2021-12-06 22:08:20 +09:00
Dean Herbert
07abcf04b4
Merge branch 'master' into realm-integration/skins-filename-lookup-performance
2021-12-06 17:13:33 +09:00
Dean Herbert
68b482fc48
Merge branch 'master' into skin-export-instntiation-info
2021-12-06 17:12:42 +09:00
Dean Herbert
452fa93444
Merge branch 'master' into realm-integration/skins-rebase
2021-12-06 15:21:02 +09:00
Dean Herbert
1eed2436e6
Clean up unused resolved properties
2021-12-03 18:49:49 +09:00
Dean Herbert
e4b296e16e
Use OptIn
serialisation on SkinInfo
to avoid writing unnecessary information
2021-12-03 16:36:27 +09:00
Dean Herbert
cdf2fa9930
Serialise and deserialise SkinInfo.InstantiationInfo
to allow for more correct imports
...
Until now, skins were always imported using the `LegacySkin`
instantiation type. For cases where a user has edited the lazer or
classic default (via the new skin editor), which would result in
incorrect fallback paths after exporting and importing the edited skin.
2021-12-02 18:05:16 +09:00
Dean Herbert
0e82e9355b
Ensure skin is saved immediately after becoming mutable
...
Without doing this, the JSON content is not written to the file. A user
assumption is that as soon as a skin shows up in the skin list as
exportable, it should export correctly, so it makes sense that it should
be in a sane state even if the user has not made any changes in the skin
editor yet.
Going forward, we might move more of the json serialisation logic out,
and run for consistency as part of the import process. This seems like
the simplest way to guarantee things for now, though.
2021-12-02 17:42:17 +09:00
Dean Herbert
fe99d4e984
Standardise parameter naming across all file IO methods
2021-12-02 17:19:53 +09:00
Dean Herbert
505608ab12
Merge branch 'realm-integration/skins-rebase' into realm-integration/skins-filename-lookup-performance
2021-12-02 14:01:39 +09:00
Dean Herbert
0a14acfd83
Fix incorrect conditional on export/mutate feasability of skin
2021-12-02 13:41:58 +09:00
Dean Herbert
4f826589e5
Remove subscription logic for the time being
2021-12-02 12:20:07 +09:00
Dean Herbert
1cf1543866
Fix test failures due to attempting to subscribe to non-managed instances
2021-12-01 13:50:19 +09:00
Dean Herbert
9411b42d0a
Cache skin filename to path mapping to reduce realm lookups during gameplay skin changes
2021-12-01 02:27:41 +09:00
Dean Herbert
0efd565c8b
Remove forgotten using statement
2021-11-30 15:41:07 +09:00
Dean Herbert
6bf9327228
Add linking property on SkinFileInfo
to allow EF to understand the link post-rename
2021-11-30 15:17:16 +09:00
Dean Herbert
0d18c83d75
Simplify deletion by adding always present conditionals to Delete
method
2021-11-29 18:28:25 +09:00
Dean Herbert
f6a3709060
Store default skins to database
2021-11-29 18:28:25 +09:00
Dean Herbert
c629a7a36f
Fix random selection and avoid using legacy events for handling skin import/deletion
2021-11-29 18:28:25 +09:00
Dean Herbert
29d074bdb8
Implement missing behaviours required for skin file operations via RealmArchiveModelManager
2021-11-29 18:28:25 +09:00
Dean Herbert
e2d9a685d7
Update skin implementations to match new structures
2021-11-29 18:28:25 +09:00
Dean Herbert
6b55de2845
Use ILive
for Skin.SkinInfo
2021-11-29 18:28:25 +09:00
Dean Herbert
23146d59d1
Use ILive
for current skin
2021-11-29 18:28:25 +09:00
Dean Herbert
2a9c7c00c8
Update tests and file access code
2021-11-29 18:28:25 +09:00
Dean Herbert
3db5646fa8
Create Guid constants for system skins (and store skin choice to configuration as guid)
2021-11-29 18:28:25 +09:00
Dean Herbert
e283379f0e
Replace EF SkinInfo
with realm implementation
2021-11-29 18:28:25 +09:00
Dean Herbert
0a961fd9d8
Replace usages of IHasFiles
with IHasRealmFiles
2021-11-29 18:28:25 +09:00
Dean Herbert
94b10492be
Update legacy SkinManager
to match new interface
2021-11-29 18:20:07 +09:00
Dean Herbert
cc1b91e4bd
Split out legacy model export logic into LegacyModelExporter
classes
2021-11-25 16:41:12 +09:00
Dean Herbert
7488ccd5fe
Update all models to implement IHasNamedFiles
2021-11-25 16:41:12 +09:00
Dean Herbert
6cab7b877d
Move stable import handling into its own class
2021-11-25 15:36:58 +09:00
Dean Herbert
2bfc473689
Split out SkinModelManager
from SkinManager
2021-11-25 15:14:43 +09:00
Dan Balasescu
016684b52d
Remove unreachable code
2021-11-24 20:29:47 +09:00
Dean Herbert
99a139dc98
Initialise all file lists at construction time (and remove setter)
2021-11-24 13:56:21 +09:00
Dean Herbert
83b4625bd5
Replace existing cases with new helper method
2021-11-19 22:15:41 +09:00
Dean Herbert
eecf6ad558
Add IsManaged
helper method to EF classes to match realm implementation
2021-11-19 21:56:06 +09:00
Dean Herbert
59e763467f
Move StoragePath
implementation to an extension method
2021-11-19 16:08:38 +09:00
Dean Herbert
1f5ca122b0
Merge branch 'master' into user-class-cleanup
2021-11-05 13:55:22 +09:00
Jason Won
9e7d559f55
fix aspect locked scaling of skin components
2021-11-04 17:10:41 -04:00
Dean Herbert
ed07ee8c61
Update all existing usages of AuthorString
/AuthorId
...
Unfortunately the getters need to be left in place else EF breaks.
2021-11-04 18:59:37 +09:00
smoogipoo
1e9211c00b
Use explicit type
2021-11-02 15:41:25 +09:00
Dean Herbert
5d784b2ef8
Perform a consistency check by decoding the newly written skin.ini
during ComputeHash
...
As this has regressed twice now, let's play it safe and bail rather than
stack overflowing. Note that as all the underlying issues that could
trigger this have been fixed, no additional tests have been added. To
test, comment out `SkinManager.cs` line 228-229 to cause a failure. The
new logic will kick in and show a log output message, but all tests will
still (correctly) pass.
2021-11-02 14:11:25 +09:00
Dean Herbert
2e66ab453d
Always write automated changes to skin metadata at the end of the file
...
Apart from being cleaner (and allowing removal at the point of export,
if that is ever requires), this also gives us a better guarantee that
the metadata is going to take effect.
By writing the `[General]` section ourselves, we avoid any issues that
may be present from a user constructing the file (incorrectly)
themselves, such as multiple `Title:` entries or a malformed `[General]`
marker.
The main goal is to ensure that the name is updated to what we expect it
to be.
2021-11-02 14:11:25 +09:00
Dean Herbert
6b250955d7
Add missing verbatim string markers
2021-11-01 14:24:38 +09:00
Dean Herbert
5bfb16efe2
Ignore case when searching for existing skin.ini
2021-11-01 14:24:38 +09:00
Dean Herbert
add39fbd4f
Merge branch 'master' into fix-skin-layout-editor-crash
2021-10-28 06:24:24 +09:00
Dean Herbert
6944151486
Apply batch fixing of built-in types using var
2021-10-27 13:04:41 +09:00
Dean Herbert
26cf5370c3
Remove unused reader
parameter
2021-10-24 23:48:46 +09:00
Dean Herbert
5303cae044
Add mention of stream close logic
2021-10-24 23:43:37 +09:00
Bartłomiej Dach
051cc2cd92
Update reference to configuration population process in comment
2021-10-24 12:47:17 +02:00
Dean Herbert
93482414d6
Remove SkinConfiguration
subclasses and allow configuration parsing for all skin types
2021-10-22 14:42:23 +09:00
Dean Herbert
82d0a6515f
Fix incorrect conditional for checking whether import (would fail for default skin)
2021-10-22 14:08:12 +09:00
Dean Herbert
9cdc1ba592
Fix default legacy skin not being able to read from stored skin.ini
2021-10-22 13:43:45 +09:00
Dean Herbert
e5b73f25cd
Ensure newly created skin.ini
files are set to latest version
2021-10-22 12:56:05 +09:00
Dean Herbert
a5088cac27
Fix default metadata propagation when no files are present
2021-10-21 13:43:42 +09:00
Dean Herbert
59b7210efa
Revert disallowing imports with no files
...
While it is logical that we want this, from a testing perspective this is a bit of a nightmare to fix. Let's revisit at a later point in time.
2021-10-21 13:43:42 +09:00
Dean Herbert
68c01fc204
Fix infinite loop on default skin (it can't have a skin.ini
)
2021-10-20 17:56:45 +09:00
Dean Herbert
9e6e41d7c0
Add migration to reset and repopulate existing skin hashes
2021-10-20 17:56:45 +09:00
Dean Herbert
602303e947
Add test coverage for skin.ini
contents
2021-10-20 17:56:45 +09:00
Dean Herbert
a95c754fd3
Fix multiple issues and make metadata fallback process more logical
2021-10-20 17:56:45 +09:00
Dean Herbert
fa542f2547
Include json
files in skin hashing
...
This covers the new layout storage we are doing.
2021-10-20 17:45:06 +09:00
Dean Herbert
789c715f13
Add skin.ini
write support to allow for more correct hashing
2021-10-20 17:45:06 +09:00
Dean Herbert
d7cbacc5a0
Rename OnSourceChanged
and expand on xmldoc to mention that it doesn't fire SourceChanged
2021-10-12 13:04:48 +09:00
Dean Herbert
a849e7343e
Add lock to ensure no threading shenanigans
2021-10-12 13:04:24 +09:00
Dean Herbert
077dcf5cd9
Add missing documentation for SourceChanged
2021-10-12 12:50:28 +09:00
Dean Herbert
39a3482458
Replace Add/Reset methods with single Set
method
2021-10-12 11:55:07 +09:00
Dean Herbert
df83f0db08
Fix cross-thread list manipulation in SkinProvidingContainer
2021-10-12 11:28:11 +09:00
Dean Herbert
43aacb3831
Fix two different skins displaying at the same time when rapidly switching
2021-10-11 16:11:15 +09:00
Dean Herbert
06cce0119c
Use localisable format string for comma separator mode
2021-10-10 17:41:16 +09:00
Dean Herbert
81a13566bc
Adjust default location slightly, fix alignment of "pp" subtext
2021-10-05 15:28:03 +09:00
smoogipoo
221cc1747c
Drop "default" prefix
2021-10-04 20:34:28 +09:00
smoogipoo
031c5a441e
Merge branch 'master' into realtime-pp-display
2021-10-04 20:19:37 +09:00
smoogipoo
4871db2f86
Merge branch 'master' into importer-returns-live
2021-10-04 19:42:36 +09:00
Dean Herbert
916342c837
Merge branch 'master' into importer-returns-live
2021-10-04 16:24:26 +09:00
smoogipoo
69c2b7dc59
Merge branch 'master' into rename-beatmap-info-beatmap-fields
2021-10-04 16:03:22 +09:00
Dean Herbert
ec61c3c5ee
Rename all remaining cases
2021-10-03 00:55:29 +09:00
smoogipoo
adff418fd2
Guard against exception in skin deserialisation
2021-10-01 22:17:38 +09:00
Dean Herbert
a2e61883e3
Initial push to use ILive
in import process
2021-09-30 22:55:25 +09:00
smoogipoo
fab0d531be
Add counter to HUD
2021-09-30 17:55:00 +09:00
Dean Herbert
4fd19cbb0d
Use null check instead of assert in Hide()
due to public exposure
2021-09-29 18:58:43 +09:00
Dean Herbert
c5b7e97bd9
Fix skin editor potentially crashing during close process
...
As reported at
https://github.com/ppy/osu/discussions/14850#discussioncomment-1399382 .
2021-09-29 18:53:49 +09:00
Dean Herbert
1b13b74740
Fix skin editor potentially leaving game-wide masking in the wrong state
...
Just going with the simplest way to solve this.
Closes https://github.com/ppy/osu/issues/14769 .
2021-09-17 13:48:20 +09:00
smoogipoo
4b5857c876
Merge branch 'baseline-changes-update' into update-framework
2021-09-16 18:34:22 +09:00
smoogipoo
f9d5abff8a
Update with keybinding changes
2021-09-16 18:26:12 +09:00
Dean Herbert
6f2d818b64
Merge pull request #14740 from smoogipoo/mania-note-animations
...
Add animation support for mania notes
2021-09-16 16:34:53 +09:00
Dean Herbert
15e3f95c87
Remove remnants of DatabasedSetting
from SkinInfo
...
This was never used
2021-09-15 17:12:04 +09:00
Salman Ahmed
8217b90b1c
Consider legacy glyph texture heights as the baselines for simplicity
...
Mixing `LegacySpriteText` with legitment fonts should never be the case,
so it's fine to consuder the height as the baseline, since there's
really no other way around it.
2021-09-15 09:14:47 +03:00
smoogipoo
63aa3ddcba
Add animation support for mania notes
2021-09-14 17:45:23 +09:00
Dean Herbert
568a8ee97e
Merge branch 'master' into fix-hud-test-failure-2
2021-08-24 16:54:48 +09:00
Dean Herbert
3f0f820653
Add comment explaining reasoning for override
2021-08-24 16:54:19 +09:00
smoogipoo
9f17c38e36
Fix hud overlay components being blocked from load
2021-08-24 15:18:27 +09:00
Dean Herbert
a2484692b3
Change brackets to square
2021-08-23 20:37:19 +09:00
Dean Herbert
7b3f7cc7c1
Change skin import to also include directory names in the skin name where appropriate
2021-08-23 20:24:00 +09:00
Bartłomiej Dach
58ecee543a
Trim redundant default argument value
2021-08-17 23:00:10 +02:00
Dean Herbert
d66f7cb6b5
Fix tests by allowing retrieval with files where required
2021-08-17 19:21:22 +09:00
Dean Herbert
4bf22db4ff
Attempt to reduce skin lookup overhead where file access is not required
2021-08-17 00:23:30 +09:00
Bartłomiej Dach
7c88a1c6de
Add a way to change custom combo colours via IHasComboColours
...
`IHasComboColours` was already mutable (via a strange
`AddComboColours()` method) and exposing a straight list is easier to
work with. `IHasCustomColours` is also similarly externally mutable (in
a way which is not easily removable).
2021-08-15 20:06:06 +02:00
TheOmyNomy
c5b490c441
Use non linear colour interpolation for legacy health display
2021-08-10 11:29:31 +10:00
Dean Herbert
50a2abbe7f
Merge pull request #12683 from frenzibyte/legacy-beatmap-combo-offset
...
Apply combo offsets "colour hax" only on beatmap skins
2021-07-23 14:30:18 +09:00
Bartłomiej Dach
b1087d14f3
Merge branch 'master' into skin-editor-button-access
2021-07-22 22:49:44 +02:00
Dean Herbert
21053381c7
Fix skin editor potentially eating GlobalAction.Back
when not displayed
2021-07-22 15:59:00 +09:00
Dean Herbert
3fd8de3b91
Fix skin editor's fake overlay potentially getting into a bad state
2021-07-22 15:57:47 +09:00
Dean Herbert
399c3b0be8
Rename property, reword xmldoc and improve readability of update code
2021-07-21 17:32:56 +09:00
ekrctb
1bff4373b3
Allow specifying flipping support of selection box different from scaling
2021-07-21 15:59:45 +09:00
Salman Ahmed
9d92b795fa
Revert making ComboOffset
s legacy and define BeatmapSkinComboIndex
instead
2021-07-20 14:15:43 +03:00
Dean Herbert
16a2e63bd4
Use existing localisation
2021-07-20 19:44:02 +09:00
Dean Herbert
59457743e5
Move further to the right to avoid overlap with toolbox listing
2021-07-20 19:43:52 +09:00
Dean Herbert
9c4fbf45e9
Add the ability to enter and exit the skin editor via on-screen buttons
2021-07-20 19:36:12 +09:00
Salman Ahmed
554652b033
Merge branch 'refactor-combo-colour-retrieval' into legacy-beatmap-combo-offset
2021-07-20 10:11:52 +03:00
Salman Ahmed
1af230c48c
Merge branch 'master' into refactor-combo-colour-retrieval
2021-07-20 10:08:25 +03:00
Dean Herbert
c18b8ca86c
Add missing ToArray()
call
2021-07-07 14:08:29 +09:00
Dean Herbert
ca791c2afa
Remove unused using statement
2021-07-07 13:53:00 +09:00
Dean Herbert
35d4b12a4f
Remove single local usage of AllSources
2021-07-07 13:52:52 +09:00
Dean Herbert
eb8b14a931
Reorder methods to make more sense
2021-07-07 13:51:51 +09:00
Dean Herbert
523546d8b6
Use List to guarantee lookup order
2021-07-06 22:51:56 +09:00
Dean Herbert
d75d67577a
Fix regressed tests
2021-07-06 17:37:34 +09:00
Dean Herbert
cd4885e450
Add xmldoc and remove any question of how the intitial flow is being run
2021-07-06 17:18:45 +09:00
Dean Herbert
032c285ede
Move private downwards
2021-07-06 17:07:29 +09:00
Dean Herbert
1232925f93
Make source manipulation methods protected
2021-07-06 17:06:00 +09:00
Dean Herbert
b4240d3ca4
Simplify lookups to avoid a second dictionary fetch
2021-07-06 17:04:59 +09:00
Dean Herbert
ec1224218c
Localise source changed flow for better clarity
2021-07-06 16:57:19 +09:00
Dean Herbert
935fbe7cc6
Remove double fetch/binding of parent source
2021-07-06 16:51:29 +09:00
Dean Herbert
93ef783339
Remove BindableList usage
2021-07-06 16:40:23 +09:00
PercyDan54
e1c646b9b2
Remove redundant arguments
2021-07-05 23:52:39 +08:00
Dean Herbert
ec71deec51
Remove some mentions of "lazer"
...
I am aware there are more throughout the codebase but intentionally left
the remaining mentioned for one reason or another. The intention here is
to mainly change user-facing versioning to change the positioning of the
"lazer" term (to be where we would expect "cuttingedge" or "beta" to
be).
2021-07-04 12:41:27 +09:00
Dean Herbert
6e31c781bb
Merge pull request #13382 from ribbanya/clamp-skin-scale
...
Fix skin elements flipping when scaled below zero
2021-07-02 20:50:47 +09:00
aitani9
9b0fa6d3fc
Make flipping reflect across the axes of the selection box
2021-07-01 15:38:38 -07:00
Dean Herbert
094cd31361
Merge pull request #13441 from frenzibyte/ruleset-resources-skin
...
Provide access to ruleset resources during `ISkinSource` lookups
2021-06-30 15:26:37 +09:00
Dan Balasescu
92fcf90768
Merge branch 'master' into import-early-checksum-abort
2021-06-28 19:29:08 +09:00
Salman Ahmed
66fc95c111
Use LastOrDefault
instead
2021-06-28 12:43:58 +03:00
Salman Ahmed
7197998a10
Remove resolution to SkinManager
and use pattern matching instead
2021-06-28 12:43:13 +03:00
Salman Ahmed
177bfe1234
Merge branch 'master' into ruleset-resources-skin
2021-06-28 11:16:37 +03:00
Salman Ahmed
779a1b322c
Add comment explaining insertion of ruleset skin before default skin
...
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-06-28 09:38:42 +03:00
Salman Ahmed
f598de4cdb
ResourcesSkin -> ResourceStoreBackedSkin
2021-06-28 09:18:29 +03:00
Salman Ahmed
692f24437e
Maintain ruleset resources skin across multiple source changes
2021-06-28 09:11:28 +03:00
Dean Herbert
f777741ca7
Simplify instantiation
2021-06-28 14:51:27 +09:00
Dean Herbert
e387feb1d6
Add inline comment mentioning why CreateChildDependencies
is being used in this instance
2021-06-28 14:39:55 +09:00
Dean Herbert
fdd6778f36
Merge branch 'master' into fix-initial-ruleset-skin-loading
2021-06-28 14:35:34 +09:00
Dean Herbert
44f875b802
Bypass optimised existing check in SkinManager
(due to custom hashing function)
2021-06-27 16:35:13 +09:00
Dean Herbert
d1f852d102
Make Populate
abstract to avoid unnecessary base call async complexity
2021-06-27 14:29:02 +09:00
Salman Ahmed
e8e9fdd533
Dispose ResourcesSkin
before clearing skin sources
2021-06-26 12:34:30 +03:00
Salman Ahmed
e5eea503db
Remove finalizer logic from ResourcesSkin
2021-06-26 12:21:49 +03:00
Salman Ahmed
f07008a0a2
Fix RulesetSkinProvidingContainer
potentially late in setting up skin sources
2021-06-25 10:05:51 +03:00
Salman Ahmed
a98b5618b8
Convert RulesetResourcesSkin
to plain ResourcesSkin
and pass non-null resources
2021-06-24 10:07:38 +03:00
Salman Ahmed
d484469906
Handle case where SkinManager
sources aren't part of AllSources
...
In tests.
2021-06-23 10:44:23 +03:00
Salman Ahmed
53fa229880
Add ruleset resources skin before SkinManager.DefaultSkin
2021-06-23 10:09:25 +03:00
Salman Ahmed
2e6800f586
Enable NRT in RulesetResourcesSkin
2021-06-23 09:52:00 +03:00
Salman Ahmed
0db06c727b
Dispose resource stores on finalizer
2021-06-23 09:41:45 +03:00
Salman Ahmed
ee84364d7c
Resolve conflict issues
2021-06-22 20:38:24 +03:00
Salman Ahmed
896c1dc202
Merge branch 'master' into ruleset-resources-skin
2021-06-22 20:36:49 +03:00
Dean Herbert
4cb9c6a842
Merge pull request #13423 from frenzibyte/transformers-per-skin
...
Refactor ruleset skin transforming logic to be per-`ISkin` rather than one `ISkinSource`
2021-06-22 21:24:56 +09:00
Salman Ahmed
71e2815e7e
Update and improve code documentation
...
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-06-22 12:05:17 +03:00
Salman Ahmed
c1284940e1
Fix potentially providing the same skin instance twice in AllSources
2021-06-22 10:49:37 +03:00
Salman Ahmed
d0cdc07b11
Reuse AllSources
when looking up on FindProvider
2021-06-22 10:49:21 +03:00
Dean Herbert
4b3165084d
Move scoped functionality into local function
2021-06-22 16:40:56 +09:00
Dean Herbert
ffac32a848
Reword xmldoc
2021-06-22 16:40:48 +09:00
Dean Herbert
14bdcef26b
Add missing newline
2021-06-22 16:20:09 +09:00
Dean Herbert
0ad189e357
Expose skin sources via ISkinSource
and revert to consuming based on hierarchy
2021-06-22 16:19:55 +09:00
Dean Herbert
1b0aadcc6f
Merge branch 'master' into transformers-per-skin
2021-06-22 16:03:15 +09:00
Salman Ahmed
ec040ff3fc
Fix leak due to not properly unbinding SourceChanged
event on disposal
2021-06-22 05:05:41 +03:00
Salman Ahmed
caa90bccc6
Fix default skin potentially added twice in RulesetSkinProvidingContainer
2021-06-22 03:45:43 +03:00
Salman Ahmed
627c857da8
Propagate SourceChanged
events from SkinManager
down in the ruleset skin container
2021-06-22 03:45:24 +03:00
Salman Ahmed
9e5bb146d3
Add xmldoc to SkinManager
...
The `<summary>` part comes from `BeatmapManager`, which I believe works correctly here as well, as this does handle the "storage and retrieval" of skins.
2021-06-22 03:07:31 +03:00
Salman Ahmed
97dbc7f20e
Add back SkinManager.DefaultSkin
to the ruleset skin lookup sources
2021-06-22 02:54:34 +03:00
Salman Ahmed
d53a43cf3c
Isolate RulesetSkinProvidingContainer
from falling back to parent skin sources
...
For simplicity of lookup order, and which sources are used for the lookup.
2021-06-22 02:53:22 +03:00
Salman Ahmed
ebe0d43790
Add ability to disallow falling back to parent skins
2021-06-22 02:51:17 +03:00
Salman Ahmed
5cfd0e3223
Remove implicit LegacySkin
check and refactor anything using it
2021-06-21 04:16:58 +03:00
Dean Herbert
c751e087ca
Merge branch 'master' into skin-editor-closest-anchor
2021-06-18 18:54:07 +09:00
Salman Ahmed
780388d174
Fix incorrect return value
2021-06-17 03:48:29 +03:00
Salman Ahmed
74ad6f9117
Remove default skin from the ruleset skin sources
...
That one doesn't need any changes to it, can be fetched from the `SkinManager` instead.
2021-06-16 17:24:31 +03:00
Salman Ahmed
52ddf08532
Consider not adding legacy skin transformers to non-legacy skins
2021-06-16 17:24:16 +03:00
Salman Ahmed
5ebf570ec4
Revert GetRulesetTransformedSkin
accessibility change
...
This reverts commit 521077b714
.
Forgot to do it when I made this `protected`, but subclasses in test scenes require this.
2021-06-16 16:49:38 +03:00
smoogipoo
2155a4da0a
Fix intermittent HUD test failure
2021-06-16 19:52:58 +09:00
Dean Herbert
521077b714
Make getRulesetTransformedSkin
private
2021-06-16 17:44:18 +09:00
Dean Herbert
4b45d8318e
Merge branch 'master' into transformers-per-skin
2021-06-16 16:37:28 +09:00
Salman Ahmed
8de0d33c5a
Revert "Move collection change bind to LoadComplete"
...
This reverts commit d6d87e1975
.
Actually that broke things due to the "disableable" instances not added early enough, revert for now.
2021-06-11 17:59:29 +03:00
Salman Ahmed
b6947c25ec
Fix potentially adding the same skin multiple times
2021-06-11 17:55:07 +03:00
Salman Ahmed
d6d87e1975
Move collection change bind to LoadComplete
...
Best practice anyways
2021-06-11 17:35:33 +03:00
Salman Ahmed
108a3deb27
Also handle null Ruleset.CreateLegacySkinProvider
values
...
Let's just go this way for now, maybe it's a better choice to always create transformers and disallow null, but it's too much work and out of scope at this point
2021-06-11 16:26:54 +03:00
Bartłomiej Dach
550d566bf9
Simplify member access
2021-06-11 14:24:17 +02:00
Bartłomiej Dach
876a357bf2
Add support for animated colour fill in new style legacy health bar
2021-06-11 14:24:17 +02:00
Robin Avery
0c8851f4b7
Extract drawable.ScreenSpaceDrawQuad
to a variable
2021-06-11 07:06:22 -04:00
Robin Avery
a6774eb5b5
Inline getOriginPositionFromQuad
2021-06-11 06:59:00 -04:00
Robin Avery
c9b4f9eb71
Make getOriginPositionFromQuad
local
2021-06-11 06:55:47 -04:00
Robin Avery
1bc8460902
Rename getTieredComponent
to getAnchorFromPosition
...
Also rename parameter `component` to `xOrY`.
2021-06-11 06:53:40 -04:00
Robin Avery
6e181a6b63
Rename parameters of getTieredComponent
2021-06-11 06:53:04 -04:00
Robin Avery
a76eaeb52d
Make getTieredComponent
local
2021-06-11 06:51:12 -04:00
Robin Avery
635300b311
Recalculate closest anchor when origin is changed
2021-06-11 06:28:30 -04:00
Robin Avery
a506f2a776
Revert rename of lambda variables
2021-06-11 06:22:24 -04:00
Salman Ahmed
f20146d446
Fix potentially adding null skin sources
2021-06-11 12:58:38 +03:00
Salman Ahmed
e59beffc4e
Forward all base transformer lookup methods to Skin
2021-06-11 12:44:25 +03:00
Salman Ahmed
9e16359f18
Refactor disallowing in SkinProvidingContainer
to become per source
...
Fixes `FindProvider` becoming completely broken, because of no way to perform the checks on one skin source.
2021-06-11 12:29:29 +03:00
Salman Ahmed
2e01e61177
Move TODO comment to correct location
2021-06-11 11:46:30 +03:00
Salman Ahmed
8132852753
Add other affectable change action cases
2021-06-11 11:34:22 +03:00
Salman Ahmed
a985e3b8d3
Apply documentation settings for better readability
...
Co-authored-by: Dean Herbert <pe@ppy.sh>
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2021-06-11 11:25:07 +03:00
Dean Herbert
debd359d2e
Update xmldoc
2021-06-11 14:50:21 +09:00
Dean Herbert
b9050f91a4
Expose as Skin
s and consume SkinInfo
from instances
2021-06-11 14:49:35 +09:00
Salman Ahmed
169c98f963
Add skin providing ruleset resources in RulesetSkinProvidingContainer
2021-06-11 00:25:22 +03:00
Salman Ahmed
2240e2c39c
Refrain from attempting to clear skin sources in disposal
...
`Drawable.Dispose` is usually in an asynchronous context (async disposals stuff) and therefore this could cause a "collection was modified; enumeration opeartion may not execute" exception.
2021-06-10 17:23:16 +03:00
Salman Ahmed
ef2c4fd0d8
Make RulesetSkinProvidingContainer
able to be overriden for testing purposes
2021-06-10 16:36:46 +03:00
Salman Ahmed
09a2d008d2
Refrain from attempting to transform null skins
2021-06-10 16:36:45 +03:00
Salman Ahmed
5c9c424a0d
Switch state case placements for consistency
...
Tickled me.
2021-06-10 13:15:18 +03:00
Salman Ahmed
c3a2f2c2a4
Expose default SkinManager
providers for use in RulesetSkinProvidingContainer
2021-06-10 13:07:32 +03:00
Salman Ahmed
59be3588eb
Change SkinSources
to a bindable list for binding SourceChanged
events
2021-06-10 13:07:32 +03:00
Salman Ahmed
dde84e5cbd
Merge branch 'master' into transformers-per-skin
2021-06-10 11:58:52 +03:00
Salman Ahmed
58cca9da06
Revert "Expose the skin lookup layers of SkinManager
to a property"
...
This reverts commit 9e652715ce
.
2021-06-10 11:57:28 +03:00
Salman Ahmed
530026b675
Add simple xmldoc to ctors explaining their deal with SkinSources
2021-06-10 11:56:13 +03:00
Salman Ahmed
18edbdd135
Remove mentioning of "layer" in skin providers
...
`SkinSources` sounds better.
2021-06-10 11:55:26 +03:00
Dan Balasescu
479d6d3fc5
Merge branch 'master' into fix-beatmap-skin-disables
2021-06-10 16:37:58 +09:00
Salman Ahmed
33a9cac398
Add special RulesetSkinProvidingContainer
managing ruleset-compatible skin setup
2021-06-09 22:49:31 +03:00
Salman Ahmed
9e652715ce
Expose the skin lookup layers of SkinManager
to a property
2021-06-09 22:49:31 +03:00
Salman Ahmed
6538d44708
Make SkinProvidingContainer
able to perform lookup on multiple skins
...
Currently `protected` functionality for use in custom `SkinProvidingContainer`s, can be exposed to public constructors if it need to later on, but I'm not sure about doing that opposed to just nesting multiple `SkinProvidingContainer`.
2021-06-09 22:49:31 +03:00
Salman Ahmed
cf40282f1f
Convert LegacySkinTransformer
s to accept raw ISkin
s rather than a full ISkinSource
2021-06-09 22:49:31 +03:00
Dean Herbert
0cf7c56e7e
Add fallback lookup support for DefaultSkin
2021-06-09 18:51:42 +09:00
Dean Herbert
2438c20d63
Fix SourceChanged
not being correctly forwarded through LegacySkinTransformer
2021-06-09 17:56:07 +09:00
Dean Herbert
448e4e7ee5
Fix FindProvider
calls on SkinProvidingContainer
not considering disable flags
...
Closes #13394 .
2021-06-09 16:19:04 +09:00
Robin Avery
2484ccd50c
Ensure scale x or y does not go below zero in SkinSelectionHandler.HandleScale
2021-06-08 11:49:25 -04:00
Robin Avery
10b6b72909
Add guard clause to applyOrigins
and rename parameter
2021-06-08 10:29:45 -04:00
Robin Avery
d212918d67
Rename applyCustomAnchors
to applyFixedAnchors
for consistency with UsesFixedAnchor
2021-06-08 10:14:07 -04:00
Robin Avery
2c88e6df8d
Simplify applyClosestAnchor
to one line by moving another guard clause
2021-06-08 10:09:48 -04:00
Robin Avery
f22cc981d1
Move guard clause from checkAndApplyClosestAnchor
to applyAnchor
2021-06-08 09:51:39 -04:00
Robin Avery
529a80871b
Rename some methods for clarity
...
Methods which operate on a collection of `ISkinnableDrawable`s are now
plural; ones which take a single item are singular.
This also allows cutting down the name of `getClosestAnchorForDrawable`
to just `getClosestAnchor`.
2021-06-08 09:44:42 -04:00
Robin Avery
01da73daf2
Refactor updateDrawableAnchorIfUsingClosest
2021-06-08 09:25:49 -04:00
Robin Avery
6b127f50f2
Inline updateDrawableAnchorIfUsingClosest
2021-06-08 09:14:04 -04:00
Robin Avery
dc50ae40b9
Rename OverridesClosestAnchor
to UsesFixedAnchor
2021-06-08 08:28:42 -04:00
Dean Herbert
6017ef3825
Merge branch 'master' into fix-skin-sample-lookup
2021-06-08 17:37:36 +09:00
Dan Balasescu
791855dfa0
Merge branch 'master' into legacy-skin-default-fallback
2021-06-08 16:54:26 +09:00
Dan Balasescu
67135ce3db
Add null check
2021-06-08 16:15:17 +09:00
Dean Herbert
e0f568aa8f
Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup
2021-06-08 15:19:52 +09:00
Dean Herbert
f3f634e969
Clean up previous sample immediately on skin source change to avoid Play
after disposal
...
This seems to be the simplest way to avoid calls to `Play` after the
underlying sample may have been disposed. As per the issue thread, a
local workaround is acceptable here.
Closes #13223 .
2021-06-08 15:05:18 +09:00
Dean Herbert
27e3de3ea3
Add TODO about beatmap skin fallback support
2021-06-08 12:12:14 +09:00
Dean Herbert
06840d78cc
Remove now unused method
2021-06-08 12:06:42 +09:00
Dean Herbert
2c1f22d7ae
Refactor animation lookup to properly handle skins providing non-animated resources
2021-06-08 01:17:20 +09:00
Dean Herbert
e7e9197f03
Fix FindProvider
not correctly checking legacy default in SkinManager
2021-06-08 00:42:50 +09:00
Dean Herbert
6d56e02ddb
Add back incorrectly reverted animation handling logic
...
This reverts commit b904fa6615
.
2021-06-08 00:17:01 +09:00
Dean Herbert
c0305343bc
Fix FindProvider
incorrectly returning LegacySkinTransformer
itself
2021-06-07 23:23:44 +09:00
Dean Herbert
08701b5eab
Ensure all lookups in LegacyHealthDisplay
use the found provider
...
Not actually needed to fix the remaining issue but does feel better
2021-06-07 23:23:12 +09:00
Robin Avery
65f594f860
Rename applyAnchor
to applyCustomAnchor
2021-06-07 05:08:18 -04:00
Robin Avery
6c9594ee35
Simplify and rearrange SkinSelectionHandler
...
The file has been restructured and reworded such that there are as few
differences as possible from b36b40cb34
.
2021-06-07 02:40:15 -04:00
Robin Avery
29fa4fdf57
Refactor unacceptable syntax
2021-06-07 01:08:39 -04:00
Robin Avery
133d72a8c0
Rename UsingClosestAnchor
...
It is now "OverridesClosestAnchor". The logic is inverted accordingly.
2021-06-07 00:14:36 -04:00
Robin Avery
f28916e30f
Remove all UsingClosestAnchor() extension logic
...
It is replaced with ISkinnableDrawable.UsingClosestAnchor.
2021-06-07 00:04:53 -04:00
Robin Avery
ce635af83e
Add UsingClosestAnchor to ISkinnableDrawable
...
Also implement it as an auto property in its inheritors.
The auto properties default to true.
2021-06-06 23:47:47 -04:00
Dean Herbert
d26c9a66c2
Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup
2021-06-07 12:01:19 +09:00
Robin Avery
6a456e53f4
Rename overly long method
2021-06-06 13:28:17 -04:00
Robin Avery
888882ac63
Remove first-person comment
2021-06-06 13:27:13 -04:00
Dean Herbert
e10dfab2e8
Ensure scorebar marker lookup is performed on the source the background is retrieved from
2021-06-06 23:23:35 +09:00
Robin Avery
da1c38d5a9
Uninvert logic of SkinnableInfo.UsingClosestAnchor
...
Also rename "IsUsingClosestAnchor" to simply "UsingClosestAnchor".
2021-06-06 10:13:35 -04:00
Dean Herbert
b5f145cfa9
Use null propagation for animation lookups
2021-06-06 23:01:37 +09:00
Robin Avery
63346f6b75
Refactor getTieredComponent
2021-06-06 09:40:58 -04:00
Robin Avery
c9f5808bf2
Move lookup logic to DrawableExtensions
...
This is now a global lookup to be shared by serialization and editor.
2021-06-06 06:58:21 -04:00
Robin Avery
4aee76456f
Replace localised strings with static English
2021-06-06 05:34:32 -04:00
Robin Avery
c452715bf1
Allow skin elements to find closest anchor
...
- Resolves ppy/osu#13252
- Add localisation strings for the context menu instead of using enum
2021-06-06 01:32:04 -04:00
Dean Herbert
b904fa6615
Revert "Ensure all frames in an animation are retrieved from the same skin"
...
This reverts commit 37c8c63fc5
.
2021-06-06 12:37:42 +09:00
Dean Herbert
b87a5956dd
Add fallback logic to SkinManager
2021-06-06 12:17:55 +09:00
Dean Herbert
39f99bf785
Move FindProvider
to ISkinSource
2021-06-06 12:17:32 +09:00
Dean Herbert
ae2165b3be
Fix incorrect xmldoc
2021-06-04 16:44:04 +09:00
Dean Herbert
37c8c63fc5
Ensure all frames in an animation are retrieved from the same skin
2021-06-04 16:18:04 +09:00
Dan Balasescu
c065f761c7
Merge branch 'master' into legacy-skin-default-fallback
2021-06-02 19:08:52 +09:00
Dean Herbert
2e2281c7d2
Revert disabling taiko sample tests and fix logic
2021-06-01 18:57:19 +09:00
Dean Herbert
3a6d081d82
Remove duplicated taiko fallback
2021-06-01 18:04:49 +09:00
Dean Herbert
ea4644be90
Revert "Fix weird taiko logic failing for weird reasons that probably should not have been a thing"
...
This reverts commit 69c4ccad05
.
2021-06-01 18:04:49 +09:00
Dean Herbert
a837fc9e3b
Remove duplicated taiko fallback
2021-06-01 18:00:24 +09:00
Dean Herbert
df0a5689e4
Revert "Fix weird taiko logic failing for weird reasons that probably should not have been a thing"
...
This reverts commit 69c4ccad05
.
2021-06-01 17:13:13 +09:00
Dean Herbert
ff815cb4b4
Fix incorrect xmldoc
2021-06-01 16:57:41 +09:00
Salman Ahmed
7c6400735f
Merge branch 'master' into remove-hud-component-lookup
2021-06-01 10:17:52 +03:00
Dean Herbert
00b3eea840
Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup
2021-05-31 21:39:04 +09:00
Dean Herbert
69c4ccad05
Fix weird taiko logic failing for weird reasons that probably should not have been a thing
2021-05-31 21:29:47 +09:00
Dean Herbert
1161378b6b
Fix incorrect fallback logic in LegacyBeatmapSkin
2021-05-31 21:29:47 +09:00
Dean Herbert
282c5a9177
Fix potential nullref in SkinProvidingContainer
2021-05-31 21:29:47 +09:00
Dean Herbert
3ff9f9c89d
Make FindProvider
non-default
2021-05-31 21:29:47 +09:00
Dean Herbert
8e489754cc
Add ability for LegacySkin
s to customise the fallback provider
2021-05-31 21:29:47 +09:00
Dean Herbert
88ed95e012
Add FindProvider
lookup function
2021-05-31 21:29:47 +09:00
Dean Herbert
1d30791ab0
Add potential pathway for legacy lookups
2021-05-31 21:29:47 +09:00
Dean Herbert
4b27d43e26
Add new parameter for default fallback logic in LegacySkin
2021-05-31 21:29:47 +09:00
Dean Herbert
17fa2426d4
Merge branch 'master' into legacy-skin-resource-improvements
2021-05-31 19:36:09 +09:00
Dean Herbert
65709ec7d7
Move leagcy resource store construction local to DefaultLegacySkin
2021-05-31 19:14:49 +09:00
Dean Herbert
b16d10bd95
Provide game-wide resources via IStorageResourceProvider
2021-05-31 18:57:47 +09:00
Dean Herbert
de0e51a81d
Merge branch 'master' into fix-skin-sample-lookup
2021-05-31 15:27:39 +09:00
Salman Ahmed
02d18c7a49
Merge branch 'master' into remove-hud-component-lookup
2021-05-31 09:23:04 +03:00
Salman Ahmed
fb81e5133f
Merge branch 'master' into catch-hide-combo-workaround
2021-05-30 14:16:46 +03:00
Salman Ahmed
53cbf369d7
Fix potential nullref
2021-05-29 21:22:46 +03:00
Salman Ahmed
42618c713f
Merge branch 'master' into legacy-beatmap-skin-hud-fallback
2021-05-29 20:56:05 +03:00
Dean Herbert
70a844ac10
Remove allowFallback
parameters completely
2021-05-27 14:50:42 +09:00
Dean Herbert
4fd89faaa4
Fix default skin not having resources or providing samples
2021-05-27 14:09:01 +09:00
Dean Herbert
b36b40cb34
Remove unnecessary double specification
2021-05-26 15:20:47 +09:00
kamp
65649e5a62
Prevent skin editor crash when scaling 0 area drawables
...
Some skinnable drawables can have 0 width or height in certain
cases, leading to division by 0 and a crash when the position is
updated.
2021-05-24 21:36:42 +02:00
Dean Herbert
caa2c5638e
Fix legacy combo counter not accounting for song progress bar
2021-05-23 16:46:57 +09:00
Dean Herbert
45c6a9ca91
Merge branch 'refactor-selection-rotate-logic' into fix-flip-logic-discrepancy
2021-05-22 21:17:58 +09:00
Dean Herbert
7d88a19d7f
Remove unnecessary field storage of origin reference
2021-05-22 21:03:40 +09:00
Dean Herbert
34a5b22b79
Merge branch 'master' into refactor-selection-rotate-logic
2021-05-22 20:52:28 +09:00
Dean Herbert
485728ca4e
Merge pull request #12866 from peppy/refactor-selection-scale-logic
...
Add proper scaling support to skin editor
2021-05-22 20:07:03 +09:00
Dean Herbert
bb2fae55ce
Merge branch 'master' into refactor-selection-rotate-logic
2021-05-21 19:19:54 +09:00
Dean Herbert
0d575f5728
Remove incorrect (and unintended) modulus logic
2021-05-21 15:06:53 +09:00
Dean Herbert
f9d51656b6
Fix scaling of rotated items not behaving in an understandable way
2021-05-21 15:02:36 +09:00
Dan Balasescu
7845d07dd5
Merge pull request #12886 from peppy/fix-skin-editor-context-menu-sticking
...
Fix skin editor context menus not dismissing when clicking away
2021-05-20 21:03:35 +09:00
Dean Herbert
1848bd902d
Fix skin editor context menus not dismissing when clicking away
2021-05-20 19:51:07 +09:00
Dean Herbert
df5970fab4
Create base implementations of the two most common TernaryStateMenuItem
s
2021-05-20 19:34:53 +09:00
Dean Herbert
20f1ef4318
Extract common implementation of updating drawable position from screen space pos
2021-05-20 18:35:13 +09:00
Dean Herbert
6f75c59760
Fix flip logic not using the full selection quad
2021-05-20 18:31:51 +09:00
Dean Herbert
95c78b9185
Split out common selection quad logic
2021-05-20 18:24:25 +09:00
Dean Herbert
27e81d6504
Implement proper rotation algorithm for skin editor
2021-05-20 18:21:16 +09:00
Salman Ahmed
43094425e2
Merge branch 'legacy-beatmap-skin-hud-fallback' into catch-hide-combo-workaround
2021-05-19 23:18:27 +03:00
Salman Ahmed
9f3ea150f5
Fix legacy beatmap skins not falling back properly on HUD components
2021-05-19 23:01:29 +03:00
Bartłomiej Dach
788f1fcf48
Merge branch 'master' into disable-skin-editor-border
2021-05-19 21:52:29 +02:00
Salman Ahmed
21ca9c8431
Merge branch 'master' into beatmap-skin
2021-05-19 22:39:32 +03:00
Dean Herbert
eb5db8ff03
Disable border display on skin editor to avoid crashes
...
This wasn't being displayed correctly anyway, so rather than fixing
let's just remove it for now.
Closes #12868 .
2021-05-20 02:01:46 +09:00
Dean Herbert
22337e0fc7
Add comment explaining why origin is flipped
2021-05-20 01:59:30 +09:00
Dean Herbert
363aec8179
Merge branch 'master' into hit-error-skinnable
2021-05-20 01:51:45 +09:00
Dean Herbert
a55879e511
Fix oversights in scale algorithm
2021-05-20 01:47:31 +09:00
Dean Herbert
14af86d6c5
Use the same code path for all scaling
2021-05-19 21:46:41 +09:00
Dean Herbert
6a3c58b9ad
Implement proper scaling algorithms
2021-05-19 19:58:55 +09:00
Salman Ahmed
825d61e22c
Separate default beatmap skins from DefaultSkin
2021-05-19 12:06:10 +03:00
Salman Ahmed
9806d94b74
Move beatmap skin info creation to static method at IBeatmapSkin
2021-05-19 11:58:00 +03:00
Salman Ahmed
c98d036b48
Merge branch 'master' into catch-hide-combo-workaround
2021-05-18 17:47:20 +03:00
Salman Ahmed
08ee1e4853
Remove HUD skin component lookup in favour of MainHUDComponents
target system
2021-05-18 12:37:23 +03:00
Dean Herbert
d661e98fa6
Move common functionality out of OsuSelectionHandler
and implement flip support
2021-05-18 18:34:06 +09:00
Dean Herbert
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
Dean Herbert
10c730b37d
Add new default locations for hit bar error displays
2021-05-18 15:50:50 +09:00
Salman Ahmed
f667ea3fd0
Replace AllowDefaultHUDComponentsFallback
with a temporary override at LegacyBeatmapSkin
2021-05-17 21:34:53 +03:00
Dan Balasescu
ea4dfd3374
Merge pull request #12842 from peppy/song-progress-skinnable
...
Add layout customisation support for `SongProgress`
2021-05-17 20:15:01 +09:00
Dean Herbert
42d2711dc6
Use ShouldBeConsideredForInput
instead of ReceivePositionalInputAtSubTree
2021-05-17 19:29:59 +09:00
Dean Herbert
60f3e628bc
Fix song progress being interactable inside toolbox button
2021-05-17 19:05:22 +09:00
Dean Herbert
da0913ca2d
Make SongProgress
a skinnable component
2021-05-17 18:52:56 +09:00
smoogipoo
0d7a349500
Exclude interfaces from skinnable types
2021-05-17 18:16:09 +09:00
Salman Ahmed
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
Bartłomiej Dach
7665bdfbbb
Merge branch 'master' into null-assignment-warning-enable
2021-05-15 01:08:34 +02:00
Bartłomiej Dach
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
Bartłomiej Dach
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
Bartłomiej Dach
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
Bartłomiej Dach
3d3c5028e6
Trim unnecessary array copy
2021-05-14 22:33:26 +02:00
Bartłomiej Dach
743b4fbff1
Pass correct member name to ArgumentException
s
2021-05-14 22:16:37 +02:00
Bartłomiej Dach
876f53bf3b
Fix copy-paste oversights in xmldoc & exception messages
2021-05-14 22:15:43 +02:00
Dean Herbert
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
Dean Herbert
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
Bartłomiej Dach
6a64a705b8
Merge branch 'master' into skin-blueprint-aspect-lock
2021-05-13 17:53:00 +02:00
Bartłomiej Dach
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
Dean Herbert
0fa90a80d4
Merge branch 'master' into skin-blueprint-aspect-lock
2021-05-13 23:38:53 +09:00
Dean Herbert
3ecbb9ec4b
Merge branch 'master' into skin-blueprint-anchor-origin
2021-05-13 23:38:04 +09:00
Dean Herbert
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
Dean Herbert
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
Dean Herbert
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
Dean Herbert
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
Dean Herbert
6c12cae105
Remove unnecessary property
2021-05-13 22:25:11 +09:00
Dean Herbert
c57a2f43fa
Merge branch 'master' into skin-blueprint-visual-improvements
2021-05-13 22:22:42 +09:00
smoogipoo
4cf4817ad2
Remove redundant parens
2021-05-13 22:11:58 +09:00
Dan Balasescu
d2fdd1e521
Merge branch 'master' into stable-anchor-origin
2021-05-13 22:06:21 +09:00
Dan Balasescu
67f795cfa6
Merge branch 'master' into save-on-forced-exit
2021-05-13 22:00:38 +09:00
smoogipoo
1e23c53507
Fix inspection
2021-05-13 21:59:38 +09:00
Dan Balasescu
d5b14b6b99
Merge branch 'master' into remove-skinnable-hud-classes
2021-05-13 21:06:48 +09:00
Dean Herbert
b939318922
Merge branch 'skin-serialisation' into skin-editor-default-placement-location
2021-05-13 19:09:34 +09:00
Dean Herbert
e5f765d1a8
Fix broken exception message
2021-05-13 19:06:58 +09:00
Dean Herbert
bda0ea463a
Merge branch 'skin-serialisation' into save-on-forced-exit
2021-05-13 19:05:47 +09:00
Dean Herbert
c8b7cfc753
Merge branch 'skin-serialisation' into remove-skinnable-hud-classes
2021-05-13 19:05:08 +09:00
Dean Herbert
07e475cd13
Fix skin blueprint box drawing incorrectly when both scale and rotation are applied
2021-05-13 18:54:40 +09:00
smoogipoo
2f025f1967
SkinnableTargetWrapper -> SkinnableTargetComponentsContainer
2021-05-13 18:54:30 +09:00
Dean Herbert
01bc71acd2
Improve ability to parse xmldoc of SkinnableTargetWrapper
...
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2021-05-13 18:40:28 +09:00
Dean Herbert
df77b28b48
Add a flimsy guard against null parent to avoid crashes on exit sequence
2021-05-13 18:39:21 +09:00
Dean Herbert
9f8e6979dd
Fix display of skin blueprints when flipped
2021-05-13 18:00:25 +09:00
Dean Herbert
1cda55393e
Add aspect ratio locking and flip support to skin editor
2021-05-13 17:51:57 +09:00
Dean Herbert
ebce3fd3c7
Use ScheduleAfterChildren
to better match comment
2021-05-13 17:29:11 +09:00
Dean Herbert
3ea469813c
Use interface in place of SkinnableTargetContainer
2021-05-13 17:25:51 +09:00
Dean Herbert
0959e7156a
Remove outdated TODO
2021-05-13 17:22:05 +09:00
Dean Herbert
106fa97a11
Rename SkinnableElementTargetContainer
to SkinnableTargetContainer
2021-05-13 17:07:38 +09:00
Dean Herbert
7921dc7ece
Rename ISkinnableComponent
to ISkinnableDrawable
2021-05-13 17:06:00 +09:00
Dean Herbert
cdcd31b546
Replace ISkinSerialisable
with IsEditable
property
2021-05-13 17:03:17 +09:00
Dean Herbert
dd6a06a302
Reword xmldoc to read better
2021-05-13 16:43:42 +09:00
Dean Herbert
9dfa48b22e
Fix incorrect exception text
2021-05-13 16:42:43 +09:00
Dean Herbert
19223ba013
Remove left-over debug logging
2021-05-13 16:42:13 +09:00
Dean Herbert
5818ed4c8c
Remove unused DI resolution
2021-05-13 16:41:36 +09:00
Dean Herbert
db19617b8b
Add JsonConstructor
attribute to SkinnableTargetWrapper
2021-05-13 13:16:20 +09:00
Dean Herbert
3b862798e9
Standardise naming of methods related to SkinnableInfo
2021-05-13 13:14:49 +09:00
Dean Herbert
581e7940c7
Add xmldoc to SkinnableElementTargetContainer
2021-05-13 13:13:22 +09:00
Dean Herbert
c93ed541f3
Add xmldoc and tidy up logic in Skin
2021-05-13 13:09:33 +09:00
Dean Herbert
992a052426
Remove stray comment
2021-05-13 13:07:06 +09:00
Dean Herbert
469a7f5d2a
Reorder fields in SkinEditor
2021-05-13 13:04:17 +09:00
Dean Herbert
2bf8635ffd
Move field upwards in class
2021-05-13 13:03:23 +09:00
Dean Herbert
a38cb61b08
Remove duplicated call to base.GetDrawableComponent
2021-05-13 13:02:55 +09:00
Dean Herbert
8b9ac86d4b
Merge branch 'master' into skin-serialisation
2021-05-13 12:35:06 +09:00
Bartłomiej Dach
27ca7d0f4f
Actually annotate the correct ctor
2021-05-12 23:53:39 +02:00
Bartłomiej Dach
a6aec6e007
Fix missed InstantiationInfo
setter usages
2021-05-12 23:34:25 +02:00
Bartłomiej Dach
1b579dd838
Extract invariant instantiation info extension method
2021-05-12 23:23:51 +02:00
Bartłomiej Dach
4464204e33
Mark all skin ctors used via reflection in SkinInfo.CreateInstance()
2021-05-12 23:23:42 +02:00
Dean Herbert
7bac81f394
Fix incorrect inline comments
...
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2021-05-12 19:37:00 +09:00
Dean Herbert
55e1f97f59
Remove unused using statement
2021-05-12 19:06:40 +09:00
Dean Herbert
75227e5a70
Change default skin to use component lookup for conformity
2021-05-12 18:55:48 +09:00
Dean Herbert
0a895fff15
Remove remaining test usage of SkinnableXXX
HUD components
2021-05-12 18:53:25 +09:00
Dean Herbert
088335a035
Revert "Also save on skin switch"
...
This reverts commit 2f55d1e5ab
.
2021-05-12 17:45:51 +09:00
Dean Herbert
2f55d1e5ab
Also save on skin switch
2021-05-12 17:42:12 +09:00
Dean Herbert
be187e8ebd
Avoid hard crash if Save()
is called before preparing for mutation
2021-05-12 17:42:04 +09:00
Dean Herbert
9df08560b6
Save skin editor changes on forced exit
2021-05-12 16:07:00 +09:00
Dean Herbert
494a1b01a5
Move SkinnableElementTargetContainer
out of HUD namespace
2021-05-12 15:59:33 +09:00
Dean Herbert
29e6f6b6b6
Remove public
prefixes from interface type and add Components
list for future use
2021-05-12 15:58:21 +09:00
Dean Herbert
05e0c57a6a
Keep component positions stable when changing anchor/origin
2021-05-12 15:30:52 +09:00
Dean Herbert
d55f42dc2e
Show anchor and origin in skin blueprints when selected
2021-05-12 15:12:17 +09:00
Dean Herbert
42e6795251
Place new skin components at the centre of the screen by default
2021-05-12 14:11:40 +09:00
Dean Herbert
96d4011de2
Use pattern matching to tidy up instance construction
2021-05-12 14:02:24 +09:00
Dean Herbert
1d383024e2
Improve the visual appearance of skin editor blueprints
2021-05-12 13:54:30 +09:00
Dean Herbert
77e422409c
Add SkinInfo.InstantiationInfo
to allow creating different skin types
2021-05-11 23:37:06 +09:00
Dean Herbert
1231c08a07
Rename mismatching file
2021-05-11 18:58:26 +09:00
Dean Herbert
4bb933e4b1
Add missing base lookup call to DefaultSkin
2021-05-11 18:55:45 +09:00
Dean Herbert
f55407f871
Show a message when attempting to customisse a screen which doesn't support it
2021-05-11 18:39:15 +09:00
Dean Herbert
6d587dc392
Adjust target size slightly to better align with the screen
2021-05-11 18:39:15 +09:00
Dean Herbert
1831f581aa
Add basic metadata display and remove outdated message about not saving
2021-05-11 18:39:15 +09:00
Dean Herbert
a4e0529617
Replace polling logic with direct bindable reactions
2021-05-11 18:39:15 +09:00
Dean Herbert
a88a8b7d8d
Use ISkinnableComponent
wherever possible (and expose as BindableList
)
2021-05-11 18:39:15 +09:00
Dean Herbert
a7e83aacfb
Ensure default skins are copied before modifying
2021-05-11 18:39:15 +09:00
Dean Herbert
a67cead0b3
Add SkinInfo.InstantiationInfo
to allow creating different skin types
2021-05-11 18:39:15 +09:00
Dean Herbert
f6f4b90d2b
Add customisation support for LegacyHealthDisplay
2021-05-11 18:39:14 +09:00
Dean Herbert
d5fe4f0f72
Remove unused skin resolution in LegacyScoreCounter
2021-05-11 18:39:14 +09:00
Dean Herbert
944f09ec98
Move default skin cross-component dependencies out to default specifications
2021-05-11 18:39:14 +09:00
Dean Herbert
12684de66e
Add ability to adjust origin in skin editor
2021-05-11 18:39:14 +09:00
Dean Herbert
117d6d731d
Move cross-component layout dependencies for legacy skin to LegacySkin
2021-05-11 18:39:14 +09:00
Dean Herbert
bf65547eec
Allow some serialised components to not be mutable by the user
2021-05-11 18:39:14 +09:00
Dean Herbert
81902ad6a6
Add the ability to revert all skin changes
2021-05-11 18:39:14 +09:00
Dean Herbert
4769a95b49
Fix encapsulation and remove target lookup overhead
2021-05-11 18:39:14 +09:00
Dean Herbert
c957293ec3
Load json from disk store at skin construction for now
...
This allows for easier mutation without worrying about changes being
re-read from disk unexpectedly.
2021-05-11 18:39:14 +09:00
Dean Herbert
b248b2e5e3
Hook up full save/load flow
2021-05-11 18:39:14 +09:00
Dean Herbert
004798d61d
Update Legacy components to not require skin in ctor
2021-05-11 18:39:14 +09:00
Dean Herbert
95a8f21ab2
Add the concept of skinnable target containers and mark a basic one for HUD elements
2021-05-11 18:39:14 +09:00
Dean Herbert
67ea4a7e97
Read from skin config
2021-05-11 18:39:14 +09:00
Dean Herbert
b9ab9342fa
Setup basics to allow extracting serializable content from skinnable Drawable
s
2021-05-11 18:39:14 +09:00
Dean Herbert
1b701adfef
Add score/health processors to fill in default values
2021-05-10 18:15:39 +09:00
Dean Herbert
2ecd638f7f
Merge branch 'master' into skin-components-list
2021-05-10 18:13:10 +09:00
Dean Herbert
b274fdf20d
Merge branch 'master' into skin-components-bind-outwards-health
2021-05-10 11:13:44 +09:00
Bartłomiej Dach
eb716455b7
Merge branch 'master' into skin-components-bind-outwards-accuracy
2021-05-09 12:13:18 +02:00
Bartłomiej Dach
0bc6a026eb
Merge branch 'master' into skin-components-bind-outwards-accuracy
2021-05-08 21:08:53 +02:00
Bartłomiej Dach
c3bf6a0287
Remove weird vestigial Current
reimplementation
...
Has no functional purpose anymore since the changes in the HUD element
data binding flow.
2021-05-08 21:01:37 +02:00