-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toggle for star fountains in gameplay
Addresses ppy#29792.
- Loading branch information
Showing
4 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
#nullable disable | ||
using System; | ||
using osu.Framework.Allocation; | ||
using osu.Framework.Audio.Track; | ||
using osu.Framework.Bindables; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Utils; | ||
using osu.Game.Beatmaps.ControlPoints; | ||
using osu.Game.Configuration; | ||
using osu.Game.Graphics.Containers; | ||
using osu.Game.Screens.Menu; | ||
|
||
|
@@ -18,8 +19,10 @@ public partial class KiaiGameplayFountains : BeatSyncedContainer | |
private StarFountain leftFountain = null!; | ||
private StarFountain rightFountain = null!; | ||
|
||
private Bindable<bool> configEnabled = null!; | ||
|
||
[BackgroundDependencyLoader] | ||
private void load() | ||
private void load(OsuConfigManager config) | ||
{ | ||
RelativeSizeAxes = Axes.Both; | ||
|
||
|
@@ -38,6 +41,13 @@ private void load() | |
X = -75, | ||
}, | ||
}; | ||
|
||
configEnabled = config.GetBindable<bool>(OsuSetting.StarFountains); | ||
configEnabled.BindValueChanged(enabled => | ||
{ | ||
leftFountain.FadeTo(enabled.NewValue ? 1 : 0, 100); | ||
rightFountain.FadeTo(enabled.NewValue ? 1 : 0, 100); | ||
}, true); | ||
} | ||
|
||
private bool isTriggered; | ||
|