Update with framework bindable changes

This commit is contained in:
smoogipoo
2019-02-21 18:56:34 +09:00
parent d637b184e4
commit bca347427f
195 changed files with 567 additions and 555 deletions

View File

@ -85,7 +85,7 @@ namespace osu.Game.Overlays.Toolbar
{
StateChanged += visibility =>
{
if (overlayActivationMode == OverlayActivation.Disabled)
if (overlayActivationMode.Value == OverlayActivation.Disabled)
State = Visibility.Hidden;
};

View File

@ -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);
}
};

View File

@ -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;

View File

@ -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;
}
}