mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Update with framework bindable changes
This commit is contained in:
@ -85,7 +85,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
StateChanged += visibility =>
|
||||
{
|
||||
if (overlayActivationMode == OverlayActivation.Disabled)
|
||||
if (overlayActivationMode.Value == OverlayActivation.Disabled)
|
||||
State = Visibility.Hidden;
|
||||
};
|
||||
|
||||
|
@ -45,13 +45,13 @@ namespace osu.Game.Overlays.Toolbar
|
||||
if (notificationOverlay != null)
|
||||
NotificationCount.BindTo(notificationOverlay.UnreadCount);
|
||||
|
||||
NotificationCount.ValueChanged += count =>
|
||||
NotificationCount.ValueChanged += e =>
|
||||
{
|
||||
if (count == 0)
|
||||
if (e.NewValue == 0)
|
||||
countDisplay.FadeOut(200, Easing.OutQuint);
|
||||
else
|
||||
{
|
||||
countDisplay.Count = count;
|
||||
countDisplay.Count = e.NewValue;
|
||||
countDisplay.FadeIn(200, Easing.OutQuint);
|
||||
}
|
||||
};
|
||||
|
@ -115,11 +115,11 @@ namespace osu.Game.Overlays.Toolbar
|
||||
Size = new Vector2(modeButtons.DrawSize.X, 1);
|
||||
}
|
||||
|
||||
private void rulesetChanged(RulesetInfo ruleset)
|
||||
private void rulesetChanged(ValueChangedEvent<RulesetInfo> e)
|
||||
{
|
||||
foreach (ToolbarRulesetButton m in modeButtons.Children.Cast<ToolbarRulesetButton>())
|
||||
{
|
||||
bool isActive = m.Ruleset.ID == ruleset.ID;
|
||||
bool isActive = m.Ruleset.ID == e.NewValue.ID;
|
||||
m.Active = isActive;
|
||||
if (isActive)
|
||||
activeButton = m;
|
||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
break;
|
||||
case APIState.Online:
|
||||
Text = api.LocalUser.Value.Username;
|
||||
avatar.User = api.LocalUser;
|
||||
avatar.User = api.LocalUser.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user