├── .editorconfig ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .idea └── .idea.osu.Game.Rulesets.IGPlayer │ └── .idea │ ├── .gitignore │ ├── .name │ ├── deploymentTargetSelector.xml │ ├── indexLayout.xml │ └── vcs.xml ├── BuildHikariii.Android ├── AndroidManifest.xml ├── BuildHikariii.Android.csproj └── Class1.cs ├── BuildHikariii ├── BuildHikariii.csproj └── Class1.cs ├── LICENCE ├── M.DBus ├── DBusManager.cs ├── DBusMgrNew.cs ├── IDBusManagerContainer.cs ├── IMDBusObject.cs ├── M.DBus.csproj ├── ServiceUtils.cs ├── Services │ ├── Canonical │ │ ├── DBusMenuProperties.cs │ │ └── IDBusMenu.cs │ ├── Greet.cs │ ├── IHandleSystemNotifications.cs │ ├── Kde │ │ ├── IStatusNotifierItem.cs │ │ ├── IStatusNotifierWatcher.cs │ │ ├── StatusNotifierProperties.cs │ │ └── StatusNotifierWatcherProperties.cs │ └── Notifications │ │ ├── INotifications.cs │ │ ├── NotificationAction.cs │ │ └── SystemNotification.cs ├── Tray │ ├── EventType.cs │ ├── IHandleTrayManagement.cs │ ├── RootEntry.cs │ ├── SeparatorEntry.cs │ ├── SimpleEntry.cs │ └── TrayExtensions.cs └── Utils │ ├── Canonical │ └── DBusMenuFlags │ │ ├── ActionType.cs │ │ ├── ChildrenDisplayType.cs │ │ └── EntryType.cs │ ├── NotificationExtensions.cs │ ├── ObjectPathExtensions.cs │ └── StreamUtil.cs ├── M.Resources ├── Documents │ └── releaseNote.md ├── Fonts │ └── Font.cs ├── Localisation │ └── LLin │ │ ├── BaseStrings.zh.resx │ │ ├── GenericStrings.zh.resx │ │ └── Plugins │ │ ├── CloudMusicStrings.zh.resx │ │ ├── CollectionStrings.zh.resx │ │ ├── StpStrings.zh.resx │ │ └── YaspStrings.zh.resx ├── M.Resources.csproj ├── MResources.cs └── Textures │ ├── Icons │ └── Hexacons │ │ ├── aboutMF.png │ │ └── time.png │ └── circle.png ├── README.md ├── osu.Game.Rulesets.Hikariii.Tests.Android ├── MainActivity.cs ├── Properties │ └── AndroidManifest.xml └── osu.Game.Rulesets.Hikariii.Tests.Android.csproj ├── osu.Game.Rulesets.Hikariii.Tests ├── .vscode │ ├── launch.json │ └── tasks.json ├── TestLoopingContainer.cs ├── TestSceneOsuGame.cs ├── TestScenePlayerScreen.cs ├── VisualTestRunner.cs └── osu.Game.Rulesets.Hikariii.Tests.csproj ├── osu.Game.Rulesets.Hikariii ├── Features │ ├── Configuration │ │ └── MConfigManager.cs │ ├── DownloadAccel │ │ ├── AccelBeatmapDownloadTracker.cs │ │ ├── AccelBeatmapModelDownloader.cs │ │ ├── AccelUtils │ │ │ ├── AccelExtensions.cs │ │ │ ├── ChimuExtensionHandler.cs │ │ │ ├── ExtensionHandlerStore.cs │ │ │ ├── IExtensionHandler.cs │ │ │ ├── NumberExtensionHandler.cs │ │ │ ├── ProcessResult.cs │ │ │ └── SayoExtensionHandler.cs │ │ ├── Extensions │ │ │ ├── AccelExtensions.cs │ │ │ ├── ChimuExtensionHandler.cs │ │ │ ├── IExtensionHandler.cs │ │ │ ├── NumberExtensionHandler.cs │ │ │ └── SayoExtensionHandler.cs │ │ └── Graphics │ │ │ ├── AccelDownloadButton.cs │ │ │ ├── AccelDownloadProgressBar.cs │ │ │ └── AccelOptionContainer.cs │ ├── FeatureManager.cs │ ├── ListenerLoader │ │ ├── AbstractInjector.cs │ │ ├── Handlers │ │ │ ├── HikariiiFeatureBoxListener.cs │ │ │ ├── PreviewTrackHandler.cs │ │ │ ├── ScreenHandlerManager.cs │ │ │ ├── ScreenHandlers │ │ │ │ ├── AbstractScreenHandler.cs │ │ │ │ └── PlaySongSelectHandler.cs │ │ │ └── SentryLoggerDisabler.cs │ │ ├── ListenerLoader.cs │ │ └── Utils │ │ │ └── HandlerExtension.cs │ └── Player │ │ ├── Extensions │ │ └── APIBeatmapSetExtension.cs │ │ ├── Graphics │ │ ├── EnterExitAnimation.cs │ │ ├── LLinBottombarPaddingIndicatorMaybe.cs │ │ ├── PluginSidebarPage.cs │ │ ├── SettingsItems │ │ │ └── SettingsEntry.cs │ │ └── SideBar │ │ │ ├── ISidebarContent.cs │ │ │ ├── PluginOptionsContainer.cs │ │ │ ├── PluginsPage │ │ │ ├── PluginPiece.cs │ │ │ ├── PluginRemoveConfirmDialog.cs │ │ │ └── PluginsSection.cs │ │ │ ├── Settings │ │ │ ├── ISettingsItem.cs │ │ │ ├── Items │ │ │ │ ├── PlaceHolder.cs │ │ │ │ ├── SettingsEnumPiece.cs │ │ │ │ ├── SettingsListPiece.cs │ │ │ │ ├── SettingsPieceBasePanel.cs │ │ │ │ ├── SettingsSeparatorPiece.cs │ │ │ │ ├── SettingsSlider.cs │ │ │ │ ├── SettingsSliderPiece.cs │ │ │ │ ├── SettingsStringPiece.cs │ │ │ │ ├── SettingsTextBoxPiece.cs │ │ │ │ └── SettingsTogglePiece.cs │ │ │ ├── PlayerSettings.cs │ │ │ └── Sections │ │ │ │ └── Section.cs │ │ │ ├── SidebarPluginsPage.cs │ │ │ ├── SongSelectPage.cs │ │ │ └── Tabs │ │ │ ├── HeaderTabItem.cs │ │ │ ├── OptionButtonFlow.cs │ │ │ └── TabControlPosition.cs │ │ ├── Input │ │ └── InputHandler.cs │ │ ├── Interfaces │ │ ├── IImplementLLin.cs │ │ └── Plugins │ │ │ ├── IFunctionBarProvider.cs │ │ │ ├── IFunctionProvider.cs │ │ │ ├── IProvideAudioControlPlugin.cs │ │ │ └── LLinPlugin.cs │ │ ├── Misc │ │ ├── BeatmapBackground.cs │ │ ├── BeatmapCover.cs │ │ ├── BeatmapHashResolver.cs │ │ ├── BeatmapMetadataExtension.cs │ │ ├── BgTrianglesContainer.cs │ │ ├── BlockMouseBox.cs │ │ ├── Flash.cs │ │ ├── HikariiiBeatSyncProvider.cs │ │ ├── HikariiiSamplePlaybackAntiDisabler.cs │ │ ├── Indicator.cs │ │ ├── LLinDialog.cs │ │ ├── LLinModRateAdjust.cs │ │ ├── LoadingIndicator.cs │ │ ├── PlayerInfo.cs │ │ ├── PluginProgressNotification.cs │ │ ├── PluginResolvers │ │ │ ├── LLinPluginResolver.cs │ │ │ └── MvisPluginResolver.cs │ │ ├── ProgressState.cs │ │ └── TypeWrapper.cs │ │ ├── Plugins │ │ ├── Bundle │ │ │ ├── BottomBar │ │ │ │ ├── BottomBarProvider.cs │ │ │ │ ├── Buttons │ │ │ │ │ ├── BottomBarButton.cs │ │ │ │ │ ├── BottomBarSwitchButton.cs │ │ │ │ │ └── SongProgressButton.cs │ │ │ │ ├── LegacyBottomBar.cs │ │ │ │ └── SongProgressBar.cs │ │ │ ├── CloudMusic │ │ │ │ ├── Config │ │ │ │ │ └── LyricConfigManager.cs │ │ │ │ ├── DBus │ │ │ │ │ └── ILyricDBusObject.cs │ │ │ │ ├── Helper │ │ │ │ │ ├── APILyricRequest.cs │ │ │ │ │ ├── APISearchRequest.cs │ │ │ │ │ ├── LevenshteinDistance.cs │ │ │ │ │ ├── LyricProperties │ │ │ │ │ │ ├── IPropertyProcessor.cs │ │ │ │ │ │ ├── Processors │ │ │ │ │ │ │ ├── AuthorProcessor.cs │ │ │ │ │ │ │ └── TimeProcessor.cs │ │ │ │ │ │ └── PropertyProcessorManager.cs │ │ │ │ │ ├── OnlineLyrics.cs │ │ │ │ │ ├── RequestFinishMeta.cs │ │ │ │ │ ├── SearchOption.cs │ │ │ │ │ └── UserDefinitionHelper.cs │ │ │ │ ├── LyricPlugin.cs │ │ │ │ ├── LyricPluginProvider.cs │ │ │ │ ├── Misc │ │ │ │ │ ├── APILyricResponseRoot.cs │ │ │ │ │ ├── APISearchResponseRoot.cs │ │ │ │ │ ├── APISearchResultInfo.cs │ │ │ │ │ ├── APISongInfo.cs │ │ │ │ │ ├── ArtistInfo.cs │ │ │ │ │ ├── Lyric.cs │ │ │ │ │ ├── LyricInfo.cs │ │ │ │ │ └── Mapping │ │ │ │ │ │ ├── BeatmapLyricMapping.cs │ │ │ │ │ │ └── LyricMappings.cs │ │ │ │ ├── Sidebar │ │ │ │ │ ├── Graphic │ │ │ │ │ │ ├── DrawableLyric.cs │ │ │ │ │ │ ├── DummyDrawableLyric.cs │ │ │ │ │ │ ├── EditableLyricPiece.cs │ │ │ │ │ │ ├── LyricPiece.cs │ │ │ │ │ │ ├── Toolbox.cs │ │ │ │ │ │ └── TrackTimeIndicator.cs │ │ │ │ │ ├── LyricFunctionProvider.cs │ │ │ │ │ ├── LyricSidebarPage.cs │ │ │ │ │ ├── Screens │ │ │ │ │ │ ├── LyricScreen.cs │ │ │ │ │ │ ├── LyricViewScreen.cs │ │ │ │ │ │ └── SidebarScreen.cs │ │ │ │ │ └── SidebarScreenStack.cs │ │ │ │ └── UI │ │ │ │ │ ├── LyricLineHandler.cs │ │ │ │ │ └── SettingsAnchorPiece.cs │ │ │ ├── Collection │ │ │ │ ├── CollectionHelper.cs │ │ │ │ ├── CollectionHelperProvider.cs │ │ │ │ ├── Config │ │ │ │ │ └── CollectionHelperConfigManager.cs │ │ │ │ ├── DBus │ │ │ │ │ └── CollectionDBusObject.cs │ │ │ │ ├── Sidebar │ │ │ │ │ ├── BeatmapList.cs │ │ │ │ │ ├── BeatmapPiece.cs │ │ │ │ │ ├── CollectionFunctionProvider.cs │ │ │ │ │ ├── CollectionInfo.cs │ │ │ │ │ ├── CollectionPanel.cs │ │ │ │ │ ├── CollectionPluginPage.cs │ │ │ │ │ └── TooltipContainer.cs │ │ │ │ └── Utils │ │ │ │ │ └── BeatmapInfoExtensions.cs │ │ │ ├── SandboxToPanel │ │ │ │ ├── LICENSE │ │ │ │ ├── Resources │ │ │ │ │ ├── Samples │ │ │ │ │ │ ├── die.wav │ │ │ │ │ │ ├── flap.wav │ │ │ │ │ │ ├── hit.wav │ │ │ │ │ │ └── point.wav │ │ │ │ │ └── Shaders │ │ │ │ │ │ └── sh_RulesetUtils.h │ │ │ │ ├── RulesetComponents │ │ │ │ │ ├── Configuration │ │ │ │ │ │ └── SandboxRulesetConfigManager.cs │ │ │ │ │ ├── Extensions │ │ │ │ │ │ ├── MathExtensions.cs │ │ │ │ │ │ ├── OpenSimplexNoise.cs │ │ │ │ │ │ └── ProjectileExtensions.cs │ │ │ │ │ ├── Graphics │ │ │ │ │ │ ├── ContentFitContainer.cs │ │ │ │ │ │ └── InnerShadowContainer.cs │ │ │ │ │ ├── Screens │ │ │ │ │ │ ├── SandboxScreen.cs │ │ │ │ │ │ ├── SandboxScreenWithSettings.cs │ │ │ │ │ │ └── Visualizer │ │ │ │ │ │ │ ├── Components │ │ │ │ │ │ │ ├── LayoutController.cs │ │ │ │ │ │ │ ├── Layouts │ │ │ │ │ │ │ │ ├── DrawableVisualizerLayout.cs │ │ │ │ │ │ │ │ ├── EmptyLayout.cs │ │ │ │ │ │ │ │ ├── TypeA │ │ │ │ │ │ │ │ │ ├── CircularBeatmapLogo.cs │ │ │ │ │ │ │ │ │ ├── TypeAVisualizerController.cs │ │ │ │ │ │ │ │ │ └── UpdateableBeatmapBackground.cs │ │ │ │ │ │ │ │ ├── TypeALayout.cs │ │ │ │ │ │ │ │ ├── TypeB │ │ │ │ │ │ │ │ │ └── TypeBVisualizerController.cs │ │ │ │ │ │ │ │ └── TypeBLayout.cs │ │ │ │ │ │ │ ├── MusicHelpers │ │ │ │ │ │ │ │ ├── CurrentBeatmapProvider.cs │ │ │ │ │ │ │ │ ├── CurrentRateContainer.cs │ │ │ │ │ │ │ │ ├── MusicAmplitudesProvider.cs │ │ │ │ │ │ │ │ ├── MusicIntensityController.cs │ │ │ │ │ │ │ │ └── RateAdjustableContainer.cs │ │ │ │ │ │ │ ├── Particles.cs │ │ │ │ │ │ │ ├── ParticlesDrawable.cs │ │ │ │ │ │ │ ├── Settings │ │ │ │ │ │ │ │ ├── BackgroundSection.cs │ │ │ │ │ │ │ │ ├── LayoutSettingsSubsection.cs │ │ │ │ │ │ │ │ ├── ParticleSettings.cs │ │ │ │ │ │ │ │ ├── TrackSection.cs │ │ │ │ │ │ │ │ └── VisualizerSection.cs │ │ │ │ │ │ │ ├── VisualizerSettingsTip.cs │ │ │ │ │ │ │ └── Visualizers │ │ │ │ │ │ │ │ ├── Circular │ │ │ │ │ │ │ │ ├── BasicMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ ├── DotsMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ ├── FallMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ └── RoundedMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ ├── CircularMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ ├── Linear │ │ │ │ │ │ │ │ ├── BasicLinearMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ └── RoundedLinearMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ ├── LinearMusicVisualizerDrawable.cs │ │ │ │ │ │ │ │ └── MusicVisualizerDrawable.cs │ │ │ │ │ │ │ └── VisualizerScreen.cs │ │ │ │ │ └── UI │ │ │ │ │ │ ├── InteractiveContainer.cs │ │ │ │ │ │ ├── Overlays │ │ │ │ │ │ ├── SandboxCheckbox.cs │ │ │ │ │ │ └── SandboxOverlay.cs │ │ │ │ │ │ ├── SandboxPlayfield.cs │ │ │ │ │ │ ├── Settings │ │ │ │ │ │ ├── ColourPickerDropdown.cs │ │ │ │ │ │ ├── SandboxSettings.cs │ │ │ │ │ │ ├── SandboxSettingsSection.cs │ │ │ │ │ │ └── SettingsDropdownContainer.cs │ │ │ │ │ │ ├── StoryboardContainer.cs │ │ │ │ │ │ ├── SupportButton.cs │ │ │ │ │ │ └── TrackController.cs │ │ │ │ ├── SandboxPanel.cs │ │ │ │ ├── SandboxPanelProvider.cs │ │ │ │ ├── Textures │ │ │ │ │ ├── Flappy.png │ │ │ │ │ ├── FlappyDon │ │ │ │ │ │ ├── bg.png │ │ │ │ │ │ ├── gameover.png │ │ │ │ │ │ ├── ground.png │ │ │ │ │ │ ├── message.png │ │ │ │ │ │ ├── pipe.png │ │ │ │ │ │ ├── redbird-downflap.png │ │ │ │ │ │ ├── redbird-midflap.png │ │ │ │ │ │ └── redbird-upflap.png │ │ │ │ │ ├── Fractal.png │ │ │ │ │ ├── MvisPluginSandbox │ │ │ │ │ │ └── SandboxPanel.png │ │ │ │ │ ├── Numbers.png │ │ │ │ │ ├── Vis.png │ │ │ │ │ ├── Visualizer │ │ │ │ │ │ └── particle.png │ │ │ │ │ └── ruleset.png │ │ │ │ └── lazer-sandbox-README.md │ │ │ ├── Storyboard │ │ │ │ ├── BackgroundStoryBoardLoader.cs │ │ │ │ ├── Config │ │ │ │ │ └── SBLoaderConfigManager.cs │ │ │ │ ├── Storyboard │ │ │ │ │ └── BackgroundStoryboard.cs │ │ │ │ └── StoryboardSupportProvider.cs │ │ │ └── Yasp │ │ │ │ ├── Config │ │ │ │ └── ExamplePluginConfigManager.cs │ │ │ │ ├── Panels │ │ │ │ ├── ClassicPanel.cs │ │ │ │ ├── CoverIIPanel.cs │ │ │ │ ├── IPanel.cs │ │ │ │ └── NsiPanel.cs │ │ │ │ ├── YaspPlugin.cs │ │ │ │ └── YaspProvider.cs │ │ ├── Config │ │ │ ├── DefaultPluginConfigManager.cs │ │ │ ├── IPluginConfigManager.cs │ │ │ ├── PluginConfigManager.cs │ │ │ ├── PluginSettingsSubSection.cs │ │ │ └── SidebarSettingsSection.cs │ │ ├── DialogOption.cs │ │ ├── Internal │ │ │ ├── DummyAudio │ │ │ │ ├── DummyAudioPlugin.cs │ │ │ │ └── DummyAudioPluginProvider.cs │ │ │ ├── DummyBase │ │ │ │ ├── ColourPreviewer.cs │ │ │ │ ├── DummyBasePlugin.cs │ │ │ │ └── DummyBasePluginProvider.cs │ │ │ ├── DummyFunctionBar.cs │ │ │ ├── FallbackFunctionBar │ │ │ │ ├── FunctionBar.cs │ │ │ │ ├── SimpleBarButton.cs │ │ │ │ ├── SongProgressButton.cs │ │ │ │ └── ToggleableBarButton.cs │ │ │ └── LuaSupport │ │ │ │ ├── DefaultImportGenerator.cs │ │ │ │ ├── Graphics │ │ │ │ └── OutputLine.cs │ │ │ │ ├── LuaFunctions │ │ │ │ ├── BaseFunctions.cs │ │ │ │ ├── DrawableUtils.cs │ │ │ │ └── SubContainerManager.cs │ │ │ │ ├── LuaPlugin.cs │ │ │ │ └── LuaPluginProvider.cs │ │ ├── LLinPluginManager.cs │ │ ├── LLinPluginProvider.cs │ │ ├── OsuMusicControllerWrapper.cs │ │ ├── PluginKeybind.cs │ │ ├── PluginStore.cs │ │ └── Types │ │ │ ├── BindableControlledPlugin.cs │ │ │ ├── FakeButton.cs │ │ │ └── ToggleableButtonWrapper.cs │ │ └── Screens │ │ ├── LLin │ │ ├── CustomColourProvider.cs │ │ ├── InPlayerUserActivity.cs │ │ ├── InputManagerTracker.cs │ │ ├── LLinScreen.cs │ │ └── MfBgTriangles.cs │ │ └── SongSelect │ │ ├── LLinSongSelect.cs │ │ └── MvisBeatmapDetailArea.cs ├── Graphics │ ├── AboutHikariiiDropdownContainer.cs │ ├── BasicDropdownContainer.cs │ ├── IconButton.cs │ ├── LoopingContainer.cs │ ├── RandomBeatmapBackground.cs │ └── Settings │ │ ├── DBusSettings.cs │ │ ├── DangerousZone.cs │ │ ├── ExperimentalSettings.cs │ │ ├── HikariiiSettingsSubPanel.cs │ │ ├── LinuxSection.cs │ │ ├── LinuxSettings.cs │ │ ├── MfMainSection.cs │ │ ├── MfMvisPluginSection.cs │ │ ├── MfSettings.cs │ │ └── SettingsTextBoxWithIndicator.cs ├── HikariiiAction.cs ├── HikariiiPlayerRuleset.cs ├── Localisation │ └── LLin │ │ ├── LLinBaseStrings.cs │ │ ├── LLinGenericStrings.cs │ │ └── Plugins │ │ ├── CloudMusicStrings.cs │ │ ├── CollectionStrings.cs │ │ ├── StpStrings.cs │ │ └── YaspStrings.cs ├── Logging.cs ├── Textures │ ├── Flappy.png │ ├── FlappyDon │ │ ├── bg.png │ │ ├── gameover.png │ │ ├── ground.png │ │ ├── message.png │ │ ├── pipe.png │ │ ├── redbird-downflap.png │ │ ├── redbird-midflap.png │ │ └── redbird-upflap.png │ ├── Fractal.png │ ├── MvisPluginSandbox │ │ └── SandboxPanel.png │ ├── Numbers.png │ ├── Vis.png │ ├── Visualizer │ │ └── particle.png │ └── ruleset.png ├── osu.Game.Rulesets.Hikariii.csproj └── ppyStuffs │ ├── Beatmaps │ └── IGPlayerBeatmapConverter.cs │ ├── IGPlayerDifficultyCalculator.cs │ ├── IGPlayerInputManager.cs │ ├── LICENCE │ ├── Mods │ └── IGPlayerModAutoplay.cs │ ├── Objects │ ├── Drawables │ │ └── DrawableIGPlayerHitObject.cs │ └── HikariiiPlayerHitObject.cs │ ├── README.md │ ├── Replays │ ├── IGPlayerAutoGenerator.cs │ ├── IGPlayerFramedReplayInputHandler.cs │ └── IGPlayerReplayFrame.cs │ ├── UI │ ├── DrawableIGPlayerRuleset.cs │ └── IGPlayerPlayfield.cs │ └── osu │ └── TrianglesV2Copy.cs ├── osu.Game.Rulesets.IGPlayer.sln ├── osu.Game.Rulesets.IGPlayer.sln.DotSettings ├── package.sh └── upstream_assets ├── LICENCE ├── README.md └── osu.Android.props /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: dotnet 2 | on: 3 | push: 4 | branches: [ "ruleset" ] 5 | pull_request: 6 | branches: [ "ruleset" ] 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | strategy: 12 | matrix: 13 | dotnet-version: ['8.0.x'] 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Setup dotnet (${{ matrix.dotnet-version }}) 19 | uses: actions/setup-dotnet@v4 20 | with: 21 | dotnet-version: ${{ matrix.dotnet-version }} 22 | 23 | - name: Resolve dependencies 24 | run: dotnet restore BuildHikariii 25 | 26 | - name: Build 27 | run: dotnet publish BuildHikariii -c Release 28 | 29 | - name: Copy README.md 30 | run: cp 'README.md' BuildHikariii/bin/Release/net8.0/publish 31 | 32 | - name: Upload artifacts 33 | uses: actions/upload-artifact@v4 34 | with: 35 | path: | 36 | BuildHikariii/bin/Release/net8.0/publish/M.*.dll 37 | BuildHikariii/bin/Release/net8.0/publish/*/M.*.dll 38 | BuildHikariii/bin/Release/net8.0/publish/osu.Game.Rulesets.*.dll 39 | BuildHikariii/bin/Release/net8.0/publish/Tmds.*.dll 40 | BuildHikariii/bin/Release/net8.0/publish/*.md 41 | BuildHikariii/bin/Release/net8.0/publish/NetCoreServ*.dll 42 | !BuildHikariii/bin/Release/net8.0/publish/*.txt -------------------------------------------------------------------------------- /.idea/.idea.osu.Game.Rulesets.IGPlayer/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /modules.xml 6 | /contentModel.xml 7 | /.idea.osu.Game.Rulesets.IGPlayer.iml 8 | /projectSettingsUpdater.xml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | -------------------------------------------------------------------------------- /.idea/.idea.osu.Game.Rulesets.IGPlayer/.idea/.name: -------------------------------------------------------------------------------- 1 | osu.Game.Rulesets.IGPlayer -------------------------------------------------------------------------------- /.idea/.idea.osu.Game.Rulesets.IGPlayer/.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/.idea.osu.Game.Rulesets.IGPlayer/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | M.DBus 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/.idea.osu.Game.Rulesets.IGPlayer/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /BuildHikariii.Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /BuildHikariii.Android/BuildHikariii.Android.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net8.0-android 6 | enable 7 | enable 8 | true 9 | Library 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /BuildHikariii.Android/Class1.cs: -------------------------------------------------------------------------------- 1 | namespace BuildHikariii.Android; 2 | 3 | public class PlayerLoaderDummyClass 4 | { 5 | public static void Main() 6 | { 7 | Console.WriteLine("This program is not intended to run directly."); 8 | Console.WriteLine("Please drop this into your osu!'s ruleset folder."); 9 | Thread.Sleep(5000); 10 | 11 | Environment.Exit(0); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BuildHikariii/BuildHikariii.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | true 8 | Library 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /BuildHikariii/Class1.cs: -------------------------------------------------------------------------------- 1 | namespace BuildHikariii; 2 | 3 | public class PlayerLoaderDummyClass 4 | { 5 | public static void Main() 6 | { 7 | Console.WriteLine("This program is not intended to run directly."); 8 | Console.WriteLine("Please drop this into your osu!'s ruleset folder."); 9 | Thread.Sleep(5000); 10 | 11 | Environment.Exit(0); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 MATRIX-feather 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /M.DBus/IDBusManagerContainer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using M.DBus.Services.Notifications; 3 | using M.DBus.Tray; 4 | using Tmds.DBus; 5 | 6 | namespace M.DBus 7 | { 8 | public interface IDBusManagerContainer 9 | where T : IDBusObject 10 | { 11 | void Add(T obj); 12 | void Remove(T obj); 13 | void AddRange(IEnumerable objects); 14 | void RemoveRange(IEnumerable objects); 15 | void PostSystemNotification(SystemNotification notification); 16 | void AddTrayEntry(SimpleEntry entry); 17 | void RemoveTrayEntry(SimpleEntry entry); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /M.DBus/IMDBusObject.cs: -------------------------------------------------------------------------------- 1 | using Tmds.DBus; 2 | 3 | #nullable enable 4 | 5 | namespace M.DBus 6 | { 7 | public interface IMDBusObject : IDBusObject 8 | { 9 | /// 10 | /// Service name 11 | /// 12 | public string? CustomRegisterName { get; } 13 | 14 | public bool IsService { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /M.DBus/M.DBus.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | 5 | 6 | https://github.com/matrix-feather/osu 7 | https://github.com/matrix-feather/osu 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /M.DBus/Services/IHandleSystemNotifications.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using M.DBus.Services.Notifications; 3 | 4 | namespace M.DBus.Services 5 | { 6 | public interface IHandleSystemNotifications 7 | { 8 | /// 9 | /// 向系统发送一条通知 10 | /// 11 | /// 要发送的通知 12 | /// 13 | /// 此通知的id
14 | /// 如果通知功能被禁用,则会返回uint.MaxValue 15 | ///
16 | Task PostAsync(SystemNotification notification); 17 | 18 | /// 19 | /// 关闭一条通知 20 | /// 21 | /// 通知的id号 22 | /// 23 | /// true: 通知功能已启用
24 | /// false: 通知功能被禁用 25 | ///
26 | Task CloseNotificationAsync(uint id); 27 | 28 | /// 29 | /// 获取当前服务器支持的可选功能
30 | /// https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html 31 | ///
32 | /// 服务器支持的可选功能 33 | Task GetCapabilitiesAsync(); 34 | 35 | /// 36 | /// 获取当前服务器信息 37 | /// 38 | /// 39 | /// name: 服务器名
40 | /// vendor: 服务器供应商名称, 例如"GNOME"、"KDE"等
41 | /// version: 服务器自身的版本
42 | /// specVersion: 服务器符合的规范版本 43 | ///
44 | Task<(string name, string vendor, string version, string specVersion)> GetServerInformationAsync(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /M.DBus/Services/Kde/IStatusNotifierWatcher.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Threading.Tasks; 5 | using Tmds.DBus; 6 | 7 | namespace M.DBus.Services.Kde 8 | { 9 | public interface IStatusNotifierWatcherWrapper : IStatusNotifierWatcher, IMDBusObject 10 | { 11 | } 12 | 13 | [DBusInterface("org.kde.StatusNotifierWatcher")] 14 | public interface IStatusNotifierWatcher : IDBusObject 15 | { 16 | Task RegisterStatusNotifierItemAsync(string service); 17 | Task RegisterStatusNotifierHostAsync(string service); 18 | Task WatchStatusNotifierItemRegisteredAsync(Action handler, Action onError = null); 19 | Task WatchStatusNotifierItemUnregisteredAsync(Action handler, Action onError = null); 20 | Task WatchStatusNotifierHostRegisteredAsync(Action handler, Action onError = null); 21 | Task WatchStatusNotifierHostUnregisteredAsync(Action handler, Action onError = null); 22 | Task GetAsync(string prop); 23 | Task GetAllAsync(); 24 | Task SetAsync(string prop, object val); 25 | Task WatchPropertiesAsync(Action handler); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /M.DBus/Services/Kde/StatusNotifierWatcherProperties.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System.Diagnostics.CodeAnalysis; 4 | using Tmds.DBus; 5 | 6 | namespace M.DBus.Services.Kde 7 | { 8 | [Dictionary] 9 | [SuppressMessage("ReSharper", "InconsistentNaming")] 10 | [SuppressMessage("ReSharper", "ConvertToAutoProperty")] 11 | [SuppressMessage("ReSharper", "ConvertToConstant.Local")] 12 | [SuppressMessage("ReSharper", "ConvertToAutoPropertyWhenPossible")] 13 | public class StatusNotifierWatcherProperties 14 | { 15 | public string[] RegisteredStatusNotifierItems 16 | { 17 | get => _RegisteredStatusNotifierItems; 18 | 19 | set => _RegisteredStatusNotifierItems = value; 20 | } 21 | 22 | public bool IsStatusNotifierHostRegistered 23 | { 24 | get => _IsStatusNotifierHostRegistered; 25 | 26 | set => _IsStatusNotifierHostRegistered = value; 27 | } 28 | 29 | public int ProtocolVersion 30 | { 31 | get => _ProtocolVersion; 32 | 33 | set => _ProtocolVersion = value; 34 | } 35 | 36 | private string[] _RegisteredStatusNotifierItems; 37 | 38 | private bool _IsStatusNotifierHostRegistered; 39 | 40 | private int _ProtocolVersion; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /M.DBus/Services/Notifications/INotifications.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Threading.Tasks; 6 | using Tmds.DBus; 7 | 8 | namespace M.DBus.Services.Notifications 9 | { 10 | public interface INotificationsWrapper : IMDBusObject, INotifications 11 | { 12 | } 13 | 14 | [DBusInterface("org.freedesktop.Notifications")] 15 | public interface INotifications : IDBusObject 16 | { 17 | Task NotifyAsync(string appName, uint replacesID, string appIcon, string summary, string details, string[] actions, IDictionary hints, int displayTime); 18 | Task CloseNotificationAsync(uint id); 19 | Task GetCapabilitiesAsync(); 20 | Task<(string name, string vendor, string version, string specVersion)> GetServerInformationAsync(); 21 | 22 | Task WatchNotificationClosedAsync(Action<(uint arg0, uint arg1)> handler, Action onError = null); 23 | Task WatchActionInvokedAsync(Action<(uint arg0, string arg1)> handler, Action onError = null); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /M.DBus/Services/Notifications/NotificationAction.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Diagnostics.CodeAnalysis; 5 | 6 | namespace M.DBus.Services.Notifications 7 | { 8 | public class NotificationAction 9 | { 10 | /// 11 | /// 此选项的标识
12 | /// 详见https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html中的"Table 6. Notify Parameters" 13 | ///
14 | [NotNull] 15 | public string Id { get; } 16 | 17 | //todo: 适配LocalisableString? 18 | /// 19 | /// 此选项的本地化字符串
20 | /// 详见https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html中的"Table 6. Notify Parameters" 21 | ///
22 | [NotNull] 23 | public string Description; 24 | 25 | /// 26 | /// 当选项被激活时要执行的动作 27 | /// 28 | public Action OnInvoked; 29 | 30 | public NotificationAction(string id, string description = null, Action onInvoked = null) 31 | { 32 | if (string.IsNullOrEmpty(description)) description = id; 33 | 34 | Id = id; 35 | Description = description; 36 | OnInvoked = onInvoked; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /M.DBus/Services/Notifications/SystemNotification.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using M.DBus.Utils; 6 | 7 | namespace M.DBus.Services.Notifications 8 | { 9 | public class SystemNotification 10 | { 11 | /// 12 | /// 应用名称,可以是空 13 | /// 14 | public string Name { get; set; } = string.Empty; 15 | 16 | /// 17 | /// 图标名称
18 | /// https://specifications.freedesktop.org/notification-spec/latest/ar01s05.html 19 | ///
20 | public string IconName { get; set; } = string.Empty; 21 | 22 | /// 23 | /// 通知标题 24 | /// 25 | public string Title { get; set; } = string.Empty; 26 | 27 | /// 28 | /// 通知内容 29 | /// 30 | public string Description { get; set; } = string.Empty; 31 | 32 | /// 33 | /// https://specifications.freedesktop.org/notification-spec/latest/ar01s08.html 34 | /// 35 | public IDictionary Hints { get; set; } = new Dictionary(); 36 | 37 | /// 38 | /// 存在时间(毫秒) 39 | /// 40 | public int DisplayTime = 2000; 41 | 42 | /// 43 | /// 通知附带的选项 44 | /// 45 | public NotificationAction[] Actions { get; set; } = Array.Empty(); 46 | 47 | /// 48 | /// 通知被关闭时要执行的动作 49 | /// 50 | public Action OnClosed; 51 | 52 | public override string ToString() => $"'{Name}': '{Title}' - '{Description}'"; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /M.DBus/Tray/EventType.cs: -------------------------------------------------------------------------------- 1 | namespace M.DBus.Tray 2 | { 3 | public enum EventType 4 | { 5 | Unknown, 6 | Opened, 7 | Closed, 8 | Clicked, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /M.DBus/Tray/IHandleTrayManagement.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace M.DBus.Tray 4 | { 5 | public interface IHandleTrayManagement 6 | { 7 | void AddEntry(SimpleEntry entry); 8 | void AddEntryRange(SimpleEntry[] entries); 9 | void RemoveEntry(SimpleEntry entry); 10 | void RemoveEntryRange(SimpleEntry[] entries); 11 | Task ConnectToWatcher(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /M.DBus/Tray/RootEntry.cs: -------------------------------------------------------------------------------- 1 | namespace M.DBus.Tray 2 | { 3 | public class RootEntry : SimpleEntry 4 | { 5 | public RootEntry() 6 | { 7 | ChildId = 0; 8 | Label = "Root"; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /M.DBus/Tray/SeparatorEntry.cs: -------------------------------------------------------------------------------- 1 | using M.DBus.Utils.Canonical.DBusMenuFlags; 2 | 3 | namespace M.DBus.Tray 4 | { 5 | public class SeparatorEntry : SimpleEntry 6 | { 7 | public SeparatorEntry() 8 | { 9 | Type = EntryType.Separator; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /M.DBus/Utils/Canonical/DBusMenuFlags/ActionType.cs: -------------------------------------------------------------------------------- 1 | namespace M.DBus.Utils.Canonical.DBusMenuFlags 2 | { 3 | public class ToggleType 4 | { 5 | public static string IndependentToggleable => "checkmark"; 6 | public static string Radio => "radio"; 7 | public static string None => string.Empty; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /M.DBus/Utils/Canonical/DBusMenuFlags/ChildrenDisplayType.cs: -------------------------------------------------------------------------------- 1 | namespace M.DBus.Utils.Canonical.DBusMenuFlags 2 | { 3 | public class ChildrenDisplayType 4 | { 5 | public static string Submenu => "submenu"; 6 | public static string None => ""; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /M.DBus/Utils/Canonical/DBusMenuFlags/EntryType.cs: -------------------------------------------------------------------------------- 1 | namespace M.DBus.Utils.Canonical.DBusMenuFlags 2 | { 3 | public class EntryType 4 | { 5 | public static string Standard => "standard"; 6 | public static string Separator => "separator"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /M.DBus/Utils/NotificationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using M.DBus.Services.Notifications; 3 | 4 | namespace M.DBus.Utils 5 | { 6 | public static class NotificationExtensions 7 | { 8 | public static (string appName, 9 | uint replacesID, 10 | string appIcon, 11 | string title, 12 | string description, 13 | string[] actions, 14 | IDictionary hints, 15 | int displayTime) ToDBusObject(this SystemNotification notification) 16 | { 17 | List actions = new List(); 18 | 19 | foreach (var notificationAction in notification.Actions) 20 | { 21 | actions.AddRange(new[] 22 | { 23 | notificationAction.Id, 24 | notificationAction.Description 25 | }); 26 | } 27 | 28 | return ( 29 | notification.Name, 30 | 0, 31 | notification.IconName, 32 | notification.Title, 33 | notification.Description, 34 | actions.ToArray(), 35 | notification.Hints, 36 | notification.DisplayTime); 37 | } 38 | 39 | public static CloseReason ToCloseReason(this uint reason) 40 | { 41 | switch (reason) 42 | { 43 | case 1: 44 | return CloseReason.Expired; 45 | 46 | case 2: 47 | return CloseReason.ClosedByUser; 48 | 49 | case 3: 50 | return CloseReason.ClosedByCall; 51 | 52 | default: 53 | return CloseReason.Undefined; 54 | } 55 | } 56 | } 57 | 58 | public enum CloseReason 59 | { 60 | Expired, 61 | ClosedByUser, 62 | ClosedByCall, 63 | ActionInvoked, 64 | Undefined 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /M.DBus/Utils/ObjectPathExtensions.cs: -------------------------------------------------------------------------------- 1 | using Tmds.DBus; 2 | 3 | namespace M.DBus.Utils 4 | { 5 | public static class ObjectPathExtensions 6 | { 7 | public static string ToServiceName(this ObjectPath path) 8 | { 9 | string str = path.ToString().Replace('/', '.').Remove(0, 1); 10 | 11 | if (str.EndsWith('.')) 12 | str = str.Remove(str.Length - 1, 1); 13 | 14 | return str; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /M.DBus/Utils/StreamUtil.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace M.DBus.Utils 4 | { 5 | public static class StreamUtil 6 | { 7 | public static byte[] ToByteArray(this Stream stream) 8 | { 9 | if (stream is MemoryStream memStream) 10 | return memStream.ToArray(); 11 | 12 | using (MemoryStream ms = new MemoryStream()) 13 | { 14 | stream.CopyTo(ms); 15 | return ms.ToArray(); 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /M.Resources/Documents/releaseNote.md: -------------------------------------------------------------------------------- 1 | 正在计划恢复更新... -------------------------------------------------------------------------------- /M.Resources/Fonts/Font.cs: -------------------------------------------------------------------------------- 1 | namespace M.Resources.Fonts 2 | { 3 | public abstract class Font 4 | { 5 | #region 基础信息 6 | 7 | public string Name = "未知字体"; 8 | public string Description = "未知描述"; 9 | public string Homepage = "未知主页"; 10 | public string Author = "未知作者"; 11 | public string License = "未知许可证"; 12 | 13 | #endregion 14 | 15 | #region 字体信息 16 | 17 | public bool LightAvaliable; 18 | public bool MediumAvaliable; 19 | public bool SemiBoldAvaliable; 20 | public bool BoldAvaliable; 21 | public bool BlackAvaliable; 22 | 23 | public string FamilyName = "UnknownFamilyName"; 24 | 25 | #endregion 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /M.Resources/Localisation/LLin/GenericStrings.zh.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | text/microsoft-resx 9 | 10 | 11 | 1.3 12 | 13 | 14 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 15 | 16 | 17 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 18 | 19 | 20 | 启用插件 21 | 22 | 23 | 禁用插件 24 | 25 | -------------------------------------------------------------------------------- /M.Resources/Localisation/LLin/Plugins/CollectionStrings.zh.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | text/microsoft-resx 8 | 9 | 10 | 1.3 11 | 12 | 13 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 14 | 15 | 16 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 17 | 18 | 19 | 未选择收藏夹 20 | 21 | 22 | 请先选择一个! 23 | 24 | 25 | 激活以确保插件可以发挥功能\n本提示在本次会话中不会出现第二次。 26 | 27 | 28 | 浏览收藏夹 29 | 30 | 31 | {0}首歌曲 32 | 33 | -------------------------------------------------------------------------------- /M.Resources/Localisation/LLin/Plugins/YaspStrings.zh.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | text/microsoft-resx 8 | 9 | 10 | 1.3 11 | 12 | 13 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 14 | 15 | 16 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 17 | 18 | 19 | 经典样式缩放 20 | 21 | 22 | (封面II) 使用头像作为封面 23 | 24 | 25 | 面板样式 26 | 27 | -------------------------------------------------------------------------------- /M.Resources/M.Resources.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | 5 | 6 | https://github.com/MATRIX-feather/osu 7 | https://github.com/MATRIX-feather/osu 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /M.Resources/MResources.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | namespace M.Resources 4 | { 5 | public class MResources 6 | { 7 | public static Assembly ResourceAssembly => typeof(MResources).Assembly; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /M.Resources/Textures/Icons/Hexacons/aboutMF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/M.Resources/Textures/Icons/Hexacons/aboutMF.png -------------------------------------------------------------------------------- /M.Resources/Textures/Icons/Hexacons/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/M.Resources/Textures/Icons/Hexacons/time.png -------------------------------------------------------------------------------- /M.Resources/Textures/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/M.Resources/Textures/circle.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hikariii 2 | 向osu!添加播放器以及Sayobot加速下载功能 3 | 4 | ## 安装方法 5 | 先将你在[Release](https://github.com/MATRIX-feather/LLin/releases)或[Actions](https://github.com/MATRIX-feather/LLin/actions/new)下载到的文件解压,然后: 6 | 1. 在游戏里点击`设置 ~> 打开 osu! 文件夹` 7 | 2. [将压缩包中的文件和文件夹安装到你的osu!游戏模式目录下](https://bbs.hiosu.com/thread-5-1-1.html) 8 | 4. 重启osu! 9 | 5. 完成! 10 | 11 | ## 食用指南 12 | ### 下载加速 13 | 点击任意未下载谱面的预览按钮("`▶`"),待预览加载完毕后将会在左上角自动显示橙色的下载加速的选项。 14 | 下载按钮将在预览结束或下载完成后自动隐藏,你也可以通过点击左上角的按钮开手动关闭此弹窗。 15 | 16 | ### 播放器 17 | 播放器可以通过主界面和单人游戏选歌进入,按键可以在`输入 ~> 快捷键和键位绑定`中设置。 18 | 19 | ## 第三方开源许可 20 | - SandboxToPanel插件:[EVAST9919/lazer-sandbox](https://github.com/EVAST9919/lazer-sandbox) --> [LICENSE](./osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/LICENSE) 21 | - `osu.Game.Rulesets.Hikariii/RulesetStuffs`下的基础组件:[ppy/osu](https://github.com/ppy/osu) --> [LICENCE](./osu.Game.Rulesets.Hikariii/RulesetStuffs/LICENCE) -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using Android.App; 4 | using Android.OS; 5 | using osu.Framework.Android; 6 | using osu.Framework.Logging; 7 | using osu.Game.Tests; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Tests; 10 | 11 | [Activity(ConfigurationChanges = DEFAULT_CONFIG_CHANGES, LaunchMode = DEFAULT_LAUNCH_MODE, Exported = true, MainLauncher = true)] 12 | public class MainActivity : AndroidGameActivity 13 | { 14 | protected override Framework.Game CreateGame() => new OsuTestBrowser(); 15 | 16 | protected override void OnCreate(Bundle? savedInstanceState) 17 | { 18 | base.OnCreate(savedInstanceState); 19 | 20 | // See the comment in OsuGameActivity 21 | try 22 | { 23 | Assembly.Load("osu.Game.Rulesets.Osu"); 24 | } 25 | catch (Exception e) 26 | { 27 | Logger.Error(e, "[HikariiiTests] 未能加载 osu.Game.Rulesets.Osu !"); 28 | } 29 | 30 | Assembly.Load("osu.Game.Rulesets.Hikariii"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "VisualTests (Debug)", 6 | "type": "coreclr", 7 | "request": "launch", 8 | "program": "dotnet", 9 | "args": [ 10 | "${workspaceRoot}/bin/Debug/net6.0/osu.Game.Rulesets.IGPlayerRuleset.Tests.dll" 11 | ], 12 | "cwd": "${workspaceRoot}", 13 | "preLaunchTask": "Build (Debug)", 14 | "env": {}, 15 | "console": "internalConsole" 16 | }, 17 | { 18 | "name": "VisualTests (Release)", 19 | "type": "coreclr", 20 | "request": "launch", 21 | "program": "dotnet", 22 | "args": [ 23 | "${workspaceRoot}/bin/Release/net6.0/osu.Game.Rulesets.IGPlayerRuleset.Tests.dll" 24 | ], 25 | "cwd": "${workspaceRoot}", 26 | "preLaunchTask": "Build (Release)", 27 | "env": {}, 28 | "console": "internalConsole" 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Build (Debug)", 8 | "type": "shell", 9 | "command": "dotnet", 10 | "args": [ 11 | "build", 12 | "--no-restore", 13 | "osu.Game.Rulesets.IGPlayerRuleset.Tests.csproj", 14 | "-p:GenerateFullPaths=true", 15 | "-m", 16 | "-verbosity:m" 17 | ], 18 | "group": "build", 19 | "problemMatcher": "$msCompile" 20 | }, 21 | { 22 | "label": "Build (Release)", 23 | "type": "shell", 24 | "command": "dotnet", 25 | "args": [ 26 | "build", 27 | "--no-restore", 28 | "osu.Game.Rulesets.IGPlayerRuleset.Tests.csproj", 29 | "-p:Configuration=Release", 30 | "-p:GenerateFullPaths=true", 31 | "-m", 32 | "-verbosity:m" 33 | ], 34 | "group": "build", 35 | "problemMatcher": "$msCompile" 36 | }, 37 | { 38 | "label": "Restore", 39 | "type": "shell", 40 | "command": "dotnet", 41 | "args": [ 42 | "restore" 43 | ], 44 | "problemMatcher": [] 45 | } 46 | ] 47 | } -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests/TestSceneOsuGame.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using osu.Framework.Allocation; 5 | using osu.Framework.Graphics; 6 | using osu.Framework.Graphics.Shapes; 7 | using osu.Game.Tests.Visual; 8 | using osuTK.Graphics; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Tests 11 | { 12 | public partial class TestSceneOsuGame : OsuTestScene 13 | { 14 | [BackgroundDependencyLoader] 15 | private void load() 16 | { 17 | Children = new Drawable[] 18 | { 19 | new Box 20 | { 21 | RelativeSizeAxes = Axes.Both, 22 | Colour = Color4.Black, 23 | }, 24 | }; 25 | 26 | AddGame(new OsuGame()); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests/VisualTestRunner.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System; 5 | using osu.Framework; 6 | using osu.Framework.Platform; 7 | using osu.Game.Tests; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Tests 10 | { 11 | public static class VisualTestRunner 12 | { 13 | [STAThread] 14 | public static int Main(string[] args) 15 | { 16 | using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { })) 17 | { 18 | host.Run(new OsuTestBrowser()); 19 | return 0; 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii.Tests/osu.Game.Rulesets.Hikariii.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | osu.Game.Rulesets.Hikariii.Tests.VisualTestRunner 4 | enable 5 | 6 | 7 | 8 | 9 | 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | WinExe 24 | net8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/AccelBeatmapDownloadTracker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using osu.Framework.Allocation; 4 | using osu.Game.Beatmaps; 5 | using osu.Game.Online; 6 | using osu.Game.Online.API; 7 | using osu.Game.Rulesets.Hikariii.Features.ListenerLoader.Handlers; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel; 10 | 11 | public partial class AccelBeatmapDownloadTracker : BeatmapDownloadTracker 12 | { 13 | public AccelBeatmapDownloadTracker(IBeatmapSetInfo trackedItem) 14 | : base(trackedItem) 15 | { 16 | if (trackedItem == null) 17 | throw new NullDependencyException("Tracked item may not be null"); 18 | } 19 | 20 | protected override void LoadComplete() 21 | { 22 | Logging.Log($"Deps: {TrackedItem}"); 23 | base.LoadComplete(); 24 | 25 | var accelDownloader = PreviewTrackHandler.AccelBeatmapModelDownloader; 26 | if (accelDownloader == null) throw new NullDependencyException("Null dep"); 27 | 28 | accelDownloader.DownloadBegan += this.downloadBegan; 29 | accelDownloader.DownloadFailed += this.downloadFailed; 30 | } 31 | 32 | private readonly BindingFlags flag = BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic; 33 | 34 | private void downloadFailed(ArchiveDownloadRequest obj) 35 | { 36 | var method = GetType().BaseType?.GetMethod("attachDownload", flag); 37 | 38 | method?.Invoke(this, [null]); 39 | } 40 | 41 | private void downloadBegan(ArchiveDownloadRequest obj) 42 | { 43 | var method = GetType().BaseType?.GetMethod("attachDownload", flag); 44 | 45 | try 46 | { 47 | //Logging.Log($"Invoking Base Method! {method}", level: LogLevel.Important); 48 | method?.Invoke(this, [obj]); 49 | } 50 | catch (Exception e) 51 | { 52 | Logging.LogError(e, "???"); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/AccelUtils/ChimuExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.AccelUtils 7 | { 8 | //https://chimu.moe/zh-CN/docs 9 | public class ChimuExtensionHandler : IExtensionHandler 10 | { 11 | public string ExtensionName => Extensionname; 12 | public string[] SupportedProperties => null; 13 | public string HandlerName => Handlername; 14 | 15 | //绕过问题: 无法在非静态上下文中访问静态属性 16 | public static string Extensionname => "_CHIMU"; 17 | public static string Handlername => "Chimu转换器"; 18 | 19 | public bool Process(string name, ref object value, ref IList errors) 20 | { 21 | try 22 | { 23 | //chimu的 24 | if (name == "NOVIDEO") 25 | { 26 | value = value != null && (bool)value 27 | ? "?n=0" 28 | : "?n=1"; 29 | 30 | return true; 31 | } 32 | } 33 | catch (Exception e) 34 | { 35 | errors.Add($"转换失败: {e.Message}"); 36 | value = null; 37 | return false; 38 | } 39 | 40 | return false; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/AccelUtils/IExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Diagnostics.CodeAnalysis; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.AccelUtils 5 | { 6 | public interface IExtensionHandler 7 | { 8 | /// 9 | /// 处理器要处理的扩展名 10 | /// 11 | public string ExtensionName { get; } 12 | 13 | /// 14 | /// 处理器支持的属性 15 | /// 16 | public string[] SupportedProperties { get; } 17 | 18 | /// 19 | /// 处理器名称 20 | /// 21 | public string HandlerName { get; } 22 | 23 | /// 24 | /// 将输入的值转换为特定的输出 25 | /// 26 | /// 属性名称 27 | /// 属性值 28 | /// 错误列表 29 | /// 属性是否支持 30 | public bool Process(string name, [NotNull] ref object value, [NotNull] ref IList errors); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/AccelUtils/NumberExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.AccelUtils 6 | { 7 | public class NumberExtensionHandler : IExtensionHandler 8 | { 9 | public string ExtensionName => Extensionname; 10 | public string[] SupportedProperties => null; 11 | public string HandlerName => Handlername; 12 | 13 | //绕过问题: 无法在非静态上下文中访问静态属性 14 | public static string Extensionname => "_NUMBER"; 15 | public static string Handlername => "Bool转Int"; 16 | 17 | public bool Process(string name, ref object value, ref IList errors) 18 | { 19 | if (value is bool) 20 | { 21 | value = (bool)value ? 1 : 0; 22 | return true; 23 | } 24 | 25 | errors.Add($"与{name}对应的值不是True或False"); 26 | return false; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/AccelUtils/ProcessResult.cs: -------------------------------------------------------------------------------- 1 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.AccelUtils 2 | { 3 | public enum ProcessResult 4 | { 5 | Failed, 6 | Success, 7 | NotSupported 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/AccelUtils/SayoExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.AccelUtils 7 | { 8 | public class SayoExtensionHandler : IExtensionHandler 9 | { 10 | public string ExtensionName => Extensionname; 11 | public string[] SupportedProperties => null; 12 | public string HandlerName => Handlername; 13 | 14 | //绕过问题: 无法在非静态上下文中访问静态属性 15 | public static string Extensionname => "_SAYO"; 16 | public static string Handlername => "Sayo转换器"; 17 | 18 | public bool Process(string name, ref object value, ref IList errors) 19 | { 20 | try 21 | { 22 | if (name == "NOVIDEO") 23 | { 24 | value = value != null && (bool)value 25 | ? "novideo" 26 | : "full"; 27 | 28 | return true; 29 | } 30 | } 31 | catch (Exception e) 32 | { 33 | errors.Add($"转换失败: {e.Message}"); 34 | value = null; 35 | return false; 36 | } 37 | 38 | return false; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/Extensions/ChimuExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.Extensions 7 | { 8 | //https://chimu.moe/zh-CN/docs 9 | public class ChimuExtensionHandler : IExtensionHandler 10 | { 11 | public string ExtensionName => Extensionname; 12 | public string[] SupportedProperties => null; 13 | public string HandlerName => Handlername; 14 | 15 | //绕过问题: 无法在非静态上下文中访问静态属性 16 | public static string Extensionname => "_CHIMU"; 17 | public static string Handlername => "Chimu转换器"; 18 | 19 | public bool Process(string name, ref object value, ref IList errors) 20 | { 21 | try 22 | { 23 | //chimu的 24 | if (name == "NOVIDEO") 25 | { 26 | value = value != null && (bool)value 27 | ? "?n=0" 28 | : "?n=1"; 29 | 30 | return true; 31 | } 32 | } 33 | catch (Exception e) 34 | { 35 | errors.Add($"转换失败: {e.Message}"); 36 | value = null; 37 | return false; 38 | } 39 | 40 | return false; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/Extensions/IExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Diagnostics.CodeAnalysis; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.Extensions 5 | { 6 | public interface IExtensionHandler 7 | { 8 | /// 9 | /// 处理器要处理的扩展名 10 | /// 11 | public string ExtensionName { get; } 12 | 13 | /// 14 | /// 处理器支持的属性 15 | /// 16 | public string[] SupportedProperties { get; } 17 | 18 | /// 19 | /// 处理器名称 20 | /// 21 | public string HandlerName { get; } 22 | 23 | /// 24 | /// 将输入的值转换为特定的输出 25 | /// 26 | /// 属性名称 27 | /// 属性值 28 | /// 错误列表 29 | /// 属性是否支持 30 | public bool Process(string name, [NotNull] ref object value, [NotNull] ref IList errors); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/Extensions/NumberExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.Extensions 6 | { 7 | public class NumberExtensionHandler : IExtensionHandler 8 | { 9 | public string ExtensionName => Extensionname; 10 | public string[] SupportedProperties => null; 11 | public string HandlerName => Handlername; 12 | 13 | //绕过问题: 无法在非静态上下文中访问静态属性 14 | public static string Extensionname => "_NUMBER"; 15 | public static string Handlername => "Bool转Int"; 16 | 17 | public bool Process(string name, ref object value, ref IList errors) 18 | { 19 | if (value is bool) 20 | { 21 | value = (bool)value ? 1 : 0; 22 | return true; 23 | } 24 | 25 | errors.Add($"与{name}对应的值不是True或False"); 26 | return false; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/Extensions/SayoExtensionHandler.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.Extensions 7 | { 8 | public class SayoExtensionHandler : IExtensionHandler 9 | { 10 | public string ExtensionName => Extensionname; 11 | public string[] SupportedProperties => null; 12 | public string HandlerName => Handlername; 13 | 14 | //绕过问题: 无法在非静态上下文中访问静态属性 15 | public static string Extensionname => "_SAYO"; 16 | public static string Handlername => "Sayo转换器"; 17 | 18 | public bool Process(string name, ref object value, ref IList errors) 19 | { 20 | try 21 | { 22 | if (name == "NOVIDEO") 23 | { 24 | value = value != null && (bool)value 25 | ? "novideo" 26 | : "full"; 27 | 28 | return true; 29 | } 30 | } 31 | catch (Exception e) 32 | { 33 | errors.Add($"转换失败: {e.Message}"); 34 | value = null; 35 | return false; 36 | } 37 | 38 | return false; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/DownloadAccel/Graphics/AccelDownloadProgressBar.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Bindables; 3 | using osu.Game.Beatmaps; 4 | using osu.Game.Beatmaps.Drawables; 5 | using osu.Game.Graphics.UserInterface; 6 | using osu.Game.Online; 7 | using osu.Game.Rulesets.Hikariii.Features.ListenerLoader.Utils; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.DownloadAccel.Graphics; 10 | 11 | public partial class AccelDownloadProgressBar : DownloadProgressBar 12 | { 13 | public AccelDownloadProgressBar(IBeatmapSetInfo beatmapSet) 14 | : base(beatmapSet) 15 | { 16 | this.beatmapSetInfo = beatmapSet; 17 | } 18 | 19 | private readonly IBeatmapSetInfo beatmapSetInfo; 20 | 21 | [BackgroundDependencyLoader] 22 | private void load() 23 | { 24 | var accelTracker = new AccelBeatmapDownloadTracker(beatmapSetInfo); 25 | AddInternal(accelTracker); 26 | 27 | if (this.FindInstance(typeof(ProgressBar)) is not ProgressBar progressBar) return; 28 | 29 | progressBar.Current.UnbindBindings(); 30 | progressBar.Current.BindTarget = accelTracker.Progress; 31 | 32 | var dlTracker = this.FindInstance(typeof(BeatmapDownloadTracker)) as BeatmapDownloadTracker; 33 | ((Bindable)dlTracker.State).BindTarget = accelTracker.State; 34 | ((BindableNumber)dlTracker.Progress).BindTarget = accelTracker.Progress; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/FeatureManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Allocation; 3 | using osu.Framework.Bindables; 4 | using osu.Framework.Graphics.Containers; 5 | using osu.Game.Configuration; 6 | using osu.Game.Rulesets.Hikariii.Features.DownloadAccel.AccelUtils; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Features; 9 | 10 | public partial class FeatureManager : CompositeDrawable 11 | { 12 | public readonly BindableBool CanUseDBus = new(false); 13 | 14 | public static FeatureManager? Instance { get; private set; } 15 | 16 | [BackgroundDependencyLoader] 17 | private void load(OsuConfigManager osuConfig) 18 | { 19 | AccelExtensionsUtil.SetOsuConfigManager(osuConfig); 20 | 21 | try 22 | { 23 | tryDbus(); 24 | } 25 | catch (Exception e) 26 | { 27 | Logging.LogError(e, "Failed call tryDbus"); 28 | } 29 | } 30 | 31 | public FeatureManager() 32 | { 33 | Instance = this; 34 | } 35 | 36 | private void tryDbus() 37 | { 38 | // Check DBus 39 | if (!OperatingSystem.IsLinux()) 40 | { 41 | CanUseDBus.Value = false; 42 | } 43 | else 44 | { 45 | try 46 | { 47 | // 尝试访问Tmds.DBus和M.DBus中的值,如果访问成功则代表安装了DBus集成 48 | string? tmdsDBusSystrmAddr = Tmds.DBus.Address.System; 49 | var mDbus = new M.DBus.ServiceUtils(); 50 | } 51 | catch (Exception e) 52 | { 53 | Logging.LogError(e, $"Unable to activate DBus integration: {e.Message}"); 54 | CanUseDBus.Value = false; 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/ListenerLoader/AbstractInjector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Graphics.Containers; 5 | using osu.Game.Rulesets.Hikariii.Features.ListenerLoader.Utils; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.ListenerLoader; 8 | 9 | public abstract partial class AbstractHandler : CompositeDrawable 10 | { 11 | [Resolved] 12 | private OsuGame game { get; set; } = null!; 13 | 14 | protected OsuGame Game => game; 15 | 16 | protected static readonly BindingFlags InstanceOrStaticFlag = BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic; 17 | 18 | /// 19 | /// 在给定的对象中寻找第一个符合type的非公开字段 20 | /// 21 | /// 目标类型 22 | /// 目标对象 23 | /// 24 | protected FieldInfo? FindFieldInstance(object obj, Type type) 25 | { 26 | return obj.FindFieldInstance(type); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/ListenerLoader/Handlers/ScreenHandlers/AbstractScreenHandler.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Screens; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.ListenerLoader.Handlers.ScreenHandlers; 6 | 7 | public abstract partial class AbstractScreenHandler : Drawable 8 | { 9 | [Resolved] 10 | private OsuGame game { get; set; } = null!; 11 | 12 | protected OsuGame Game => game; 13 | 14 | public abstract void Handle(IScreen prev, IScreen next); 15 | 16 | protected ScreenStack? ScreenStack { get; set; } 17 | 18 | public void SetScreenStack(ScreenStack screenStack) 19 | { 20 | this.ScreenStack = screenStack; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/ListenerLoader/Handlers/SentryLoggerDisabler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Allocation; 3 | using osu.Game.Utils; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.ListenerLoader.Handlers; 6 | 7 | public partial class SentryLoggerDisabler : AbstractHandler 8 | { 9 | public SentryLoggerDisabler(OsuGame gameInstance) 10 | { 11 | try 12 | { 13 | disableSentryLogger(gameInstance); 14 | } 15 | catch (Exception e) 16 | { 17 | Logging.LogError(e, "未能禁用 SentryLogger :("); 18 | } 19 | } 20 | 21 | private void disableSentryLogger(OsuGame game) 22 | { 23 | var field = this.FindFieldInstance(game, typeof(SentryLogger)); 24 | if (field == null) throw new NullDependencyException("没有找到SentryLogger"); 25 | 26 | object? val = field.GetValue(game); 27 | if (val is not SentryLogger sentryLogger) throw new NullDependencyException($"获取的对象不是SentryLogger: {val}"); 28 | 29 | sentryLogger.Dispose(); 30 | Logging.Log("成功禁用SentryLogger!"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/ListenerLoader/Utils/HandlerExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.ListenerLoader.Utils; 6 | 7 | public static class HandlerExtension 8 | { 9 | public const BindingFlags INSTANCE_FLAG = BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.GetProperty | BindingFlags.GetField; 10 | 11 | private static FieldInfo? findFieldInstanceInBaseType(Type baseType, Type type) 12 | { 13 | var field = baseType.GetFields(INSTANCE_FLAG) 14 | .FirstOrDefault(f => f.FieldType == type); 15 | 16 | if (field == null && baseType.BaseType != null) 17 | field = findFieldInstanceInBaseType(baseType.BaseType, type); 18 | 19 | return field; 20 | } 21 | 22 | public static FieldInfo? FindFieldInstance(this object obj, Type type) 23 | { 24 | var field = obj.GetType().GetFields(INSTANCE_FLAG) 25 | .FirstOrDefault(f => f.FieldType == type); 26 | 27 | var baseType = obj.GetType().BaseType; 28 | if (baseType != null && field == null) 29 | field = findFieldInstanceInBaseType(baseType, type); 30 | 31 | return field; 32 | } 33 | 34 | public static object? FindInstance(this object obj, Type type) 35 | { 36 | var field = obj.FindFieldInstance(type); 37 | return field == null ? null : field.GetValue(obj); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Extensions/APIBeatmapSetExtension.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Online.API.Requests.Responses; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Extensions; 4 | 5 | public static class APIBeatmapSetExtension 6 | { 7 | public static string GetDisplayTitle(this APIBeatmapSet apiSet) 8 | { 9 | return string.IsNullOrEmpty(apiSet.TitleUnicode) ? apiSet.Title : apiSet.TitleUnicode; 10 | } 11 | 12 | public static string GetDisplayArtist(this APIBeatmapSet apiBeatmapSet) 13 | { 14 | return string.IsNullOrEmpty(apiBeatmapSet.ArtistUnicode) ? apiBeatmapSet.Artist : apiBeatmapSet.ArtistUnicode; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/LLinBottombarPaddingIndicatorMaybe.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Graphics.Containers; 4 | using osu.Framework.Graphics.Shapes; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Screens.LLin; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics; 8 | 9 | public partial class LLinBottombarPaddingIndicatorMaybe : CompositeDrawable 10 | { 11 | private Box bottomLine; 12 | private Box bg; 13 | 14 | [Resolved] 15 | private CustomColourProvider colourProvider { get; set; } = null!; 16 | 17 | [BackgroundDependencyLoader] 18 | private void load() 19 | { 20 | InternalChildren = 21 | [ 22 | bg = new Box 23 | { 24 | Name = "Basic Background", 25 | Colour = colourProvider.Background5, 26 | RelativeSizeAxes = Axes.Both, 27 | }, 28 | bottomLine = new Box 29 | { 30 | Name = "Bottom Bar", 31 | Height = 5, 32 | RelativeSizeAxes = Axes.X, 33 | Colour = colourProvider.Content2, 34 | Anchor = Anchor.TopLeft, 35 | Origin = Anchor.TopLeft, 36 | } 37 | ]; 38 | 39 | colourProvider.HueColour.BindValueChanged(v => 40 | { 41 | bg.Colour = colourProvider.Background5; 42 | bottomLine.Colour = colourProvider.Content2; 43 | }, true); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/ISidebarContent.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics.Sprites; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar 4 | { 5 | public interface ISidebarContent 6 | { 7 | public string Title { get; } 8 | 9 | public IconUsage Icon { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/PluginsPage/PluginRemoveConfirmDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Game.Overlays.Dialog; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.PluginsPage 5 | { 6 | public partial class PluginRemoveConfirmDialog : PopupDialog 7 | { 8 | public PluginRemoveConfirmDialog(string headerText, Action onConfirm) 9 | { 10 | HeaderText = headerText; 11 | BodyText = "卸载后该插件在本次osu!会话中将不再可用!"; 12 | 13 | Buttons = new PopupDialogButton[] 14 | { 15 | new PopupDialogOkButton 16 | { 17 | Text = "是", 18 | Action = () => onConfirm(false) 19 | }, 20 | new PopupDialogOkButton 21 | { 22 | Text = "是, 并且未来不再加载该插件到播放器中", 23 | Action = () => onConfirm(true) 24 | }, 25 | new PopupDialogCancelButton 26 | { 27 | Text = "否" 28 | } 29 | }; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/ISettingsItem.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Bindables; 2 | using osu.Framework.Graphics.Cursor; 3 | using osu.Framework.Graphics.Sprites; 4 | using osu.Framework.Localisation; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings 7 | { 8 | public interface ISettingsItem : IHasTooltip 9 | { 10 | public LocalisableString Description { get; set; } 11 | public IconUsage Icon { get; set; } 12 | public Bindable Bindable { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/Items/PlaceHolder.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items 4 | { 5 | public partial class PlaceHolder : Drawable 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/Items/SettingsEnumPiece.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using osu.Framework.Extensions; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items 6 | { 7 | public partial class SettingsEnumPiece : SettingsListPiece 8 | where T : struct, Enum 9 | { 10 | public SettingsEnumPiece() 11 | { 12 | var array = (T[])Enum.GetValues(typeof(T)); 13 | Values = array.ToList(); 14 | } 15 | 16 | protected override string GetValueText(T newValue) => newValue.GetDescription(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/Items/SettingsSeparatorPiece.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Extensions.Color4Extensions; 3 | using osu.Framework.Graphics; 4 | using osu.Framework.Graphics.Containers; 5 | using osu.Framework.Graphics.Sprites; 6 | using osuTK.Graphics; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items 9 | { 10 | public partial class SettingsSeparatorPiece : SettingsPieceBasePanel 11 | { 12 | public SettingsSeparatorPiece() 13 | { 14 | } 15 | 16 | [BackgroundDependencyLoader] 17 | private void load() 18 | { 19 | Icon = new IconUsage(); 20 | 21 | RelativeSizeAxes = Axes.X; 22 | Width = 1; 23 | 24 | SpriteText.Anchor = SpriteText.Origin = SpriteIcon.Anchor = SpriteIcon.Origin = Anchor.BottomRight; 25 | FillFlow.Direction = FillDirection.Horizontal; 26 | 27 | SpriteIcon.Hide(); 28 | } 29 | 30 | protected override void OnColorChanged() 31 | { 32 | BgBox.Colour = Color4.Black.Opacity(0); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/Items/SettingsSlider.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Numerics; 5 | using osu.Framework.Allocation; 6 | using osu.Framework.Graphics; 7 | using osu.Framework.Graphics.Containers; 8 | using osu.Framework.Graphics.Shapes; 9 | using osu.Game.Graphics.UserInterface; 10 | using Vector2 = osuTK.Vector2; 11 | 12 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items 13 | { 14 | public partial class SettingsSlider : OsuSliderBar 15 | where T : struct, INumber, IMinMaxValue, IConvertible 16 | { 17 | private Container circle; 18 | 19 | [BackgroundDependencyLoader] 20 | private void load() 21 | { 22 | Height = 1; 23 | Child = circle = new Container 24 | { 25 | RelativePositionAxes = Axes.X, 26 | Size = new Vector2(25), 27 | Anchor = Anchor.CentreLeft, 28 | Origin = Anchor.CentreLeft, 29 | Child = new Circle 30 | { 31 | Anchor = Anchor.Centre, 32 | Origin = Anchor.Centre, 33 | RelativeSizeAxes = Axes.Both, 34 | RelativePositionAxes = Axes.X, 35 | X = -0.5f 36 | } 37 | }; 38 | 39 | RangePadding = 0; 40 | } 41 | 42 | protected override void UpdateValue(float value) 43 | { 44 | circle.MoveToX(value, 250, Easing.OutExpo); 45 | circle.ScaleTo(value + 0.2f, 250, Easing.OutBack); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/Items/SettingsSliderPiece.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using System.Numerics; 5 | using osu.Framework.Bindables; 6 | using osu.Framework.Graphics; 7 | using osu.Framework.Graphics.Sprites; 8 | using osu.Framework.Localisation; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items 11 | { 12 | public partial class SettingsSliderPiece : SettingsPieceBasePanel, ISettingsItem 13 | where T : struct, INumber, IMinMaxValue, IConvertible 14 | { 15 | public Bindable Bindable { get; set; } 16 | 17 | public LocalisableString TooltipText 18 | { 19 | get => tooltip; 20 | set => tooltip = value + " (点按中键重置)"; 21 | } 22 | 23 | private string tooltip = "点按中键重置"; 24 | 25 | public bool DisplayAsPercentage; 26 | public bool TransferValueOnCommit; 27 | 28 | protected override IconUsage DefaultIcon => FontAwesome.Solid.SlidersH; 29 | 30 | protected override Drawable CreateSideDrawable() => new SettingsSlider 31 | { 32 | RelativeSizeAxes = Axes.Both, 33 | Current = Bindable, 34 | DisplayAsPercentage = DisplayAsPercentage, 35 | TransferValueOnCommit = TransferValueOnCommit, 36 | }; 37 | 38 | protected override void OnMiddleClick() 39 | { 40 | Bindable.Value = Bindable.Default; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Settings/Items/SettingsTextBoxPiece.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Bindables; 5 | using osu.Framework.Graphics; 6 | using osu.Framework.Graphics.Sprites; 7 | using osu.Framework.Localisation; 8 | using osu.Game.Graphics.UserInterface; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items 11 | { 12 | public partial class SettingsTextBoxPiece : SettingsPieceBasePanel, ISettingsItem 13 | { 14 | public Bindable Bindable { get; set; } 15 | 16 | public LocalisableString TooltipText { get; set; } 17 | 18 | [BackgroundDependencyLoader] 19 | private void load() 20 | { 21 | Bindable.BindValueChanged(onBindableChanged); 22 | } 23 | 24 | protected override IconUsage DefaultIcon => FontAwesome.Solid.ToggleOn; 25 | 26 | protected override void OnColorChanged() 27 | { 28 | base.OnColorChanged(); 29 | } 30 | 31 | private void onBindableChanged(ValueChangedEvent v) 32 | { 33 | textBox.Text = v.NewValue; 34 | } 35 | 36 | protected override void OnLeftClick() 37 | { 38 | } 39 | 40 | protected override void OnRightClick() => OnLeftClick(); 41 | 42 | protected override void OnMiddleClick() 43 | { 44 | } 45 | 46 | private readonly PieceTextBox textBox = new PieceTextBox(); 47 | 48 | protected override Drawable CreateSideDrawable() 49 | { 50 | return textBox; 51 | } 52 | 53 | private partial class PieceTextBox : OsuTextBox 54 | { 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/SidebarPluginsPage.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Graphics.Sprites; 4 | using osu.Game.Graphics.Containers; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.PluginsPage; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar 8 | { 9 | internal partial class SidebarPluginsPage : OsuScrollContainer, ISidebarContent 10 | { 11 | public string Title => "插件"; 12 | public IconUsage Icon => FontAwesome.Solid.Boxes; 13 | 14 | [BackgroundDependencyLoader] 15 | private void load() 16 | { 17 | ScrollbarVisible = false; 18 | RelativeSizeAxes = Axes.Both; 19 | 20 | Add(new PluginsSection()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Graphics/SideBar/Tabs/TabControlPosition.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Tabs 4 | { 5 | public enum TabControlPosition 6 | { 7 | [Description("右侧")] 8 | Right, 9 | 10 | [Description("左侧")] 11 | Left, 12 | 13 | [Description("顶部")] 14 | Top, 15 | 16 | Bottom 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Input/InputHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using osu.Framework.Graphics.Containers; 5 | using osu.Framework.Input.Bindings; 6 | using osu.Framework.Input.Events; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Screens.LLin; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Input; 10 | 11 | public partial class RulesetInputHandler : CompositeDrawable, IKeyBindingHandler 12 | { 13 | public RulesetInputHandler(Dictionary keybinds, LLinScreen screen) 14 | { 15 | this.keyBinds = keybinds; 16 | this.screen = screen; 17 | } 18 | 19 | public bool HandleExternal(UIEvent e) 20 | { 21 | return this.Handle(e); 22 | } 23 | 24 | private readonly LLinScreen screen; 25 | 26 | private readonly Dictionary keyBinds; 27 | 28 | public void RegisterAction(HikariiiAction action) 29 | { 30 | } 31 | 32 | public bool BlockNextAction; 33 | 34 | public bool OnPressed(KeyBindingPressEvent action) 35 | { 36 | Logging.Log("Got event " + action + "!!!"); 37 | 38 | if (BlockNextAction) 39 | { 40 | BlockNextAction = false; 41 | return true; 42 | } 43 | 44 | if (!screen.HasFocus) return true; 45 | 46 | //查找本体按键绑定 47 | var target = keyBinds.FirstOrDefault(b => b.Key == action.Action).Value; 48 | target?.Invoke(); 49 | 50 | return target != null; 51 | } 52 | 53 | public void OnReleased(KeyBindingReleaseEvent e) 54 | { 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Interfaces/Plugins/IProvideAudioControlPlugin.cs: -------------------------------------------------------------------------------- 1 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins 2 | { 3 | public interface IProvideAudioControlPlugin 4 | { 5 | /// 6 | /// 下一首 7 | /// 8 | /// 操作是否被允许 9 | public bool NextTrack(); 10 | 11 | /// 12 | /// 上一首 13 | /// 14 | /// 操作是否被允许 15 | public bool PrevTrack(); 16 | 17 | /// 18 | /// 切换暂停 19 | /// 20 | /// 操作是否被允许 21 | public bool TogglePause(); 22 | 23 | /// 24 | /// 调整歌曲进度到某一时间节点 25 | /// 26 | /// 目标时间(毫秒) 27 | /// 操作是否被允许 28 | public bool Seek(double position); 29 | 30 | /// 31 | /// 是否被选中为Mvis音频控制器 32 | /// 33 | bool IsCurrent { get; set; } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/BeatmapBackground.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Graphics; 5 | using osu.Framework.Graphics.Containers; 6 | using osu.Framework.Graphics.Sprites; 7 | using osu.Framework.Graphics.Textures; 8 | using osu.Game.Beatmaps; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 11 | { 12 | public partial class BeatmapBackground : BufferedContainer 13 | { 14 | private readonly Sprite sprite; 15 | private readonly WorkingBeatmap beatmap; 16 | 17 | public BeatmapBackground(WorkingBeatmap beatmap = null) 18 | : base(cachedFrameBuffer: true) 19 | { 20 | this.beatmap = beatmap; 21 | RelativeSizeAxes = Axes.Both; 22 | 23 | Child = sprite = new Sprite 24 | { 25 | Anchor = Anchor.Centre, 26 | Origin = Anchor.Centre, 27 | RelativeSizeAxes = Axes.Both, 28 | FillMode = FillMode.Fill, 29 | }; 30 | } 31 | 32 | [BackgroundDependencyLoader] 33 | private void load(TextureStore textures) 34 | { 35 | sprite.Texture = beatmap?.GetBackground() ?? textures.Get(@"Backgrounds/bg4"); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/BeatmapHashResolver.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Game.Beatmaps; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 6 | { 7 | [Cached] 8 | public partial class BeatmapHashResolver : Component 9 | { 10 | [Resolved] 11 | private BeatmapManager beatmapManager { get; set; } = null!; 12 | 13 | public BeatmapInfo? ResolveHash(string hash) 14 | { 15 | return beatmapManager.QueryBeatmap(b => b.MD5Hash == hash); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/BeatmapMetadataExtension.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Localisation; 2 | using osu.Game.Beatmaps; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 5 | { 6 | public static class BeatmapMetadataExtension 7 | { 8 | public static RomanisableString GetTitleRomanisable(this BeatmapMetadata metadata) 9 | { 10 | return new RomanisableString(metadata.TitleUnicode, metadata.Title); 11 | } 12 | 13 | public static RomanisableString GetArtistRomanisable(this BeatmapMetadata metadata) 14 | { 15 | return new RomanisableString(metadata.ArtistUnicode, metadata.Artist); 16 | } 17 | 18 | public static (string Title, bool IsUnicode) GetTitle(this BeatmapMetadata metadata) 19 | { 20 | return string.IsNullOrEmpty(metadata.TitleUnicode) 21 | ? (metadata.Title, false) 22 | : (metadata.TitleUnicode, true); 23 | } 24 | 25 | public static string GetArtist(this BeatmapMetadata metadata) 26 | { 27 | return string.IsNullOrEmpty(metadata.ArtistUnicode) 28 | ? metadata.Artist 29 | : metadata.ArtistUnicode; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/BlockMouseBox.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics.Shapes; 2 | using osu.Framework.Input.Events; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 5 | { 6 | public partial class BlockMouseBox : Box 7 | { 8 | protected override bool OnClick(ClickEvent e) => true; 9 | protected override bool OnMouseMove(MouseMoveEvent e) => true; 10 | protected override bool OnMouseDown(MouseDownEvent e) => true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/Flash.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Audio.Track; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Graphics.Colour; 4 | using osu.Framework.Graphics.Shapes; 5 | using osu.Game.Beatmaps.ControlPoints; 6 | using osu.Game.Graphics.Containers; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 9 | { 10 | public partial class Flash : BeatSyncedContainer 11 | { 12 | private readonly Box flashBox = new Box 13 | { 14 | RelativeSizeAxes = Axes.Both, 15 | Alpha = 0, 16 | Colour = Colour4.White.Opacity(0.4f) 17 | }; 18 | 19 | public ColourInfo BoxColor 20 | { 21 | get => flashBox.Colour; 22 | set => flashBox.Colour = value; 23 | } 24 | 25 | public Flash() 26 | { 27 | Child = flashBox; 28 | } 29 | 30 | protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes) 31 | { 32 | base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes); 33 | 34 | switch (timingPoint.TimeSignature.Numerator) 35 | { 36 | case 4: 37 | if ((beatIndex % 4 == 0 && beatIndex / 4 > 0) || effectPoint.KiaiMode) 38 | flashBox.FadeOutFromOne(1000); 39 | break; 40 | 41 | case 3: 42 | if ((beatIndex % 3 == 0 && beatIndex / 3 > 0) || effectPoint.KiaiMode) 43 | flashBox.FadeOutFromOne(1000); 44 | break; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/HikariiiSamplePlaybackAntiDisabler.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Bindables; 2 | using osu.Framework.Graphics.Containers; 3 | using osu.Game.Audio; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc; 6 | 7 | public partial class HikariiiSamplePlaybackAntiDisabler : CompositeComponent, ISamplePlaybackDisabler 8 | { 9 | public IBindable SamplePlayDisabled = new Bindable(false); 10 | 11 | IBindable ISamplePlaybackDisabler.SamplePlaybackDisabled => SamplePlayDisabled; 12 | } 13 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/LLinModRateAdjust.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Audio; 4 | using osu.Framework.Bindables; 5 | using osu.Framework.Localisation; 6 | using osu.Game.Rulesets.Mods; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 9 | { 10 | internal class LLinModRateAdjust : ModRateAdjust 11 | { 12 | public override string Name => "LLinRateAdjust"; 13 | public override string Acronym => "RA"; 14 | public override LocalisableString Description => "no"; 15 | public override double ScoreMultiplier => 0; 16 | public override bool UserPlayable => false; 17 | 18 | public override BindableNumber SpeedChange { get; } = new BindableDouble 19 | { 20 | Value = 1, 21 | MaxValue = 2, 22 | MinValue = 0.1f 23 | }; 24 | 25 | public override void ApplyToTrack(IAdjustableAudioComponent track) 26 | { 27 | //不要应用到音轨,我们只希望这个Mod影响故事版Sample 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/PlayerInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 4 | { 5 | /// 6 | /// 播放器相关信息 7 | /// 8 | public class PlayerInfo 9 | { 10 | /// 11 | /// 播放器名称 12 | /// 13 | public string Name = string.Empty; 14 | 15 | /// 16 | /// 播放器版本 17 | /// 18 | public uint Version = 0; 19 | 20 | /// 21 | /// 播放器提供方/作者名 22 | /// 23 | public string VendorName = string.Empty; 24 | 25 | private PlayerFlags flags = PlayerFlags.None; 26 | 27 | /// 28 | /// 播放器支持的额外功能 29 | /// 30 | /// 设置了非法组合 31 | public PlayerFlags SupportedFlags 32 | { 33 | get => flags; 34 | set 35 | { 36 | //检查是否有非法组合 37 | if (value.HasFlag(PlayerFlags.None) && value != PlayerFlags.None) 38 | throw new InvalidOperationException("PlayerFlags.None不能与其他PlayerFlags一起提供"); 39 | 40 | flags = value; 41 | } 42 | } 43 | 44 | public override string ToString() 45 | => $"{VendorName} - {Name} ({Version} | {flags})"; 46 | } 47 | 48 | [Flags] 49 | public enum PlayerFlags 50 | { 51 | None = 1, //bug: None = 0 时 HasFlagFast(PlayerFlags.None)始终为True 52 | OverlayProxy = 1 << 1, 53 | SidebarSupport = 1 << 2, 54 | 55 | All = OverlayProxy | SidebarSupport 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/PluginProgressNotification.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using osu.Game.Overlays.Notifications; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 7 | { 8 | public partial class PluginProgressNotification : ProgressNotification 9 | { 10 | public Action OnComplete { get; set; } 11 | 12 | public override void Close(bool runFlingAnimation) 13 | { 14 | OnComplete?.Invoke(); 15 | base.Close(runFlingAnimation); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/PluginResolvers/MvisPluginResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc.PluginResolvers 5 | { 6 | [Obsolete("Mvis => LLin")] 7 | public class MvisPluginResolver : LLinPluginResolver 8 | { 9 | public MvisPluginResolver(LLinPluginManager pluginManager) 10 | : base(pluginManager) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/ProgressState.cs: -------------------------------------------------------------------------------- 1 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 2 | { 3 | public enum ProgressState 4 | { 5 | Working, 6 | Success, 7 | Failed 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Misc/TypeWrapper.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Misc 6 | { 7 | public class TypeWrapper 8 | { 9 | public Type Type { get; set; } 10 | public string Name { get; set; } 11 | 12 | public override string ToString() => Name; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/BottomBar/BottomBarProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.BottomBar 4 | { 5 | public class BottomBarProvider : LLinPluginProvider 6 | { 7 | public override LLinPlugin CreatePlugin => new LegacyBottomBar(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/BottomBar/Buttons/SongProgressButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Allocation; 3 | using osu.Framework.Graphics; 4 | using osu.Framework.Graphics.Audio; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.BottomBar.Buttons 9 | { 10 | public partial class SongProgressButton : BottomBarSwitchButton 11 | { 12 | private string? timeCurrent; 13 | private string? timeTotal; 14 | 15 | [Resolved] 16 | private IImplementLLin mvis { get; set; } = null!; 17 | 18 | private DrawableTrack track => mvis.CurrentTrack; 19 | 20 | private string formatTime(TimeSpan timeSpan) => $"{(timeSpan < TimeSpan.Zero ? "-" : "")}{Math.Floor(timeSpan.Duration().TotalMinutes)}:{timeSpan.Duration().Seconds:D2}"; 21 | 22 | public SongProgressButton(IToggleableFunctionProvider provider) 23 | : base(provider) 24 | { 25 | AutoSizeAxes = Axes.X; 26 | } 27 | 28 | [BackgroundDependencyLoader] 29 | private void load() 30 | { 31 | mvis.OnBeatmapChanged(b => lastSecond = -1, this, true); 32 | 33 | if (this.outerContent != null) 34 | { 35 | this.outerContent.RelativeSizeAxes = Axes.Y; 36 | this.outerContent.AutoSizeAxes = Axes.X; 37 | } 38 | } 39 | 40 | private int lastSecond; 41 | 42 | protected override void Update() 43 | { 44 | base.Update(); 45 | 46 | int currentSecond = (int)Math.Floor(track.CurrentTime / 1000.0); 47 | if (lastSecond == currentSecond) return; 48 | 49 | lastSecond = currentSecond; 50 | timeCurrent = formatTime(TimeSpan.FromSeconds(currentSecond)); 51 | timeTotal = formatTime(TimeSpan.FromMilliseconds(track.Length)); 52 | Title = $"{timeCurrent} / {timeTotal}"; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Helper/APILyricRequest.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Online.API; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper 5 | { 6 | public class APILyricRequest : OsuJsonWebRequest 7 | { 8 | public APILyricRequest(long id) 9 | { 10 | Url = $"https://music.163.com/api/song/lyric?os=pc&id={id}&lv=-1&kv=-1&tv=-1"; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Helper/APISearchRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Game.Online.API; 3 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper 6 | { 7 | public class APISearchRequest : OsuJsonWebRequest 8 | { 9 | public APISearchRequest(string target) 10 | { 11 | Url = $"https://music.163.com/api/search/get/web?hlpretag=&hlposttag=&s={target}&type=1&total=true&limit=10"; 12 | } 13 | 14 | protected override void ProcessResponse() 15 | { 16 | try 17 | { 18 | base.ProcessResponse(); 19 | } 20 | catch (Exception e) 21 | { 22 | Logging.LogError(e, "无法将返回的内容转换为APISearchResponseRoot, 上游返回了意外的结果"); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Helper/LyricProperties/IPropertyProcessor.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper.LyricProperties; 4 | 5 | public interface IPropertyProcessor 6 | { 7 | /// 8 | /// 9 | /// 10 | /// 11 | /// 12 | /// 此Processor是否成功处理了输入的属性和Lyric 13 | public bool Process(string propertyInput, Lyric lyricRef); 14 | } 15 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Helper/LyricProperties/Processors/AuthorProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper.LyricProperties.Processors; 5 | 6 | public class AuthorProcessor : IPropertyProcessor 7 | { 8 | public bool Process(string propertyInput, Lyric lyricRef) 9 | { 10 | if (!propertyInput.StartsWith("by:", StringComparison.Ordinal)) 11 | return false; 12 | 13 | // todo: Implement this 14 | 15 | return true; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Helper/LyricProperties/Processors/TimeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper.LyricProperties.Processors; 5 | 6 | public class TimeProcessor : IPropertyProcessor 7 | { 8 | public bool Process(string propertyInput, Lyric lyricRef) 9 | { 10 | if (!char.IsDigit(propertyInput[0])) 11 | return false; 12 | 13 | lyricRef.Time = toMilliseconds(propertyInput); 14 | 15 | return true; 16 | } 17 | 18 | private int toMilliseconds(string src) 19 | { 20 | string[] spilt = src.Contains(':') 21 | ? src.Split(':') 22 | : src.Split('.', 2); 23 | 24 | if (spilt.Length < 2) 25 | { 26 | Logging.Log($"无效的时间: \"{src}\""); 27 | return 0; 28 | } 29 | 30 | int.TryParse(spilt[0], out int minutes); 31 | double.TryParse(spilt[1], out double seconds); 32 | 33 | return minutes * 60000 + (int)Math.Round(seconds * 1000); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Helper/LyricProperties/PropertyProcessorManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper.LyricProperties.Processors; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper.LyricProperties 7 | { 8 | public class PropertyProcessorManager 9 | { 10 | public static readonly PropertyProcessorManager INSTANCE = new PropertyProcessorManager(); 11 | 12 | private readonly List processors = []; 13 | 14 | private PropertyProcessorManager() 15 | { 16 | processors.AddRange( 17 | [ 18 | new TimeProcessor(), 19 | new AuthorProcessor() 20 | ]); 21 | } 22 | 23 | /// 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 至少有一个属性处理器处理成功 29 | public bool Process(string propertyInput, Lyric lyric) 30 | { 31 | bool atLeastOneProcessed = false; 32 | 33 | foreach (var propertyProcessor in processors) 34 | { 35 | try 36 | { 37 | atLeastOneProcessed = atLeastOneProcessed || propertyProcessor.Process(propertyInput, lyric); 38 | } 39 | catch (Exception e) 40 | { 41 | Logging.LogError(e, $"{propertyProcessor.GetType()} Failed to process property {propertyInput}: {e.Message}"); 42 | } 43 | } 44 | 45 | return atLeastOneProcessed; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/LyricPluginProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic 4 | { 5 | public class LyricPluginProvider : LLinPluginProvider 6 | { 7 | //在这里制定该Provider要提供的插件 8 | public override LLinPlugin CreatePlugin => new LyricPlugin(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/APISearchResponseRoot.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc 4 | { 5 | public class APISearchResponseRoot 6 | { 7 | [JsonProperty("result")] 8 | public APISearchResultInfo? Result { get; set; } 9 | 10 | [JsonProperty("code")] 11 | public int ResponseCode { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/APISearchResultInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc 5 | { 6 | public class APISearchResultInfo 7 | { 8 | [JsonProperty("songs")] 9 | public List? Songs { get; set; } 10 | 11 | [JsonProperty("songCount")] 12 | public int SongCount { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/APISongInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Newtonsoft.Json; 5 | using Newtonsoft.Json.Serialization; 6 | using osu.Game.Beatmaps; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Misc; 8 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Helper; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc 11 | { 12 | [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] 13 | public class APISongInfo 14 | { 15 | public long ID { get; set; } 16 | 17 | public long Duration { get; set; } 18 | 19 | public string? Name { get; set; } 20 | 21 | public List Artists { get; set; } = []; 22 | 23 | public float TitleSimilarPercentage { get; set; } 24 | 25 | public float ArtistSimilarPercentage { get; set; } 26 | 27 | /// 28 | /// 获取网易云歌曲标题和搜索标题的相似度 29 | /// 30 | /// 相似度百分比 31 | public void CalculateSimilarPercentage(WorkingBeatmap beatmap) 32 | { 33 | string neteaseTitle = Name?.ToLowerInvariant() ?? string.Empty; 34 | string ourTitle = beatmap.Metadata.Title.ToLowerInvariant() ?? string.Empty; 35 | 36 | float titleSimilarPercentage = LevenshteinDistance.ComputeSimilarPercentage(neteaseTitle, ourTitle); 37 | ourTitle = beatmap.Metadata.TitleUnicode.ToLowerInvariant() ?? string.Empty; 38 | float titleSimilarPercentageUnicode = LevenshteinDistance.ComputeSimilarPercentage(neteaseTitle, ourTitle); 39 | TitleSimilarPercentage = Math.Max(titleSimilarPercentageUnicode, titleSimilarPercentage); 40 | 41 | ourTitle = beatmap.Metadata.GetArtist(); 42 | ArtistSimilarPercentage = Artists.Count(a => ourTitle.Contains(a.Name)) / (float)Artists.Count; 43 | } 44 | 45 | public string GetArtist() => string.Join(" / ", Artists.Select(a => a.Name)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/ArtistInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Serialization; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc 6 | { 7 | [JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] 8 | public class APIArtistInfo 9 | { 10 | public int ID { get; set; } 11 | public string Name { get; set; } = string.Empty; 12 | public string PicUrl { get; set; } = string.Empty; 13 | public IList? Alias { get; set; } 14 | public int AlbunSize { get; set; } 15 | public int PicId { get; set; } 16 | 17 | [JsonProperty("img1v1Url")] 18 | public string Img1V1Url { get; set; } = string.Empty; 19 | 20 | [JsonProperty("img1v1")] 21 | public int Img1V1 { get; set; } 22 | 23 | public string? Trans { get; set; } 24 | public int AlbumSize { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/Lyric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc 4 | { 5 | public class Lyric : IEquatable, IComparable 6 | { 7 | public double Time; 8 | public string Content = string.Empty; 9 | public string TranslatedString = string.Empty; 10 | 11 | public override string ToString() => $"{Time}:{Content}({TranslatedString})"; 12 | 13 | public Lyric GetCopy() 14 | { 15 | return new Lyric 16 | { 17 | Time = Time, 18 | Content = Content, 19 | TranslatedString = TranslatedString 20 | }; 21 | } 22 | 23 | public bool Equals(Lyric? other) 24 | { 25 | if (ReferenceEquals(null, other)) return false; 26 | if (ReferenceEquals(this, other)) return true; 27 | 28 | return Time == other.Time && Content == other.Content && TranslatedString == other.TranslatedString; 29 | } 30 | 31 | public int CompareTo(Lyric? other) 32 | { 33 | if (other == null) return 1; 34 | 35 | return other.Time.CompareTo(Time); 36 | } 37 | 38 | public override bool Equals(object? obj) 39 | { 40 | if (ReferenceEquals(null, obj)) return false; 41 | if (ReferenceEquals(this, obj)) return true; 42 | if (obj.GetType() != this.GetType()) return false; 43 | 44 | return Equals((Lyric)obj); 45 | } 46 | 47 | public override int GetHashCode() 48 | { 49 | return HashCode.Combine(Time, Content, TranslatedString); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/LyricInfo.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc 4 | { 5 | public class LyricInfo 6 | { 7 | [JsonProperty("lyric")] 8 | public string? RawLyric { get; set; } 9 | 10 | [JsonProperty("version")] 11 | public int Version; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/Mapping/BeatmapLyricMapping.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc.Mapping 5 | { 6 | public class BeatmapLyricMapping : IDisposable 7 | { 8 | /// 9 | /// 目标歌曲的网易云ID 10 | /// 11 | [JsonProperty("Target")] 12 | public long TargetNeteaseID { get; set; } 13 | 14 | /// 15 | /// 对应的谱面 16 | /// 17 | public int[] Beatmaps { get; set; } = []; 18 | 19 | /// 20 | /// 要匹配的标题 21 | /// 22 | public string[] MatchingTitle { get; set; } = []; 23 | 24 | /// 25 | /// 匹配模式 26 | /// 27 | public MatchingMode TitleMatchMode = MatchingMode.Exactly; 28 | 29 | /// 30 | /// 要匹配的艺术家 31 | /// 32 | public string[] MatchingArtist { get; set; } = []; 33 | 34 | /// 35 | /// 艺术家匹配模式 36 | /// 37 | public MatchingMode ArtistMatchMode = MatchingMode.Exactly; 38 | 39 | public void Dispose() 40 | { 41 | GC.SuppressFinalize(this); 42 | } 43 | } 44 | 45 | public enum MatchingMode 46 | { 47 | Exactly, 48 | Contains, 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Misc/Mapping/LyricMappings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc.Mapping 4 | { 5 | public class LyricMappings : IDisposable 6 | { 7 | /// 8 | /// 上次更新,每隔一周查询一次 9 | /// -2代表此Root处于调试/本地模式,不要更新 10 | /// -1代表此Root需要每次启动都更新一次 11 | /// 12 | public int LastUpdate { get; set; } 13 | 14 | /// 15 | /// 数据 16 | /// 17 | public BeatmapLyricMapping[]? Data { get; set; } 18 | 19 | public void Dispose() 20 | { 21 | GC.SuppressFinalize(this); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Sidebar/Graphic/DrawableLyric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Graphics.Pooling; 3 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Sidebar.Graphic 6 | { 7 | public abstract partial class DrawableLyric : PoolableDrawable, IComparable 8 | { 9 | public Lyric Value 10 | { 11 | get => value; 12 | set 13 | { 14 | if (IsLoaded) 15 | UpdateValue(value); 16 | 17 | this.value = value; 18 | } 19 | } 20 | 21 | private Lyric value = null!; 22 | 23 | public double CurrentY; 24 | public abstract int FinalHeight(); 25 | 26 | protected override void LoadComplete() 27 | { 28 | UpdateValue(value); 29 | base.LoadComplete(); 30 | } 31 | 32 | protected abstract void UpdateValue(Lyric lyric); 33 | 34 | public int CompareTo(DrawableLyric? other) => CurrentY.CompareTo(other?.CurrentY ?? 0); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Sidebar/Graphic/DummyDrawableLyric.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Misc; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Sidebar.Graphic 4 | { 5 | public partial class DummyDrawableLyric : DrawableLyric 6 | { 7 | public override int FinalHeight() 8 | { 9 | throw new System.NotImplementedException(); 10 | } 11 | 12 | protected override void UpdateValue(Lyric lyric) 13 | { 14 | throw new System.NotImplementedException(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Sidebar/LyricFunctionProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics.Sprites; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Graphics; 3 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Types; 5 | using osu.Game.Rulesets.Hikariii.Localisation.LLin.Plugins; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Sidebar 8 | { 9 | public class LyricFunctionProvider : ButtonWrapper, IPluginFunctionProvider 10 | { 11 | public PluginSidebarPage SourcePage { get; set; } 12 | 13 | public LyricFunctionProvider(PluginSidebarPage page) 14 | { 15 | SourcePage = page; 16 | 17 | Icon = FontAwesome.Solid.Music; 18 | Description = CloudMusicStrings.EntryTooltip; 19 | Type = FunctionType.Plugin; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Sidebar/Screens/SidebarScreen.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Screens; 2 | using osu.Game.Graphics.UserInterface; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Sidebar.Screens 5 | { 6 | public abstract partial class SidebarScreen : Screen 7 | { 8 | public virtual IconButton[] Entries => new IconButton[] { }; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/Sidebar/SidebarScreenStack.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Screens; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.Sidebar 4 | { 5 | public partial class SidebarScreenStack : ScreenStack 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/CloudMusic/UI/SettingsAnchorPiece.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using osu.Framework.Extensions; 3 | using osu.Framework.Graphics; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Graphics.SideBar.Settings.Items; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.CloudMusic.UI 7 | { 8 | public partial class SettingsAnchorPiece : SettingsListPiece 9 | { 10 | public SettingsAnchorPiece() 11 | { 12 | var anchorArray = new[] 13 | { 14 | Anchor.TopLeft, 15 | Anchor.TopCentre, 16 | Anchor.TopRight, 17 | Anchor.CentreLeft, 18 | Anchor.Centre, 19 | Anchor.CentreRight, 20 | Anchor.BottomLeft, 21 | Anchor.BottomCentre, 22 | Anchor.BottomRight, 23 | }; 24 | 25 | Values = anchorArray.ToList(); 26 | } 27 | 28 | protected override string GetValueText(Anchor newValue) => newValue.GetDescription(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Collection/CollectionHelperProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Collection 4 | { 5 | public class CollectionHelperProvider : LLinPluginProvider 6 | { 7 | public override LLinPlugin CreatePlugin => new CollectionHelper(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Collection/Config/CollectionHelperConfigManager.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Platform; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Collection.Config 5 | { 6 | public class CollectionHelperConfigManager : PluginConfigManager 7 | { 8 | public CollectionHelperConfigManager(Storage storage) 9 | : base(storage) 10 | { 11 | } 12 | 13 | protected override void InitialiseDefaults() 14 | { 15 | SetDefault(CollectionSettings.EnablePlugin, false); 16 | base.InitialiseDefaults(); 17 | } 18 | 19 | protected override string ConfigName => "CollectionSupport"; 20 | } 21 | 22 | public enum CollectionSettings 23 | { 24 | EnablePlugin 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Collection/Sidebar/CollectionFunctionProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics.Sprites; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Graphics; 3 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Types; 5 | using osu.Game.Rulesets.Hikariii.Localisation.LLin.Plugins; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Collection.Sidebar 8 | { 9 | public class CollectionFunctionProvider : ButtonWrapper, IPluginFunctionProvider 10 | { 11 | public PluginSidebarPage SourcePage { get; set; } 12 | 13 | public CollectionFunctionProvider(PluginSidebarPage page) 14 | { 15 | SourcePage = page; 16 | 17 | Icon = FontAwesome.Solid.Check; 18 | Description = CollectionStrings.EntryTooltip; 19 | Type = FunctionType.Plugin; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Collection/Sidebar/TooltipContainer.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics.Containers; 2 | using osu.Framework.Graphics.Cursor; 3 | using osu.Framework.Localisation; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Collection.Sidebar 6 | { 7 | public partial class TooltipContainer : Container, IHasTooltip 8 | { 9 | public LocalisableString TooltipText { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Collection/Utils/BeatmapInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Game.Beatmaps; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Collection.Utils 5 | { 6 | public static class BeatmapInfoExtensions 7 | { 8 | //只能先这样做了,BeatmapManager的GetWorkingBeatmap要求参数是BeatmapInfo,但是 9 | //BeatmapCollection.Beatmaps从BeatmapInfo变成了IBeatmapInfo 10 | public static BeatmapInfo AsBeatmapInfo(this IBeatmapInfo iInfo) 11 | { 12 | if (iInfo is BeatmapInfo beatmapInfo) return beatmapInfo; 13 | 14 | throw new InvalidCastException($"{iInfo} 不是 BeatmapInfo"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Andrei Zavatski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/die.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/die.wav -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/flap.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/flap.wav -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/hit.wav -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/point.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Samples/point.wav -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Resources/Shaders/sh_RulesetUtils.h: -------------------------------------------------------------------------------- 1 | #define PI 3.1415926538 2 | 3 | vec4 transparentBlack(vec3 c) 4 | { 5 | float alpha = c.r * c.g * c.b; 6 | return vec4(c, alpha < 0.01 ? 0 : alpha); 7 | } 8 | 9 | vec2 rotate(float length, vec2 origin, float angle) 10 | { 11 | float rad = angle * PI / 180.0; 12 | return vec2(cos(rad), sin(rad)) * length + origin; 13 | } 14 | 15 | vec2 rotateAround(vec2 point, vec2 origin, float angle) 16 | { 17 | float rad = angle * PI / 180.0; 18 | float s = sin(rad); 19 | float c = cos(rad); 20 | 21 | point -= origin; 22 | 23 | return vec2(point.x * c - point.y * s, point.x * s + point.y * c) + origin; 24 | } 25 | 26 | float distanceToLine(vec2 pt1, vec2 pt2, vec2 point) 27 | { 28 | vec2 a = (pt2 - pt1) / distance(pt2, pt1); 29 | vec2 closest = clamp(dot(a, point - pt1), 0.0, distance(pt2, pt1)) * a + pt1; 30 | return distance(closest, point); 31 | } 32 | 33 | float map(float value, float minValue, float maxValue, float minEndValue, float maxEndValue) 34 | { 35 | return (value - minValue) / (maxValue - minValue) * (maxEndValue - minEndValue) + minEndValue; 36 | } 37 | 38 | bool almostEqual(float v1, float v2) 39 | { 40 | return abs(v1.x - v2.x) < 0.00001; 41 | } 42 | 43 | bool almostEqual(vec2 p1, vec2 p2) 44 | { 45 | return almostEqual(p1.x, p2.x) && almostEqual(p1.y, p2.y); 46 | } 47 | 48 | vec2 getShaderTexturePosition(vec2 value, vec2 texRes, vec2 topLeft) 49 | { 50 | return topLeft - fract(value) * texRes; 51 | } 52 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Extensions/MathExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osuTK; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Extensions 5 | { 6 | public static class MathExtensions 7 | { 8 | public static float Map(float value, float minValue, float maxValue, float minEndValue, float maxEndValue) 9 | { 10 | return (value - minValue) / (maxValue - minValue) * (maxEndValue - minEndValue) + minEndValue; 11 | } 12 | 13 | public static double Map(double value, double minValue, double maxValue, double minEndValue, double maxEndValue) 14 | { 15 | return (value - minValue) / (maxValue - minValue) * (maxEndValue - minEndValue) + minEndValue; 16 | } 17 | 18 | public static Vector2 Map(float value, float minValue, float maxValue, Vector2 minEndValue, Vector2 maxEndValue) 19 | { 20 | return new Vector2(Map(value, minValue, maxValue, minEndValue.X, maxEndValue.X), Map(value, minValue, maxValue, minEndValue.Y, maxEndValue.Y)); 21 | } 22 | 23 | public static void Smooth(this float[] src, int severity = 1) 24 | { 25 | for (int i = 0; i < src.Length; i++) 26 | { 27 | var start = Math.Max(i - severity, 0); 28 | var end = Math.Min(i + severity, src.Length); 29 | 30 | float sum = 0; 31 | 32 | for (int j = start; j < end; j++) 33 | sum += src[j]; 34 | 35 | src[i] = sum / (end - start); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Graphics/ContentFitContainer.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics; 2 | using osu.Framework.Graphics.Containers; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Graphics 5 | { 6 | public partial class ContentFitContainer : Container 7 | { 8 | protected override Container Content => content; 9 | 10 | private readonly Container content; 11 | 12 | public ContentFitContainer() 13 | { 14 | Anchor = Anchor.Centre; 15 | Origin = Anchor.Centre; 16 | RelativeSizeAxes = Axes.Both; 17 | InternalChild = content = new Container 18 | { 19 | Anchor = Anchor.Centre, 20 | Origin = Anchor.Centre, 21 | RelativeSizeAxes = Axes.Both, 22 | FillMode = FillMode.Fit, 23 | }; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/SandboxScreen.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics; 2 | using osu.Framework.Screens; 3 | using osu.Game.Beatmaps; 4 | using osu.Game.Screens.Play; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens 7 | { 8 | public abstract partial class SandboxScreen : ScreenWithBeatmapBackground 9 | { 10 | protected override void LoadComplete() 11 | { 12 | base.LoadComplete(); 13 | 14 | Beatmap.BindValueChanged(b => updateComponentFromBeatmap(b.NewValue)); 15 | } 16 | 17 | public override void OnEntering(ScreenTransitionEvent e) 18 | { 19 | base.OnEntering(e); 20 | this.FadeInFromZero(250, Easing.OutQuint); 21 | updateComponentFromBeatmap(Beatmap.Value); 22 | } 23 | 24 | public override bool OnExiting(ScreenExitEvent e) 25 | { 26 | this.FadeOut(250, Easing.OutQuint); 27 | return base.OnExiting(e); 28 | } 29 | 30 | public override void OnResuming(ScreenTransitionEvent e) 31 | { 32 | base.OnResuming(e); 33 | this.FadeIn(250, Easing.OutQuint); 34 | } 35 | 36 | public override void OnSuspending(ScreenTransitionEvent e) 37 | { 38 | base.OnSuspending(e); 39 | this.FadeOut(250, Easing.OutQuint); 40 | } 41 | 42 | private void updateComponentFromBeatmap(WorkingBeatmap beatmap) 43 | { 44 | ApplyToBackground(b => 45 | { 46 | b.IgnoreUserSettings.Value = false; 47 | b.Beatmap = beatmap; 48 | }); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/LayoutController.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Bindables; 3 | using osu.Framework.Graphics; 4 | using osu.Framework.Graphics.Containers; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Configuration; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Layouts; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components 9 | { 10 | public partial class LayoutController : CompositeDrawable 11 | { 12 | private readonly Bindable layoutBinable = new Bindable(); 13 | 14 | [BackgroundDependencyLoader] 15 | private void load(SandboxRulesetConfigManager config) 16 | { 17 | RelativeSizeAxes = Axes.Both; 18 | config?.BindWith(SandboxRulesetSetting.VisualizerLayout, layoutBinable); 19 | } 20 | 21 | protected override void LoadComplete() 22 | { 23 | base.LoadComplete(); 24 | layoutBinable.BindValueChanged(_ => updateLayout(), true); 25 | } 26 | 27 | private void updateLayout() 28 | { 29 | DrawableVisualizerLayout l; 30 | 31 | switch(layoutBinable.Value) 32 | { 33 | default: 34 | case VisualizerLayout.TypeA: 35 | l = new TypeALayout(); 36 | break; 37 | 38 | case VisualizerLayout.TypeB: 39 | l = new TypeBLayout(); 40 | break; 41 | 42 | case VisualizerLayout.Empty: 43 | l = new EmptyLayout(); 44 | break; 45 | } 46 | 47 | loadLayout(l); 48 | } 49 | 50 | private void loadLayout(DrawableVisualizerLayout layout) 51 | { 52 | InternalChild = layout; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/Layouts/DrawableVisualizerLayout.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics; 2 | using osu.Framework.Graphics.Containers; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Layouts 5 | { 6 | public abstract partial class DrawableVisualizerLayout : CompositeDrawable 7 | { 8 | public DrawableVisualizerLayout() 9 | { 10 | RelativeSizeAxes = Axes.Both; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/Layouts/EmptyLayout.cs: -------------------------------------------------------------------------------- 1 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Layouts 2 | { 3 | public partial class EmptyLayout : DrawableVisualizerLayout 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/Layouts/TypeBLayout.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Layouts.TypeB; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Layouts 4 | { 5 | public partial class TypeBLayout : DrawableVisualizerLayout 6 | { 7 | public TypeBLayout() 8 | { 9 | AddInternal(new TypeBVisualizerController()); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/MusicHelpers/CurrentBeatmapProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Bindables; 3 | using osu.Framework.Graphics.Containers; 4 | using osu.Game.Beatmaps; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.MusicHelpers 7 | { 8 | public partial class CurrentBeatmapProvider : Container 9 | { 10 | protected IBindable Beatmap = new Bindable(); 11 | 12 | [BackgroundDependencyLoader] 13 | private void load(IBindable working) 14 | { 15 | Beatmap.BindTo(working); 16 | } 17 | 18 | protected override void LoadComplete() 19 | { 20 | base.LoadComplete(); 21 | Beatmap.BindValueChanged(OnBeatmapChanged, true); 22 | } 23 | 24 | protected virtual void OnBeatmapChanged(ValueChangedEvent beatmap) 25 | { 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/MusicHelpers/CurrentRateContainer.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Bindables; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Graphics.Containers; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.MusicHelpers 6 | { 7 | public partial class CurrentRateContainer : RateAdjustableContainer 8 | { 9 | protected readonly BindableBool IsKiai = new BindableBool(); 10 | 11 | protected override Container Content => content; 12 | 13 | private readonly MusicIntensityController intensityController; 14 | private readonly Container content; 15 | 16 | public CurrentRateContainer() 17 | { 18 | AddRangeInternal(new Drawable[] 19 | { 20 | content = new Container 21 | { 22 | Anchor = Anchor.Centre, 23 | Origin = Anchor.Centre, 24 | RelativeSizeAxes = Axes.Both, 25 | }, 26 | intensityController = new MusicIntensityController() 27 | }); 28 | 29 | IsKiai.BindTo(intensityController.IsKiai); 30 | } 31 | 32 | protected override void LoadComplete() 33 | { 34 | base.LoadComplete(); 35 | intensityController.Intensity.BindValueChanged(rate => Rate = rate.NewValue); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/MusicHelpers/MusicAmplitudesProvider.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Audio.Track; 4 | using osu.Framework.Bindables; 5 | using osu.Game.Beatmaps; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.MusicHelpers 8 | { 9 | public abstract partial class MusicAmplitudesProvider : CurrentBeatmapProvider 10 | { 11 | public readonly BindableBool IsKiai = new BindableBool(); 12 | 13 | private ITrack track; 14 | 15 | protected override void OnBeatmapChanged(ValueChangedEvent beatmap) 16 | { 17 | base.OnBeatmapChanged(beatmap); 18 | track = beatmap.NewValue?.Track; 19 | } 20 | 21 | protected override void Update() 22 | { 23 | base.Update(); 24 | 25 | OnAmplitudesUpdate(track?.CurrentAmplitudes.FrequencyAmplitudes.Span.ToArray() ?? new float[256]); 26 | IsKiai.Value = Beatmap.Value?.Beatmap.ControlPointInfo.EffectPointAt(track?.CurrentTime ?? 0).KiaiMode ?? false; 27 | } 28 | 29 | protected abstract void OnAmplitudesUpdate(float[] amplitudes); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/MusicHelpers/MusicIntensityController.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Bindables; 2 | using osu.Framework.Extensions.IEnumerableExtensions; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.MusicHelpers 5 | { 6 | public partial class MusicIntensityController : MusicAmplitudesProvider 7 | { 8 | public readonly BindableFloat Intensity = new BindableFloat(); 9 | 10 | protected override void OnAmplitudesUpdate(float[] amplitudes) 11 | { 12 | float sum = 0; 13 | amplitudes.ForEach(amp => sum += amp); 14 | 15 | if (IsKiai.Value) 16 | sum *= 1.2f; 17 | 18 | Intensity.Value = sum; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/MusicHelpers/RateAdjustableContainer.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics.Containers; 2 | using osu.Framework.Timing; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.MusicHelpers 5 | { 6 | public partial class RateAdjustableContainer : Container 7 | { 8 | public double Rate 9 | { 10 | get => clock.Rate; 11 | set => clock.Rate = value; 12 | } 13 | 14 | private readonly StopwatchClock clock; 15 | 16 | public RateAdjustableContainer() 17 | { 18 | ProcessCustomClock = true; 19 | Clock = new FramedClock(clock = new StopwatchClock()); 20 | clock.Start(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/Particles.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Bindables; 5 | using osu.Framework.Graphics; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Configuration; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.MusicHelpers; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components 10 | { 11 | public partial class Particles : CurrentRateContainer 12 | { 13 | private readonly Bindable colour = new Bindable("#ffffff"); 14 | private readonly Bindable direction = new Bindable(); 15 | 16 | private ParticlesDrawable particles; 17 | 18 | [Resolved(canBeNull: true)] 19 | private SandboxRulesetConfigManager config { get; set; } 20 | 21 | public Particles() 22 | { 23 | RelativeSizeAxes = Axes.Both; 24 | Add(particles = new ParticlesDrawable()); 25 | } 26 | 27 | [BackgroundDependencyLoader] 28 | private void load() 29 | { 30 | config?.BindWith(SandboxRulesetSetting.ParticlesColour, colour); 31 | config?.BindWith(SandboxRulesetSetting.ParticlesDirection, direction); 32 | } 33 | 34 | protected override void LoadComplete() 35 | { 36 | base.LoadComplete(); 37 | 38 | direction.BindValueChanged(_ => updateDirection()); 39 | IsKiai.BindValueChanged(_ => updateDirection(), true); 40 | 41 | colour.BindValueChanged(c => particles.Colour = Colour4.FromHex(c.NewValue), true); 42 | } 43 | 44 | private void updateDirection() 45 | { 46 | particles.Direction.Value = direction.Value; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/Settings/VisualizerSection.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Game.Overlays.Settings; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Configuration; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.UI.Settings; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Settings 8 | { 9 | public partial class VisualizerSection : SandboxSettingsSection 10 | { 11 | protected override string HeaderName => "Visualizer"; 12 | 13 | [BackgroundDependencyLoader] 14 | private void load(SandboxRulesetConfigManager config) 15 | { 16 | AddRange(new Drawable[] 17 | { 18 | new SettingsEnumDropdown 19 | { 20 | LabelText = "Layout type", 21 | Current = config.GetBindable(SandboxRulesetSetting.VisualizerLayout) 22 | }, 23 | new LayoutSettingsSubsection() 24 | }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/Screens/Visualizer/Components/Visualizers/CircularMusicVisualizerDrawable.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Bindables; 2 | using osuTK; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Screens.Visualizer.Components.Visualizers 5 | { 6 | public abstract partial class CircularMusicVisualizerDrawable : MusicVisualizerDrawable 7 | { 8 | public readonly Bindable DegreeValue = new Bindable(); 9 | 10 | protected override VisualizerDrawNode CreateVisualizerDrawNode() => CreateCircularVisualizerDrawNode(); 11 | 12 | protected abstract CircularVisualizerDrawNode CreateCircularVisualizerDrawNode(); 13 | 14 | protected abstract partial class CircularVisualizerDrawNode : VisualizerDrawNode 15 | { 16 | protected new CircularMusicVisualizerDrawable Source => (CircularMusicVisualizerDrawable)base.Source; 17 | 18 | protected float DegreeValue; 19 | 20 | public CircularVisualizerDrawNode(CircularMusicVisualizerDrawable source) 21 | : base(source) 22 | { 23 | } 24 | 25 | public override void ApplyState() 26 | { 27 | base.ApplyState(); 28 | DegreeValue = Source.DegreeValue.Value; 29 | } 30 | 31 | protected override float Spacing => DegreeValue / AudioData.Count; 32 | 33 | protected override Vector2 Inflation => DrawInfo.MatrixInverse.ExtractScale().Xy; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/UI/Settings/ColourPickerDropdown.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Bindables; 5 | using osu.Framework.Graphics; 6 | using osu.Game.Graphics.UserInterfaceV2; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.Configuration; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.UI.Settings 10 | { 11 | public partial class ColourPickerDropdown : SettingsDropdownContainer 12 | { 13 | private readonly Bindable hexColour = new Bindable(); 14 | 15 | private OsuColourPicker picker; 16 | private readonly SandboxRulesetSetting lookup; 17 | 18 | public ColourPickerDropdown(string name, SandboxRulesetSetting lookup) 19 | : base(name) 20 | { 21 | this.lookup = lookup; 22 | } 23 | 24 | protected override Drawable CreateContent() => picker = new OsuColourPicker(); 25 | 26 | [BackgroundDependencyLoader] 27 | private void load(SandboxRulesetConfigManager rulesetConfig) 28 | { 29 | rulesetConfig.BindWith(lookup, hexColour); 30 | } 31 | 32 | protected override void LoadComplete() 33 | { 34 | base.LoadComplete(); 35 | 36 | picker.Current.Value = Colour4.FromHex(hexColour.Value); 37 | picker.Current.BindValueChanged(c => 38 | { 39 | hexColour.Value = c.NewValue.ToHex(); 40 | }); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/RulesetComponents/UI/SupportButton.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Graphics; 5 | using osu.Framework.Graphics.Containers; 6 | using osu.Framework.Platform; 7 | using osu.Game.Overlays.Settings; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel.RulesetComponents.UI 10 | { 11 | public partial class SupportButton : CompositeDrawable 12 | { 13 | [Resolved] 14 | private GameHost host { get; set; } 15 | 16 | public SupportButton() 17 | { 18 | Width = 300; 19 | AutoSizeAxes = Axes.Y; 20 | InternalChildren = new Drawable[] 21 | { 22 | new SettingsButton 23 | { 24 | Text = "Support me on Patreon", 25 | Action = clickAction 26 | } 27 | }; 28 | } 29 | 30 | private void clickAction() 31 | { 32 | host.OpenUrlExternally($"https://www.patreon.com/evast"); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/SandboxPanelProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.SandboxToPanel 4 | { 5 | public class SandboxPanelProvider : LLinPluginProvider 6 | { 7 | public override LLinPlugin CreatePlugin => new SandboxPlugin(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Flappy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Flappy.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/bg.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/gameover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/gameover.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/ground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/ground.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/message.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/pipe.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/redbird-downflap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/redbird-downflap.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/redbird-midflap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/redbird-midflap.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/redbird-upflap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/FlappyDon/redbird-upflap.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Fractal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Fractal.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/MvisPluginSandbox/SandboxPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/MvisPluginSandbox/SandboxPanel.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Numbers.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Vis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Vis.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Visualizer/particle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/Visualizer/particle.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/ruleset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/Textures/ruleset.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/SandboxToPanel/lazer-sandbox-README.md: -------------------------------------------------------------------------------- 1 | # lazer-sandbox 2 | 3 | A custom game mode for osu!lazer project. 4 | 5 | Support: https://www.patreon.com/evast 6 | 7 | Follow me: 8 | 9 | https://discord.gg/HQgy3Ey 10 | 11 | https://twitter.com/ev4st 12 | 13 | https://youtube.com/c/evast_osu -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Storyboard/Config/SBLoaderConfigManager.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Platform; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Storyboard.Config 5 | { 6 | public class SbLoaderConfigManager : PluginConfigManager 7 | { 8 | public SbLoaderConfigManager(Storage storage) 9 | : base(storage) 10 | { 11 | } 12 | 13 | protected override void InitialiseDefaults() 14 | { 15 | SetDefault(SbLoaderSettings.EnableStoryboard, true); 16 | } 17 | 18 | protected override string ConfigName => "StoryboardSupport"; 19 | } 20 | 21 | public enum SbLoaderSettings 22 | { 23 | EnableStoryboard 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Storyboard/Storyboard/BackgroundStoryboard.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Graphics; 5 | using osu.Framework.Timing; 6 | using osu.Game.Beatmaps; 7 | using osu.Game.Skinning; 8 | using osu.Game.Storyboards.Drawables; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Storyboard.Storyboard 11 | { 12 | [LongRunningLoad] 13 | public partial class BackgroundStoryboard : BeatmapSkinProvidingContainer 14 | { 15 | public IFrameBasedClock RunningClock; 16 | private DrawableStoryboard drawableStoryboard; 17 | 18 | private readonly WorkingBeatmap working; 19 | //private readonly int id; 20 | 21 | public BackgroundStoryboard(WorkingBeatmap beatmap) 22 | : base(beatmap.Skin) 23 | { 24 | //id = beatmap.BeatmapInfo.ID; 25 | working = beatmap; 26 | } 27 | 28 | [BackgroundDependencyLoader] 29 | private void load() 30 | { 31 | //Logging.Log($"{id} - 创建{working}的故事版", LoggingTarget.Performance); 32 | 33 | drawableStoryboard = working.Storyboard.CreateDrawable(); 34 | drawableStoryboard.Clock = RunningClock; 35 | 36 | //Logging.Log($"{id} - 加载{working}", LoggingTarget.Performance); 37 | LoadComponent(drawableStoryboard); 38 | //Logging.Log($"{id} - 添加...", LoggingTarget.Performance); 39 | Add(drawableStoryboard); 40 | 41 | //Logging.Log($"{id} - 完成", LoggingTarget.Performance); 42 | } 43 | 44 | public Drawable StoryboardProxy() => drawableStoryboard.OverlayLayer.CreateProxy(); 45 | 46 | protected override void Dispose(bool isDisposing) 47 | { 48 | //Logging.Log($"{id} - 处理", LoggingTarget.Performance); 49 | drawableStoryboard?.Dispose(); 50 | base.Dispose(isDisposing); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Storyboard/StoryboardSupportProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Storyboard 4 | { 5 | public class StoryboardPluginProvider : LLinPluginProvider 6 | { 7 | public override LLinPlugin CreatePlugin => new BackgroundStoryBoardLoader(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Yasp/Config/ExamplePluginConfigManager.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using osu.Framework.Configuration; 3 | using osu.Framework.Platform; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Yasp.Config 7 | { 8 | public class YaspConfigManager : PluginConfigManager 9 | { 10 | public YaspConfigManager(Storage storage) 11 | : base(storage) 12 | { 13 | } 14 | 15 | /// 16 | /// 在这里初始化默认值, 更多用法请见 17 | /// 18 | protected override void InitialiseDefaults() 19 | { 20 | SetDefault(YaspSettings.Scale, 1, 0, 5f); 21 | SetDefault(YaspSettings.EnablePlugin, true); 22 | SetDefault(YaspSettings.PanelType, PanelType.Classic); 23 | SetDefault(YaspSettings.CoverIIUseUserAvatar, false); 24 | 25 | base.InitialiseDefaults(); 26 | } 27 | 28 | //配置文件名,已更改的值将在"plugin-{ConfigName}.ini"中保存 29 | protected override string ConfigName => "yap"; 30 | } 31 | 32 | public enum YaspSettings 33 | { 34 | Scale, 35 | EnablePlugin, 36 | 37 | PanelType, 38 | CoverIIUseUserAvatar 39 | } 40 | 41 | public enum PanelType 42 | { 43 | [Description("经典")] 44 | Classic, 45 | 46 | [Description("封面")] 47 | SongCover, 48 | 49 | CoverII 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Yasp/Panels/IPanel.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Beatmaps; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Yasp.Panels 4 | { 5 | public interface IPanel 6 | { 7 | public void Refresh(WorkingBeatmap beatmap); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Bundle/Yasp/YaspProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Bundle.Yasp 4 | { 5 | public class YaspProvider : LLinPluginProvider 6 | { 7 | //在这里制定该Provider要提供的插件 8 | public override LLinPlugin CreatePlugin => new YaspPlugin(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Config/DefaultPluginConfigManager.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Platform; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config 4 | { 5 | public class DefaultPluginConfigManager : PluginConfigManager 6 | { 7 | public DefaultPluginConfigManager(Storage storage) 8 | : base(storage) 9 | { 10 | } 11 | 12 | protected override string ConfigName => "unknown"; 13 | } 14 | 15 | public enum DefaultSettings 16 | { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Config/IPluginConfigManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config 4 | { 5 | public interface IPluginConfigManager : IDisposable 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Config/PluginConfigManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Configuration; 3 | using osu.Framework.Platform; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config 6 | { 7 | public abstract class PluginConfigManager : IniConfigManager, IPluginConfigManager 8 | where TLookup : struct, Enum 9 | { 10 | protected abstract string ConfigName { get; } 11 | protected override string Filename => $"custom/plugin-{ConfigName}.ini"; 12 | 13 | protected PluginConfigManager(Storage storage) 14 | : base(storage) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/DialogOption.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Graphics.Colour; 3 | using osu.Framework.Localisation; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins 6 | { 7 | public class DialogOption 8 | { 9 | /// 10 | /// 选项Action 11 | /// 12 | public Action? Action { get; set; } 13 | 14 | /// 15 | /// 选项文本 16 | /// 17 | public LocalisableString Text { get; set; } 18 | 19 | /// 20 | /// 选项颜色 21 | /// 可能是背景,也可能时前景,具体看LLin实现方 22 | /// 23 | public ColourInfo Color { get; set; } 24 | 25 | /// 26 | /// 选项类型 27 | /// 详见 28 | /// 29 | public OptionType Type = OptionType.Common; 30 | } 31 | 32 | public enum OptionType 33 | { 34 | Common, //普通 35 | Confirm, //确认 36 | Cancel //取消 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/DummyAudio/DummyAudioPluginProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Configuration; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.DummyAudio 5 | { 6 | internal class DummyAudioPluginProvider : LLinPluginProvider 7 | { 8 | private readonly MConfigManager config; 9 | private readonly LLinPluginManager plmgr; 10 | 11 | internal DummyAudioPluginProvider(MConfigManager config, LLinPluginManager plmgr) 12 | { 13 | this.config = config; 14 | this.plmgr = plmgr; 15 | } 16 | 17 | public override LLinPlugin CreatePlugin => new DummyAudioPlugin(config, plmgr); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/DummyBase/DummyBasePluginProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Configuration; 2 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.DummyBase 5 | { 6 | internal class DummyBasePluginProvider : LLinPluginProvider 7 | { 8 | private readonly MConfigManager config; 9 | private readonly LLinPluginManager plmgr; 10 | 11 | internal DummyBasePluginProvider(MConfigManager config, LLinPluginManager plmgr) 12 | { 13 | this.config = config; 14 | this.plmgr = plmgr; 15 | } 16 | 17 | public override LLinPlugin CreatePlugin => new DummyBasePlugin(config, plmgr); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/FallbackFunctionBar/SongProgressButton.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using osu.Framework.Allocation; 5 | using osu.Framework.Graphics.Audio; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.FallbackFunctionBar 10 | { 11 | public partial class SongProgressButton : ToggleableBarButton 12 | { 13 | public SongProgressButton(IToggleableFunctionProvider provider) 14 | : base(provider) 15 | { 16 | Width = 120; 17 | } 18 | 19 | private string timeCurrent; 20 | private string timeTotal; 21 | 22 | [Resolved] 23 | private IImplementLLin mvisScreen { get; set; } 24 | 25 | private DrawableTrack track => mvisScreen.CurrentTrack; 26 | 27 | private string formatTime(TimeSpan timeSpan) => $"{(timeSpan < TimeSpan.Zero ? "-" : "")}{Math.Floor(timeSpan.Duration().TotalMinutes)}:{timeSpan.Duration().Seconds:D2}"; 28 | 29 | protected override void Update() 30 | { 31 | base.Update(); 32 | 33 | int currentSecond = (int)Math.Floor(track.CurrentTime / 1000.0); 34 | timeCurrent = formatTime(TimeSpan.FromSeconds(currentSecond)); 35 | timeTotal = formatTime(TimeSpan.FromMilliseconds(track.Length)); 36 | Title = $"{timeCurrent} / {timeTotal}"; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/FallbackFunctionBar/ToggleableBarButton.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Bindables; 3 | using osu.Framework.Graphics; 4 | using osu.Framework.Graphics.Shapes; 5 | using osu.Framework.Input.Events; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 7 | using osuTK.Graphics; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.FallbackFunctionBar 10 | { 11 | public partial class ToggleableBarButton : SimpleBarButton 12 | { 13 | private Box indicator = null!; 14 | 15 | public BindableBool Value = new BindableBool(); 16 | 17 | public ToggleableBarButton(IToggleableFunctionProvider provider) 18 | : base(provider) 19 | { 20 | Value.BindTo(provider.Bindable); 21 | } 22 | 23 | [BackgroundDependencyLoader] 24 | private void load() 25 | { 26 | AddInternal(indicator = new Box 27 | { 28 | Height = 5, 29 | RelativeSizeAxes = Axes.X 30 | }); 31 | } 32 | 33 | protected override void LoadComplete() 34 | { 35 | Value.BindValueChanged(onValueChanged, true); 36 | Value.BindDisabledChanged(onDisableChanged, true); 37 | } 38 | 39 | private void onDisableChanged(bool value) 40 | { 41 | this.FadeColour(value ? Color4.Gray : Color4.White, 300, Easing.OutQuint); 42 | } 43 | 44 | private void onValueChanged(ValueChangedEvent v) 45 | { 46 | indicator.FadeColour(v.NewValue ? Color4.Green : Color4.Gold, 300, Easing.OutQuint); 47 | } 48 | 49 | protected override bool OnClick(ClickEvent e) 50 | { 51 | if (Value.Disabled) 52 | { 53 | this.FlashColour(Color4.Red, 1000, Easing.OutQuint); 54 | return false; 55 | } 56 | 57 | return base.OnClick(e); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/LuaSupport/LuaFunctions/BaseFunctions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Allocation; 3 | using osu.Framework.Graphics.Containers; 4 | using osu.Framework.Graphics.Sprites; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.LuaSupport.LuaFunctions 8 | { 9 | public partial class BaseFunctions : CompositeDrawable 10 | { 11 | [Resolved] 12 | private LuaPlugin plugin { get; set; } 13 | 14 | [Resolved] 15 | private IImplementLLin llin { get; set; } = null!; 16 | 17 | public BaseFunctions(LuaPlugin pluginInstance) 18 | { 19 | this.plugin = pluginInstance; 20 | } 21 | 22 | public void Print(object str) 23 | { 24 | plugin.Log($"{str}"); 25 | } 26 | 27 | public void PostNotification(string content) 28 | { 29 | llin.PostNotification(plugin, FontAwesome.Regular.QuestionCircle, content); 30 | } 31 | 32 | public void ClearConsole() 33 | { 34 | plugin.ClearConsole(); 35 | } 36 | 37 | public void GenDoc() 38 | { 39 | throw new NotImplementedException(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/LuaSupport/LuaFunctions/DrawableUtils.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.LuaSupport.LuaFunctions 4 | { 5 | public class DrawableUtils 6 | { 7 | public void MoveToX(Drawable drawable, float dest, float duration = 0, Easing easing = Easing.None) 8 | { 9 | drawable.MoveToX(dest, duration, easing); 10 | } 11 | 12 | public void MoveToY(Drawable drawable, float dest, float duration = 0, Easing easing = Easing.None) 13 | { 14 | drawable.MoveToY(dest, duration, easing); 15 | } 16 | 17 | public void FadeTo(Drawable drawable, float target, float duration = 0, Easing easing = Easing.None) 18 | { 19 | drawable.FadeTo(target, duration, easing); 20 | } 21 | 22 | public void ScaleTo(Drawable drawable, float target, float duration = 0, Easing easing = Easing.None) 23 | { 24 | drawable.ScaleTo(target, duration, easing); 25 | } 26 | 27 | public void FadeIn(Drawable drawable, float duration = 0, Easing easing = Easing.None) 28 | { 29 | drawable.FadeIn(duration, easing); 30 | } 31 | 32 | public void FadeOut(Drawable drawable, float duration = 0, Easing easing = Easing.None) 33 | { 34 | drawable.FadeOut(duration, easing); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/LuaSupport/LuaFunctions/SubContainerManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Graphics; 5 | using osu.Framework.Graphics.Containers; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.LuaSupport.LuaFunctions 8 | { 9 | public partial class SubContainerManager : Container 10 | { 11 | //region LuaAPI 12 | 13 | public SubContainer GetContainer(string name) 14 | { 15 | if (string.IsNullOrEmpty(name)) 16 | throw new InvalidOperationException("Container name cannot be null or empty"); 17 | 18 | var child = this.Children.FirstOrDefault(c => c != null && c.ContainerName == name, null); 19 | 20 | if (child != null && (child.LifetimeEnd == LatestTransformEndTime || child.LifetimeEnd == double.MinValue)) 21 | { 22 | child.Expire(); 23 | child = null; 24 | } 25 | 26 | if (child != null) return child; 27 | 28 | child = new SubContainer(this, name) 29 | { 30 | Name = name 31 | }; 32 | 33 | Add(child); 34 | return child; 35 | } 36 | 37 | //endregion 38 | 39 | private SubContainerManager instance; 40 | 41 | public SubContainerManager() 42 | { 43 | RelativeSizeAxes = Axes.Both; 44 | instance = this; 45 | } 46 | 47 | [BackgroundDependencyLoader] 48 | private void load() 49 | { 50 | } 51 | } 52 | 53 | public partial class SubContainer : Container 54 | { 55 | public string ContainerName { get; internal set; } 56 | 57 | public SubContainer(SubContainerManager manager, string name) 58 | { 59 | ContainerName = Name = name; 60 | } 61 | 62 | public Action? PostUpdate; 63 | 64 | protected override void Update() 65 | { 66 | base.Update(); 67 | 68 | PostUpdate?.Invoke(); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Internal/LuaSupport/LuaPluginProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Internal.LuaSupport 4 | { 5 | public class LuaPluginProvider : LLinPluginProvider 6 | { 7 | public override LLinPlugin CreatePlugin => new LuaPlugin(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/LLinPluginProvider.cs: -------------------------------------------------------------------------------- 1 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins 4 | { 5 | public abstract class LLinPluginProvider 6 | { 7 | /// 8 | /// 要提供的插件 9 | /// 10 | public abstract LLinPlugin CreatePlugin { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/PluginKeybind.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osuTK.Input; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins 5 | { 6 | public class PluginKeybind 7 | { 8 | /// 9 | /// 目标按键 10 | /// 11 | public readonly Key Key; 12 | 13 | /// 14 | /// 触发后要执行的动作 15 | /// 16 | public readonly Action Action; 17 | 18 | /// 19 | /// 名称 20 | /// 21 | public string Name; 22 | 23 | internal int Id; 24 | 25 | public PluginKeybind(Key key, Action action, string name = "???") 26 | { 27 | Key = key; 28 | Action = action; 29 | Name = name; 30 | } 31 | 32 | public override string ToString() => "按键 " + Key + $" 上的键位绑定(Id: {Id}, {Action})"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Types/BindableControlledPlugin.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using osu.Framework.Allocation; 4 | using osu.Framework.Bindables; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Types 8 | { 9 | public abstract partial class BindableControlledPlugin : LLinPlugin 10 | { 11 | [Resolved] 12 | private LLinPluginManager manager { get; set; } 13 | 14 | protected BindableBool Enabled = new BindableBool(); 15 | private bool playerExiting; 16 | 17 | [BackgroundDependencyLoader] 18 | private void load() 19 | { 20 | if (LLin != null) 21 | LLin.Exiting += () => playerExiting = true; 22 | } 23 | 24 | protected override void LoadComplete() 25 | { 26 | Enabled.BindValueChanged(OnValueChanged, true); 27 | base.LoadComplete(); 28 | } 29 | 30 | protected virtual void OnValueChanged(ValueChangedEvent v) 31 | { 32 | if (Enabled.Value && !playerExiting) 33 | manager.ActivePlugin(this); 34 | else 35 | manager.DisablePlugin(this); 36 | } 37 | 38 | public override bool Disable() 39 | { 40 | Enabled.Value = false; 41 | return base.Disable(); 42 | } 43 | 44 | public override bool Enable() 45 | { 46 | Enabled.Value = true; 47 | return base.Enable(); 48 | } 49 | 50 | public override void UnLoad() 51 | { 52 | Enabled.UnbindAll(); 53 | base.UnLoad(); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Types/FakeButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Graphics.Sprites; 3 | using osu.Framework.Localisation; 4 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 5 | using osuTK; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Types 8 | { 9 | public class ButtonWrapper : IFunctionProvider 10 | { 11 | public Vector2 Size { get; set; } = new Vector2(30); 12 | public Func? Action { get; set; } 13 | public IconUsage Icon { get; set; } 14 | public LocalisableString Title { get; set; } 15 | public LocalisableString Description { get; set; } 16 | public FunctionType Type { get; set; } 17 | 18 | public virtual bool Active() 19 | { 20 | bool success = Action?.Invoke() ?? false; 21 | 22 | OnActive?.Invoke(success); 23 | 24 | return success; 25 | } 26 | 27 | public Action? OnActive { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Plugins/Types/ToggleableButtonWrapper.cs: -------------------------------------------------------------------------------- 1 | #nullable disable 2 | 3 | using System; 4 | using osu.Framework.Bindables; 5 | using osu.Framework.Graphics.Sprites; 6 | using osu.Framework.Localisation; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 8 | using osuTK; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Types 11 | { 12 | public class ToggleableButtonWrapper : IToggleableFunctionProvider 13 | { 14 | public Vector2 Size { get; set; } = new(30); 15 | public Func Action { get; set; } 16 | public IconUsage Icon { get; set; } 17 | public LocalisableString Title { get; set; } 18 | public LocalisableString Description { get; set; } 19 | public FunctionType Type { get; set; } 20 | 21 | public bool Active() 22 | { 23 | if (Bindable.Disabled) return false; 24 | 25 | Bindable.Toggle(); 26 | 27 | bool success = Action?.Invoke() ?? false; 28 | OnActive?.Invoke(success); 29 | 30 | return success; 31 | } 32 | 33 | public Action OnActive { get; set; } 34 | 35 | public BindableBool Bindable { get; set; } = new BindableBool(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Features/Player/Screens/LLin/InPlayerUserActivity.cs: -------------------------------------------------------------------------------- 1 | using MessagePack; 2 | using osu.Game.Beatmaps; 3 | using osu.Game.Users; 4 | 5 | namespace osu.Game.Rulesets.Hikariii.Features.Player.Screens.LLin; 6 | 7 | [MessagePackObject(false)] 8 | public class InPlayerUserActivity : UserActivity.InGame 9 | { 10 | public InPlayerUserActivity() 11 | { 12 | } 13 | 14 | public override string GetStatus(bool hideIdentifiableInformation = false) 15 | { 16 | return "正在听歌"; 17 | } 18 | 19 | public InPlayerUserActivity(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset) 20 | : base(beatmapInfo, ruleset) 21 | { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/IconButton.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Graphics.Containers; 4 | using osu.Framework.Graphics.Sprites; 5 | using osu.Framework.Localisation; 6 | using osu.Game.Graphics.Sprites; 7 | using osu.Game.Graphics.UserInterface; 8 | using osuTK; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Graphics; 11 | 12 | public partial class IconButton : OsuAnimatedButton 13 | { 14 | public IconUsage Icon { get; set; } = FontAwesome.Solid.QuestionCircle; 15 | public LocalisableString Text { get; set; } = string.Empty; 16 | 17 | [BackgroundDependencyLoader] 18 | private void load() 19 | { 20 | Child = new FillFlowContainer 21 | { 22 | AutoSizeAxes = Axes.Both, 23 | 24 | Anchor = Anchor.CentreLeft, 25 | Origin = Anchor.CentreLeft, 26 | 27 | Direction = FillDirection.Horizontal, 28 | Spacing = new Vector2(7.5f), 29 | Children = 30 | [ 31 | new SpriteIcon 32 | { 33 | Icon = Icon, 34 | Size = new Vector2(18), 35 | Anchor = Anchor.CentreLeft, 36 | Origin = Anchor.CentreLeft, 37 | }, 38 | new OsuSpriteText 39 | { 40 | Text = Text, 41 | Anchor = Anchor.CentreLeft, 42 | Origin = Anchor.CentreLeft, 43 | } 44 | ] 45 | }; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/RandomBeatmapBackground.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using osu.Framework.Allocation; 3 | using osu.Framework.Graphics; 4 | using osu.Framework.Graphics.Containers; 5 | using osu.Game.Online.API; 6 | using osu.Game.Online.API.Requests.Responses; 7 | using osu.Game.Users.Drawables; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Graphics; 10 | 11 | public partial class AvatarPicture : CompositeDrawable 12 | { 13 | public static readonly List DEFAULT_VALID_USERS = 14 | [ 15 | 1 16 | ]; 17 | 18 | private readonly int userId; 19 | 20 | public AvatarPicture(int userId) 21 | { 22 | this.userId = userId; 23 | } 24 | 25 | [BackgroundDependencyLoader] 26 | private void load(APIAccess api) 27 | { 28 | this.AddInternal(new UpdateableAvatar(isInteractive: false, user: new APIUser { Id = userId }) 29 | { 30 | RelativeSizeAxes = Axes.Both 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/Settings/DangerousZone.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Graphics; 2 | using osu.Framework.Graphics.Sprites; 3 | using osu.Framework.Localisation; 4 | using osu.Game.Overlays.Settings; 5 | 6 | namespace osu.Game.Rulesets.Hikariii.Graphics.Settings 7 | { 8 | public partial class DangerousZone : SettingsSection 9 | { 10 | public override LocalisableString Header => "危险地带"; 11 | 12 | public override Drawable CreateIcon() => new SpriteIcon 13 | { 14 | Icon = FontAwesome.Solid.ExclamationTriangle 15 | }; 16 | 17 | public DangerousZone() 18 | { 19 | Add(new ExperimentalSettings()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/Settings/HikariiiSettingsSubPanel.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using osu.Framework.Allocation; 3 | using osu.Framework.Graphics; 4 | using osu.Game.Overlays; 5 | using osu.Game.Overlays.Settings; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins; 8 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.Graphics.Settings; 11 | 12 | public partial class HikariiiSettingsSubPanel : SettingsSubPanel 13 | { 14 | protected override Drawable CreateHeader() 15 | { 16 | return new SettingsHeader("Hikariii", "播放器和插件设置"); 17 | } 18 | 19 | [BackgroundDependencyLoader] 20 | private void load(LLinPluginManager manager) 21 | { 22 | foreach (LLinPlugin pl in manager.GetAllPlugins(false).Where(pl => manager.GetSettingsFor(pl)?.Length > 0)) 23 | AddSection(new PluginSettingsSubsection(pl)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/Settings/LinuxSection.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Localisation; 3 | using osu.Framework.Platform; 4 | using osu.Game.Configuration; 5 | using osu.Game.Overlays.Settings; 6 | using osu.Game.Rulesets.Hikariii.Features.Configuration; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.Graphics.Settings 9 | { 10 | public partial class LinuxSection : SettingsSubsection 11 | { 12 | protected override LocalisableString Header { get; } = "Linux"; 13 | 14 | [BackgroundDependencyLoader] 15 | private void load(MConfigManager config, OsuConfigManager osuConfig, GameHost host) 16 | { 17 | Add(new LinuxSettings()); 18 | Add(new DBusSettings()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/Settings/LinuxSettings.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Allocation; 2 | using osu.Framework.Graphics; 3 | using osu.Framework.Localisation; 4 | using osu.Game.Overlays.Settings; 5 | using osu.Game.Rulesets.Hikariii.Features.Configuration; 6 | 7 | namespace osu.Game.Rulesets.Hikariii.Graphics.Settings 8 | { 9 | public partial class LinuxSettings : SettingsSubsection 10 | { 11 | protected override LocalisableString Header => "Linux集成"; 12 | 13 | [BackgroundDependencyLoader] 14 | private void load(MConfigManager config) 15 | { 16 | SettingsCheckbox trayCheckbox; 17 | 18 | Children = new Drawable[] 19 | { 20 | new SettingsEnumDropdown 21 | { 22 | LabelText = "Gamemode启用条件", 23 | TooltipText = "需要安装库:libgamemode0", 24 | Current = config.GetBindable(MSetting.Gamemode) 25 | }, 26 | trayCheckbox = new SettingsCheckbox 27 | { 28 | LabelText = "启用DBus系统托盘", 29 | Current = config.GetBindable(MSetting.EnableTray) 30 | }, 31 | new SettingsCheckbox 32 | { 33 | LabelText = "允许通过DBus发送系统通知", 34 | Current = config.GetBindable(MSetting.EnableSystemNotifications) 35 | }, 36 | new SettingsTextBox 37 | { 38 | LabelText = "托盘图标名称", 39 | Current = config.GetBindable(MSetting.TrayIconName) 40 | }, 41 | }; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Graphics/Settings/MfMvisPluginSection.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using osu.Framework.Allocation; 3 | using osu.Framework.Localisation; 4 | using osu.Game.Overlays.Settings; 5 | using osu.Game.Rulesets.Hikariii.Features.Player.Interfaces.Plugins; 6 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins; 7 | using osu.Game.Rulesets.Hikariii.Features.Player.Plugins.Config; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.Graphics.Settings 10 | { 11 | public partial class MfMvisPluginSection : SettingsSubsection 12 | { 13 | [BackgroundDependencyLoader] 14 | private void load(LLinPluginManager manager) 15 | { 16 | foreach (LLinPlugin pl in manager.GetAllPlugins(false).Where(pl => manager.GetSettingsFor(pl)?.Length > 0)) 17 | Add(new PluginSettingsSubsection(pl)); 18 | } 19 | 20 | protected override LocalisableString Header => "Hikariii播放器 - 设置和插件"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/HikariiiAction.cs: -------------------------------------------------------------------------------- 1 | namespace osu.Game.Rulesets.Hikariii; 2 | 3 | public enum HikariiiAction 4 | { 5 | MusicPrev, 6 | MusicNext, 7 | OpenInSongSelect, 8 | ToggleOverlayLock, 9 | TogglePluginPage, 10 | TogglePause, 11 | TrackLoop, 12 | TogglePlayList, 13 | LockOverlays, 14 | 15 | //"Back" Action always handled by GlobalActionContainer 16 | //Back 17 | } 18 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Localisation/LLin/LLinBaseStrings.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Localisation; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Localisation.LLin 4 | { 5 | public static class LLinBaseStrings 6 | { 7 | private const string prefix = @"M.Resources.Localisation.LLin.BaseStrings"; 8 | 9 | public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"Exit"); 10 | 11 | public static LocalisableString Manual => new TranslatableString(getKey(@"manual"), @"User manual"); 12 | 13 | public static LocalisableString PrevOrRestart => new TranslatableString(getKey(@"prev_restart"), @"Previous / Restart"); 14 | 15 | public static LocalisableString Next => new TranslatableString(getKey(@"next"), @"Next"); 16 | 17 | public static LocalisableString TogglePause => new TranslatableString(getKey(@"toggle_pause"), @"Toggle pause"); 18 | 19 | public static LocalisableString ViewPlugins => new TranslatableString(getKey(@"view_plugins"), @"View plugins"); 20 | 21 | public static LocalisableString HideAndLockInterface => new TranslatableString(getKey(@"hide_and_lock_interface"), @"Hide and lock interface"); 22 | 23 | public static LocalisableString LockInterface => new TranslatableString(getKey(@"lock_interface"), @"Lock interface"); 24 | 25 | public static LocalisableString ToggleLoop => new TranslatableString(getKey(@"toggle_loop"), @"Toggle loop"); 26 | 27 | public static LocalisableString ViewInSongSelect => new TranslatableString(getKey(@"view_in_song_select"), @"View in song select"); 28 | 29 | public static LocalisableString OpenSidebar => new TranslatableString(getKey(@"open_sidebar"), @"Open sidebar"); 30 | 31 | public static LocalisableString AudioControlRequestedMain => new TranslatableString(getKey(@"audio_control_requested_main"), @" requested audio control"); 32 | 33 | public static LocalisableString AudioControlRequestedSub(LocalisableString reason) => new TranslatableString(getKey(@"audio_control_requested_sub"), @"Reason: {0}", reason); 34 | 35 | private static string getKey(string key) => $@"{prefix}:{key}"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Localisation/LLin/LLinGenericStrings.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Localisation; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Localisation.LLin 4 | { 5 | public static class LLinGenericStrings 6 | { 7 | private const string prefix = @"M.Resources.Localisation.LLin.GenericStrings"; 8 | 9 | public static LocalisableString EnablePlugin => new TranslatableString(getKey(@"enable_plugin"), @"Enable Plugin"); 10 | 11 | public static LocalisableString DisablePlugin => new TranslatableString(getKey(@"disable_plugin"), @"Disable Plugin"); 12 | 13 | private static string getKey(string key) => $@"{prefix}:{key}"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Localisation/LLin/Plugins/CollectionStrings.cs: -------------------------------------------------------------------------------- 1 | using Humanizer; 2 | using osu.Framework.Localisation; 3 | 4 | namespace osu.Game.Rulesets.Hikariii.Localisation.LLin.Plugins 5 | { 6 | public static class CollectionStrings 7 | { 8 | private const string prefix = "M.Resources.Localisation.LLin.Plugins.CollectionStrings"; 9 | 10 | public static LocalisableString NoCollectionSelected => new TranslatableString(getKey(@"no_collection_selected"), @"No Collection Selected"); 11 | 12 | public static LocalisableString SelectOneFirst => new TranslatableString(getKey(@"select_one_first"), @"Select One First!"); 13 | 14 | public static LocalisableString AudioControlRequest => new TranslatableString(getKey(@"audio_control_request"), "Activate to ensure the plugin can function properly\nThis prompt won't show again in this session"); 15 | 16 | public static LocalisableString EntryTooltip => new TranslatableString(getKey(@"entry_tooltip"), "Browse Collections"); 17 | 18 | public static LocalisableString SongCount(int count) => new TranslatableString(getKey(@"song_count"), @"Song".ToQuantity(count), count); 19 | 20 | private static string getKey(string key) => $@"{prefix}:{key}"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Localisation/LLin/Plugins/YaspStrings.cs: -------------------------------------------------------------------------------- 1 | using osu.Framework.Localisation; 2 | 3 | namespace osu.Game.Rulesets.Hikariii.Localisation.LLin.Plugins 4 | { 5 | public static class YaspStrings 6 | { 7 | private const string prefix = @"M.Resources.Localisation.LLin.Plugins.YaspStrings"; 8 | 9 | public static LocalisableString Scale => new TranslatableString(getKey(@"scale"), @"Classic Scaling"); 10 | 11 | public static LocalisableString UseAvatarForCoverIICover => new TranslatableString(getKey(@"use_avatar_for_coverii"), @"(CoverII) Use Avatar"); 12 | 13 | public static LocalisableString PanelType => new TranslatableString(getKey(@"panel_type"), @"Panel Type"); 14 | 15 | private static string getKey(string key) => $@"{prefix}:{key}"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Logging.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using osu.Framework.Logging; 3 | 4 | namespace osu.Game.Rulesets.Hikariii; 5 | 6 | public class Logging 7 | { 8 | public static readonly string LOG_PREFIX = "Hikariii"; 9 | 10 | public static void Log(string? message, LoggingTarget loggingTarget = LoggingTarget.Runtime, LogLevel level = LogLevel.Verbose) 11 | { 12 | Logger.Log($"[{LOG_PREFIX}] {message}", level: level, target: loggingTarget); 13 | } 14 | 15 | public static void LogError(Exception e, string? message = null) 16 | { 17 | while (true) 18 | { 19 | Logger.Log($"[{LOG_PREFIX}] {(string.IsNullOrEmpty(message) ? "" : $"{message}: ")}{e.Message}", level: LogLevel.Important); 20 | Logger.Log(e.StackTrace); 21 | 22 | if (e.InnerException != null) 23 | { 24 | e = e.InnerException; 25 | message = null; 26 | continue; 27 | } 28 | 29 | break; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/Flappy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/Flappy.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/bg.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/gameover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/gameover.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/ground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/ground.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/message.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/pipe.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/redbird-downflap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/redbird-downflap.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/redbird-midflap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/redbird-midflap.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/FlappyDon/redbird-upflap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/FlappyDon/redbird-upflap.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/Fractal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/Fractal.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/MvisPluginSandbox/SandboxPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/MvisPluginSandbox/SandboxPanel.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/Numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/Numbers.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/Vis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/Vis.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/Visualizer/particle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/Visualizer/particle.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/Textures/ruleset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATRIX-feather/LLin/aa8d57c19aa60448184fc8408cd5b34364825c42/osu.Game.Rulesets.Hikariii/Textures/ruleset.png -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/osu.Game.Rulesets.Hikariii.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net8.0 4 | osu.Game.Rulesets.IGPlayer 5 | Library 6 | AnyCPU 7 | enable 8 | 0.0.0.0 9 | 0.0.0.0 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ..\..\osu-framework\osu.Framework\bin\Debug\net6.0\osu.Framework.dll 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Beatmaps/IGPlayerBeatmapConverter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System.Collections.Generic; 5 | using System.Threading; 6 | using osu.Game.Beatmaps; 7 | using osu.Game.Rulesets.Hikariii.ppyStuffs.Objects; 8 | using osu.Game.Rulesets.Objects; 9 | using osu.Game.Rulesets.Objects.Types; 10 | using osuTK; 11 | 12 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Beatmaps 13 | { 14 | public class IGPlayerBeatmapConverter : BeatmapConverter 15 | { 16 | public IGPlayerBeatmapConverter(IBeatmap beatmap, Rulesets.Ruleset ruleset) 17 | : base(beatmap, ruleset) 18 | { 19 | } 20 | 21 | // todo: Check for conversion types that should be supported (ie. Beatmap.HitObjects.Any(h => h is IHasXPosition)) 22 | // https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types 23 | public override bool CanConvert() => true; 24 | 25 | protected override IEnumerable ConvertHitObject(HitObject original, IBeatmap beatmap, CancellationToken cancellationToken) 26 | { 27 | yield return new HikariiiPlayerHitObject 28 | { 29 | Samples = original.Samples, 30 | StartTime = original.StartTime, 31 | Position = (original as IHasPosition)?.Position ?? Vector2.Zero, 32 | }; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/IGPlayerDifficultyCalculator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using osu.Game.Beatmaps; 8 | using osu.Game.Rulesets.Difficulty; 9 | using osu.Game.Rulesets.Difficulty.Preprocessing; 10 | using osu.Game.Rulesets.Difficulty.Skills; 11 | using osu.Game.Rulesets.Mods; 12 | 13 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs 14 | { 15 | public class IGPlayerDifficultyCalculator : DifficultyCalculator 16 | { 17 | public IGPlayerDifficultyCalculator(IRulesetInfo ruleset, IWorkingBeatmap beatmap) 18 | : base(ruleset, beatmap) 19 | { 20 | } 21 | 22 | protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beatmap, Mod[] mods, Skill[] skills, double clockRate) 23 | { 24 | return new DifficultyAttributes(mods, 0); 25 | } 26 | 27 | protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty(); 28 | 29 | protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/IGPlayerInputManager.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System.ComponentModel; 5 | using osu.Framework.Input.Bindings; 6 | using osu.Game.Rulesets.UI; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs 9 | { 10 | public partial class HikariiiPlayerInputManager : RulesetInputManager 11 | { 12 | public HikariiiPlayerInputManager(RulesetInfo ruleset) 13 | : base(ruleset, 0, SimultaneousBindingMode.Unique) 14 | { 15 | } 16 | } 17 | 18 | public enum HikariiiPlayerAction 19 | { 20 | [Description("Button 1")] 21 | Button1, 22 | 23 | [Description("Button 2")] 24 | Button2, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2024 ppy Pty Ltd . 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Mods/IGPlayerModAutoplay.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System.Collections.Generic; 5 | using osu.Game.Beatmaps; 6 | using osu.Game.Rulesets.Hikariii.ppyStuffs.Replays; 7 | using osu.Game.Rulesets.Mods; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Mods 10 | { 11 | public class IGPlayerModAutoplay : ModAutoplay 12 | { 13 | public override ModReplayData CreateReplayData(IBeatmap beatmap, IReadOnlyList mods) 14 | => new ModReplayData(new IGPlayerAutoGenerator(beatmap).Generate(), new ModCreatedUser { Username = "sample" }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Objects/Drawables/DrawableIGPlayerHitObject.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using osu.Framework.Graphics; 5 | using osu.Game.Rulesets.Objects.Drawables; 6 | using osu.Game.Rulesets.Scoring; 7 | using osuTK; 8 | using osuTK.Graphics; 9 | 10 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Objects.Drawables 11 | { 12 | public partial class DrawableIGPlayerHitObject : DrawableHitObject 13 | { 14 | public DrawableIGPlayerHitObject(HikariiiPlayerHitObject hitObject) 15 | : base(hitObject) 16 | { 17 | Size = new Vector2(40); 18 | Origin = Anchor.Centre; 19 | 20 | Position = hitObject.Position; 21 | 22 | // todo: add visuals. 23 | } 24 | 25 | protected override void CheckForResult(bool userTriggered, double timeOffset) 26 | { 27 | if (timeOffset >= 0) 28 | // todo: implement judgement logic 29 | ApplyResult((r, hit) => r.Type = HitResult.Perfect); 30 | } 31 | 32 | protected override void UpdateHitStateTransforms(ArmedState state) 33 | { 34 | const double duration = 1000; 35 | 36 | switch (state) 37 | { 38 | case ArmedState.Hit: 39 | this.FadeOut(duration, Easing.OutQuint).Expire(); 40 | break; 41 | 42 | case ArmedState.Miss: 43 | this.FadeColour(Color4.Red, duration); 44 | this.FadeOut(duration, Easing.InQuint).Expire(); 45 | break; 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Objects/HikariiiPlayerHitObject.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using osu.Game.Rulesets.Judgements; 5 | using osu.Game.Rulesets.Objects; 6 | using osu.Game.Rulesets.Objects.Types; 7 | using osuTK; 8 | 9 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Objects 10 | { 11 | public class HikariiiPlayerHitObject : HitObject, IHasPosition 12 | { 13 | public override Judgement CreateJudgement() => new Judgement(); 14 | 15 | public float X { get; set; } 16 | public float Y { get; set; } 17 | public Vector2 Position { get; set; } = Vector2.Zero; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/README.md: -------------------------------------------------------------------------------- 1 | The LICENCE here is copied from `ppy/osu`. 2 | 3 | Some of the files here are copied from the osu's codebase, and others are generated via `dotnet new ruleset -n ...` but still have osu's licence head, I don't know how to deal with so it's here. -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Replays/IGPlayerAutoGenerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using osu.Game.Beatmaps; 5 | using osu.Game.Rulesets.Hikariii.ppyStuffs.Objects; 6 | using osu.Game.Rulesets.Replays; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Replays 9 | { 10 | public class IGPlayerAutoGenerator : AutoGenerator 11 | { 12 | public new Beatmap Beatmap => (Beatmap)base.Beatmap; 13 | 14 | public IGPlayerAutoGenerator(IBeatmap beatmap) 15 | : base(beatmap) 16 | { 17 | } 18 | 19 | protected override void GenerateFrames() 20 | { 21 | Frames.Add(new IGPlayerReplayFrame()); 22 | 23 | foreach (HikariiiPlayerHitObject hitObject in Beatmap.HitObjects) 24 | { 25 | Frames.Add(new IGPlayerReplayFrame 26 | { 27 | Time = hitObject.StartTime, 28 | Position = hitObject.Position, 29 | // todo: add required inputs and extra frames. 30 | }); 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Replays/IGPlayerFramedReplayInputHandler.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using osu.Framework.Input.StateChanges; 7 | using osu.Framework.Utils; 8 | using osu.Game.Replays; 9 | using osu.Game.Rulesets.Replays; 10 | 11 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Replays 12 | { 13 | public class IGPlayerFramedReplayInputHandler : FramedReplayInputHandler 14 | { 15 | public IGPlayerFramedReplayInputHandler(Replay replay) 16 | : base(replay) 17 | { 18 | } 19 | 20 | protected override bool IsImportant(IGPlayerReplayFrame frame) => frame.Actions.Any(); 21 | 22 | protected override void CollectReplayInputs(List inputs) 23 | { 24 | var position = Interpolation.ValueAt(CurrentTime, StartFrame.Position, EndFrame.Position, StartFrame.Time, EndFrame.Time); 25 | 26 | inputs.Add(new MousePositionAbsoluteInput 27 | { 28 | Position = GamefieldToScreenSpace(position), 29 | }); 30 | inputs.Add(new ReplayState 31 | { 32 | PressedActions = CurrentFrame?.Actions ?? new List(), 33 | }); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/Replays/IGPlayerReplayFrame.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System.Collections.Generic; 5 | using osu.Game.Rulesets.Replays; 6 | using osuTK; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.Replays 9 | { 10 | public class IGPlayerReplayFrame : ReplayFrame 11 | { 12 | public List Actions = new List(); 13 | public Vector2 Position; 14 | 15 | public IGPlayerReplayFrame(HikariiiPlayerAction? button = null) 16 | { 17 | if (button.HasValue) 18 | Actions.Add(button.Value); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/UI/DrawableIGPlayerRuleset.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using System.Collections.Generic; 5 | using osu.Framework.Allocation; 6 | using osu.Framework.Input; 7 | using osu.Game.Beatmaps; 8 | using osu.Game.Input.Handlers; 9 | using osu.Game.Replays; 10 | using osu.Game.Rulesets.Hikariii.ppyStuffs.Objects; 11 | using osu.Game.Rulesets.Hikariii.ppyStuffs.Objects.Drawables; 12 | using osu.Game.Rulesets.Hikariii.ppyStuffs.Replays; 13 | using osu.Game.Rulesets.Mods; 14 | using osu.Game.Rulesets.Objects.Drawables; 15 | using osu.Game.Rulesets.UI; 16 | 17 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.UI 18 | { 19 | [Cached] 20 | public partial class DrawableIGPlayerRuleset : DrawableRuleset 21 | { 22 | public DrawableIGPlayerRuleset(HikariiiPlayerRuleset ruleset, IBeatmap beatmap, IReadOnlyList mods = null) 23 | : base(ruleset, beatmap, mods) 24 | { 25 | } 26 | 27 | protected override Playfield CreatePlayfield() => new IGPlayerPlayfield(); 28 | 29 | protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new IGPlayerFramedReplayInputHandler(replay); 30 | 31 | public override DrawableHitObject CreateDrawableRepresentation(HikariiiPlayerHitObject h) => new DrawableIGPlayerHitObject(h); 32 | 33 | protected override PassThroughInputManager CreateInputManager() => new HikariiiPlayerInputManager(Ruleset?.RulesetInfo); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /osu.Game.Rulesets.Hikariii/ppyStuffs/UI/IGPlayerPlayfield.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. 2 | // See the LICENCE file in the repository root for full licence text. 3 | 4 | using osu.Framework.Allocation; 5 | using osu.Framework.Graphics; 6 | using osu.Game.Rulesets.UI; 7 | 8 | namespace osu.Game.Rulesets.Hikariii.ppyStuffs.UI 9 | { 10 | [Cached] 11 | public partial class IGPlayerPlayfield : Playfield 12 | { 13 | [BackgroundDependencyLoader] 14 | private void load() 15 | { 16 | AddRangeInternal(new Drawable[] 17 | { 18 | HitObjectContainer, 19 | }); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | readonly DIR="${1:-???}" 4 | readonly RUNTIME="${2:-net8.0}" 5 | 6 | 7 | function die() 8 | { 9 | local message="${1:-???}" 10 | echo "Exiting: ${message}" 11 | 12 | exit 1 13 | } 14 | 15 | BUILD_RESULT_DIR="???" 16 | 17 | readonly OUTPUT_DIR="${PWD}/assemble-temp" 18 | 19 | readonly TARGET_DIR="${PWD}/target" 20 | 21 | function createDirOrDie() 22 | { 23 | local path="${1}" 24 | 25 | mkdir -vp "${path}" || die "Unable to create directory '${path}'" 26 | } 27 | 28 | function init() 29 | { 30 | if [ ! -d "${PWD}/${DIR}" ];then 31 | die "'${PWD}/${DIR}' is not a valid directory" 32 | fi 33 | 34 | rm -r "${OUTPUT_DIR}" 35 | rm -r "${TARGET_DIR}" 36 | 37 | createDirOrDie "${OUTPUT_DIR}" 38 | createDirOrDie "${OUTPUT_DIR}/zh" 39 | 40 | createDirOrDie "${TARGET_DIR}" 41 | 42 | export BUILD_RESULT_DIR="${PWD}/${DIR}/bin/Release/${RUNTIME}" 43 | readonly BUILD_RESULT_DIR 44 | 45 | echo "Final directory is '${BUILD_RESULT_DIR}'" 46 | } 47 | 48 | function copy() 49 | { 50 | local fileName="${1:-???}" 51 | 52 | if [ "${fileName}" == "???" ];then 53 | die "Invalid usage! No file input." 54 | fi 55 | 56 | cp "${BUILD_RESULT_DIR}/${fileName}" "${OUTPUT_DIR}/${fileName}" 57 | echo "Done! '${BUILD_RESULT_DIR}/${fileName}' --> '${OUTPUT_DIR}/${fileName}'" 58 | } 59 | 60 | function main() 61 | { 62 | copy "M.DBus.dll" 63 | copy "M.Resources.dll" 64 | copy "Tmds.DBus.dll" 65 | copy "osu.Game.Rulesets.Hikariii.dll" 66 | copy "zh/M.Resources.resources.dll" 67 | 68 | cp "${PWD}/README.md" "${OUTPUT_DIR}" || echo "Unable to copy README.md, ignoring..." 69 | 70 | local lastPWD="${PWD}" 71 | 72 | cd "${OUTPUT_DIR}" || die "Why?!" 73 | 74 | tar -cf "${TARGET_DIR}/Hikariii.${RUNTIME}.zip" ./* 75 | } 76 | 77 | init; 78 | main; -------------------------------------------------------------------------------- /upstream_assets/LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2024 ppy Pty Ltd . 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /upstream_assets/README.md: -------------------------------------------------------------------------------- 1 | 来自上游的一些文件 -------------------------------------------------------------------------------- /upstream_assets/osu.Android.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 21.0 4 | android-x86;android-arm;android-arm64 5 | apk 6 | CJK;Mideast;Rare;West;Other; 7 | Xamarin.Android.Net.AndroidMessageHandler 8 | 9 | true 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 18 | true 19 | 20 | 21 | --------------------------------------------------------------------------------