mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +08:00
Health bar -> Health display
Also inverts logic
This commit is contained in:
parent
3f332cca2f
commit
84919d70bb
@ -77,7 +77,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.BlurLevel, 0, 0, 1, 0.01);
|
||||
|
||||
Set(OsuSetting.ShowInterface, true);
|
||||
Set(OsuSetting.HideHealthBarWhenCantFail, true);
|
||||
Set(OsuSetting.ShowHealthDisplayWhenCantFail, true);
|
||||
Set(OsuSetting.KeyOverlay, false);
|
||||
|
||||
Set(OsuSetting.FloatingComments, false);
|
||||
@ -132,7 +132,7 @@ namespace osu.Game.Configuration
|
||||
KeyOverlay,
|
||||
FloatingComments,
|
||||
ShowInterface,
|
||||
HideHealthBarWhenCantFail,
|
||||
ShowHealthDisplayWhenCantFail,
|
||||
MouseDisableButtons,
|
||||
MouseDisableWheel,
|
||||
AudioOffset,
|
||||
|
@ -36,8 +36,8 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Hide health bar if you can't fail",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.HideHealthBarWhenCantFail),
|
||||
LabelText = "Show health display even when can't fail",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail),
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
@ -10,7 +9,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
public abstract class ModBlockFail : Mod, IApplicableFailOverride, IApplicableToHUD, IReadFromConfig
|
||||
{
|
||||
private Bindable<bool> hideHealthBar;
|
||||
private Bindable<bool> showHealthBar;
|
||||
|
||||
/// <summary>
|
||||
/// We never fail, 'yo.
|
||||
@ -19,12 +18,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public void ReadFromConfig(OsuConfigManager config)
|
||||
{
|
||||
hideHealthBar = config.GetBindable<bool>(OsuSetting.HideHealthBarWhenCantFail);
|
||||
showHealthBar = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail);
|
||||
}
|
||||
|
||||
public void ApplyToHUD(HUDOverlay overlay)
|
||||
{
|
||||
hideHealthBar.BindValueChanged(v => overlay.HealthDisplay.FadeTo(v.NewValue ? 0 : 1, 250, Easing.OutQuint), true);
|
||||
overlay.ShowHealthbar.BindTo(showHealthBar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user