1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 17:13:06 +08:00

Health bar -> Health display

Also inverts logic
This commit is contained in:
Dean Herbert 2019-07-07 05:30:30 +09:00
parent 3f332cca2f
commit 84919d70bb
3 changed files with 7 additions and 8 deletions

View File

@ -77,7 +77,7 @@ namespace osu.Game.Configuration
Set(OsuSetting.BlurLevel, 0, 0, 1, 0.01); Set(OsuSetting.BlurLevel, 0, 0, 1, 0.01);
Set(OsuSetting.ShowInterface, true); Set(OsuSetting.ShowInterface, true);
Set(OsuSetting.HideHealthBarWhenCantFail, true); Set(OsuSetting.ShowHealthDisplayWhenCantFail, true);
Set(OsuSetting.KeyOverlay, false); Set(OsuSetting.KeyOverlay, false);
Set(OsuSetting.FloatingComments, false); Set(OsuSetting.FloatingComments, false);
@ -132,7 +132,7 @@ namespace osu.Game.Configuration
KeyOverlay, KeyOverlay,
FloatingComments, FloatingComments,
ShowInterface, ShowInterface,
HideHealthBarWhenCantFail, ShowHealthDisplayWhenCantFail,
MouseDisableButtons, MouseDisableButtons,
MouseDisableWheel, MouseDisableWheel,
AudioOffset, AudioOffset,

View File

@ -36,8 +36,8 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
}, },
new SettingsCheckbox new SettingsCheckbox
{ {
LabelText = "Hide health bar if you can't fail", LabelText = "Show health display even when can't fail",
Bindable = config.GetBindable<bool>(OsuSetting.HideHealthBarWhenCantFail), Bindable = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail),
}, },
new SettingsCheckbox new SettingsCheckbox
{ {

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
@ -10,7 +9,7 @@ namespace osu.Game.Rulesets.Mods
{ {
public abstract class ModBlockFail : Mod, IApplicableFailOverride, IApplicableToHUD, IReadFromConfig public abstract class ModBlockFail : Mod, IApplicableFailOverride, IApplicableToHUD, IReadFromConfig
{ {
private Bindable<bool> hideHealthBar; private Bindable<bool> showHealthBar;
/// <summary> /// <summary>
/// We never fail, 'yo. /// We never fail, 'yo.
@ -19,12 +18,12 @@ namespace osu.Game.Rulesets.Mods
public void ReadFromConfig(OsuConfigManager config) public void ReadFromConfig(OsuConfigManager config)
{ {
hideHealthBar = config.GetBindable<bool>(OsuSetting.HideHealthBarWhenCantFail); showHealthBar = config.GetBindable<bool>(OsuSetting.ShowHealthDisplayWhenCantFail);
} }
public void ApplyToHUD(HUDOverlay overlay) public void ApplyToHUD(HUDOverlay overlay)
{ {
hideHealthBar.BindValueChanged(v => overlay.HealthDisplay.FadeTo(v.NewValue ? 0 : 1, 250, Easing.OutQuint), true); overlay.ShowHealthbar.BindTo(showHealthBar);
} }
} }
} }