Commit Graph

646 Commits

Author SHA1 Message Date
ae9d1dc40b Add component list to main editor interface and enable basic placement 2021-04-30 13:10:42 +09:00
6442fb819f Split out component from test scene and fix SongProgress 2021-04-30 13:10:42 +09:00
4770a64709 Add proof of concept components list 2021-04-30 13:10:42 +09:00
de73ac7cec Allow skin editor to be invoked from any context
This is kind of how I see things working going forward, where the editor
can be applied to anything in the game which supports it (ie. a results
screen, gameplay screen, etc.) and it will immediately allow changing
the interface.

This adds a test scene which shows this working with gameplay.
2021-04-29 16:12:15 +09:00
74c6fdc4b8 Add DrawableRuleset to the skin editor test to get a hit error meter to display 2021-04-29 16:12:15 +09:00
fd587a82ff Replace abstract class with interface, attached to the actual components (not skinnable wrapper) 2021-04-29 16:12:15 +09:00
defa350aa7 Set defaults on SkinnableHUDComponent to cancel out relative size default
Specifying locally on each HUD component looks to make more sense.
2021-04-29 16:12:15 +09:00
1cb8fc9a24 Extract editor classes out of test namespace and add anchor support 2021-04-29 16:12:15 +09:00
74fb7cd180 Extract storable attributes to bindables 2021-04-29 16:12:15 +09:00
99b428ee4b Add very basic skin editor test 2021-04-29 16:12:14 +09:00
fca173225a Refactor editor selection/blueprint components to be generic 2021-04-29 16:12:14 +09:00
2d17219c8f Setup basic test and classes for scale adjustment 2021-04-29 16:12:14 +09:00
daafa41dc1 Merge branch 'master' into fix-initial-spectator-state-callback 2021-04-22 16:22:04 +09:00
156a518068 Merge branch 'master' into fix-initial-spectator-state-callback 2021-04-20 21:16:05 +09:00
c5d6b6ea8d Fix tests failing intermittently
This was due to this code happening in UpdateAfterChildren(), after the
GCC has processed one frame. During this time, the clock could have
advanced an arbitrary amount.

The cause of this is the removal of the Task.Run() to set the clock in
Restart() (now called Reset()) which changed the timing, so it only worked before due to pure
luck.
2021-04-20 18:41:09 +09:00
80473a356e Merge branch 'fix-pre-seek-sample-lifetime' into gcc-abstraction 2021-04-20 17:27:01 +09:00
c12848ce4d Apply fixes to tests 2021-04-19 17:02:59 +09:00
5e82f40d67 Merge branch 'master' into gcc-abstraction 2021-04-16 20:14:53 +09:00
46d2181d42 Remove now unnecessary (duplicating) test 2021-04-16 18:21:56 +09:00
377e5ce6b3 Fix test incorrect sending state too often 2021-04-16 18:21:35 +09:00
ca74f413cd Change to explicit method instead 2021-04-16 17:31:02 +09:00
5652490d61 Fix OnUserBeganPlaying not being invoked if already watching 2021-04-16 14:11:55 +09:00
ac8e462d32 Merge branch 'master' into refactor-framed-replay-input-hander 2021-04-15 21:48:58 +09:00
5b06a68b93 Merge pull request #12330 from Cublibre/master
Send a warning notification if device is unplugged and at low battery
2021-04-15 19:21:04 +09:00
346e36d32a Make Mod.Description abstract and add missing descriptions 2021-04-15 14:36:26 +09:00
1aa36818df Abstractify GameplayClockContainer 2021-04-14 17:47:11 +09:00
f66306a81a Remove IsLowBattery 2021-04-12 11:15:24 -04:00
43b97fe0ad Refactor PowerStatus (now called BatteryInfo) 2021-04-12 10:52:52 -04:00
359fae895f Rename property 2021-04-12 18:50:25 +09:00
e19e8ff2a3 Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class.
The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction.
Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end.
This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used.
The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit.

I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits.

This commit fixes #6150.
2021-04-12 16:18:11 +09:00
d6d8ea5b6b Throw when getting a frame of an empty replay 2021-04-12 11:17:56 +09:00
cb947a3b27 Add expected output in test case rather than determining internally 2021-04-11 13:18:25 -04:00
1fd4cb8963 Merge branch 'master' into master 2021-04-11 10:19:16 +03:00
08311abc5e Remove setters, cache CreatePowerStatus() and use a dummy LocalPowerStatus class in test scene 2021-04-10 00:00:21 -04:00
59d13b0dd3 Fixed indentation
sorry about the style fixes... I'm using JetBrains Rider from now on.
2021-04-08 21:53:42 -04:00
6b6a71d3c3 trim whitespace 2021-04-08 20:39:17 -04:00
493c095535 Fixed code style 2021-04-08 20:28:23 -04:00
6bccb3aab6 Use DI to implement battery detection, add BatteryCutoff property
- Removed the Xamarin.Essentials package from osu.Game and added it to osu.iOS and osu.Android only.
- iOS and Android implementations use Xamarin.Essentials.Battery, while the Desktop implementation
only returns 100% battery for now.
- Added a BatteryCutoff property to PowerStatus so it can be different for each platform (default 20%, 25% on iOS)
2021-04-08 19:55:11 -04:00
8aff53172d Remove necessity for nested PassThroughInputManger 2021-04-08 15:18:31 +09:00
0a6baf670e Send a warning notification if device is unplugged and low battery
- Uses Xamarin.Essentials in osu.Game.PlayerLoader to check battery level
- Encapsulated battery checking in the public BatteryManager class so battery level and plugged in status can be accessed and edited in TestPlayerLoader
- When checking battery level, catch NotImplementedException thrown by Xamarin.Essentials.Battery on non-mobile platforms
- Added visual unit tests for battery notification
  To mock battery status and level, we had to define a batteryManager object in TestPlayerLoader and add a new function ResetPlayerWithBattery()

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-07 15:56:50 -04:00
beebdb0734 Clean up implementation 2021-04-05 22:30:51 +09:00
c3c7c18549 Fix tests 2021-04-01 23:48:26 +09:00
9e95441aa6 Rename Spectator -> SoloSpectator 2021-04-01 22:08:52 +09:00
aec859b4d1 Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-03-18 19:51:46 +01:00
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
a5b3ac7ef8 Add failing test covering alpha commands proceeding non-alpha (but ignored) commands 2021-03-09 15:54:11 +09:00
ee6a94273d Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-02-22 18:31:27 +09:00
6bac83964a Merge branch 'master' into fix-pofl-on-cooldown 2021-02-22 10:03:27 +03:00
d2ec151c67 Add failing test for pausing when pause support is disabled 2021-02-20 14:20:13 +09:00
f6c279ab00 Add assert ensuring player resumed properly 2021-02-19 11:45:45 +03:00