1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-01 06:19:54 +08:00

Bring back reading from config value

This commit is contained in:
Bartłomiej Dach
2025-04-21 09:15:44 +02:00
Unverified
parent 4d08c81e8d
commit da1fc1013e
2 changed files with 11 additions and 1 deletions
@@ -31,14 +31,15 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
private readonly Bindable<bool> expandedFromTextBoxFocus = new Bindable<bool>();
private const float height = 100;
private const float width = 260;
public override bool PropagateNonPositionalInputSubTree => true;
public GameplayChatDisplay(Room room)
: base(room, leaveChannelOnDispose: false)
{
RelativeSizeAxes = Axes.X;
Background.Alpha = 0.2f;
Width = width;
}
[BackgroundDependencyLoader]
@@ -10,6 +10,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Select.Leaderboards;
using osuTK;
@@ -34,6 +35,7 @@ namespace osu.Game.Screens.Play.HUD
private IGameplayLeaderboardProvider? leaderboardProvider { get; set; }
private readonly IBindableList<GameplayLeaderboardScore> scores = new BindableList<GameplayLeaderboardScore>();
private readonly Bindable<bool> configVisibility = new Bindable<bool>();
private const int max_panels = 8;
@@ -64,6 +66,12 @@ namespace osu.Game.Screens.Play.HUD
};
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
config.BindWith(OsuSetting.GameplayLeaderboard, configVisibility);
}
protected override void LoadComplete()
{
base.LoadComplete();
@@ -80,6 +88,7 @@ namespace osu.Game.Screens.Play.HUD
}
Scheduler.AddDelayed(sort, 1000, true);
configVisibility.BindValueChanged(_ => this.FadeTo(configVisibility.Value ? 1 : 0, 100, Easing.OutQuint), true);
}
/// <summary>