Make icon private but expose a protected method

This commit is contained in:
Andrei Zavatski
2020-07-12 12:32:26 +03:00
parent da40f29b44
commit c3524cbe57
2 changed files with 8 additions and 13 deletions

View File

@ -3,9 +3,7 @@
using Humanizer;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osuTK;
namespace osu.Game.Overlays.Comments.Buttons
{
@ -21,12 +19,7 @@ namespace osu.Game.Overlays.Comments.Buttons
protected override void LoadComplete()
{
base.LoadComplete();
Expanded.BindValueChanged(onExpandedChanged, true);
}
private void onExpandedChanged(ValueChangedEvent<bool> expanded)
{
Icon.ScaleTo(new Vector2(1, expanded.NewValue ? -1 : 1));
Expanded.BindValueChanged(expanded => ToggleIcon(expanded.NewValue), true);
}
protected override bool OnClick(ClickEvent e)