mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge pull request #8108 from EVAST9919/friends-update-streams
Implement FriendsOnlineStatusControl component
This commit is contained in:
@ -17,8 +17,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
|
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(UpdateStreamBadgeArea),
|
typeof(ChangelogUpdateStreamControl),
|
||||||
typeof(UpdateStreamBadge),
|
typeof(ChangelogUpdateStreamItem),
|
||||||
typeof(ChangelogHeader),
|
typeof(ChangelogHeader),
|
||||||
typeof(ChangelogContent),
|
typeof(ChangelogContent),
|
||||||
typeof(ChangelogListing),
|
typeof(ChangelogListing),
|
||||||
|
@ -0,0 +1,63 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Overlays.Home.Friends;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
|
{
|
||||||
|
public class TestSceneFriendsOnlineStatusControl : OsuTestScene
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(FriendsOnlineStatusControl),
|
||||||
|
typeof(FriendsOnlineStatusItem),
|
||||||
|
typeof(OverlayStreamControl<>),
|
||||||
|
typeof(OverlayStreamItem<>),
|
||||||
|
typeof(FriendsBundle)
|
||||||
|
};
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||||
|
|
||||||
|
private FriendsOnlineStatusControl control;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void SetUp() => Schedule(() => Child = control = new FriendsOnlineStatusControl
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
});
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Populate()
|
||||||
|
{
|
||||||
|
AddStep("Populate", () => control.Populate(new List<User>
|
||||||
|
{
|
||||||
|
new User
|
||||||
|
{
|
||||||
|
IsOnline = true
|
||||||
|
},
|
||||||
|
new User
|
||||||
|
{
|
||||||
|
IsOnline = false
|
||||||
|
},
|
||||||
|
new User
|
||||||
|
{
|
||||||
|
IsOnline = false
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
AddAssert("3 users", () => control.Items.FirstOrDefault(item => item.Status == FriendsOnlineStatus.All)?.Count == 3);
|
||||||
|
AddAssert("1 online user", () => control.Items.FirstOrDefault(item => item.Status == FriendsOnlineStatus.Online)?.Count == 1);
|
||||||
|
AddAssert("2 offline users", () => control.Items.FirstOrDefault(item => item.Status == FriendsOnlineStatus.Offline)?.Count == 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
|
|
||||||
public Action ListingSelected;
|
public Action ListingSelected;
|
||||||
|
|
||||||
public UpdateStreamBadgeArea Streams;
|
public ChangelogUpdateStreamControl Streams;
|
||||||
|
|
||||||
private const string listing_string = "listing";
|
private const string listing_string = "listing";
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
Horizontal = 65,
|
Horizontal = 65,
|
||||||
Vertical = 20
|
Vertical = 20
|
||||||
},
|
},
|
||||||
Child = Streams = new UpdateStreamBadgeArea()
|
Child = Streams = new ChangelogUpdateStreamControl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
12
osu.Game/Overlays/Changelog/ChangelogUpdateStreamControl.cs
Normal file
12
osu.Game/Overlays/Changelog/ChangelogUpdateStreamControl.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Changelog
|
||||||
|
{
|
||||||
|
public class ChangelogUpdateStreamControl : OverlayStreamControl<APIUpdateStream>
|
||||||
|
{
|
||||||
|
protected override OverlayStreamItem<APIUpdateStream> CreateStreamItem(APIUpdateStream value) => new ChangelogUpdateStreamItem(value);
|
||||||
|
}
|
||||||
|
}
|
28
osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs
Normal file
28
osu.Game/Overlays/Changelog/ChangelogUpdateStreamItem.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using Humanizer;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Changelog
|
||||||
|
{
|
||||||
|
public class ChangelogUpdateStreamItem : OverlayStreamItem<APIUpdateStream>
|
||||||
|
{
|
||||||
|
public ChangelogUpdateStreamItem(APIUpdateStream stream)
|
||||||
|
: base(stream)
|
||||||
|
{
|
||||||
|
if (stream.IsFeatured)
|
||||||
|
Width *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string MainText => Value.DisplayName;
|
||||||
|
|
||||||
|
protected override string AdditionalText => Value.LatestBuild.DisplayVersion;
|
||||||
|
|
||||||
|
protected override string InfoText => Value.LatestBuild.Users > 0 ? $"{"user".ToQuantity(Value.LatestBuild.Users, "N0")} online" : null;
|
||||||
|
|
||||||
|
protected override Color4 GetBarColour(OsuColour colours) => Value.Colour;
|
||||||
|
}
|
||||||
|
}
|
25
osu.Game/Overlays/Home/Friends/FriendsBundle.cs
Normal file
25
osu.Game/Overlays/Home/Friends/FriendsBundle.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Home.Friends
|
||||||
|
{
|
||||||
|
public class FriendsBundle
|
||||||
|
{
|
||||||
|
public FriendsOnlineStatus Status { get; }
|
||||||
|
|
||||||
|
public int Count { get; }
|
||||||
|
|
||||||
|
public FriendsBundle(FriendsOnlineStatus status, int count)
|
||||||
|
{
|
||||||
|
Status = status;
|
||||||
|
Count = count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum FriendsOnlineStatus
|
||||||
|
{
|
||||||
|
All,
|
||||||
|
Online,
|
||||||
|
Offline
|
||||||
|
}
|
||||||
|
}
|
26
osu.Game/Overlays/Home/Friends/FriendsOnlineStatusControl.cs
Normal file
26
osu.Game/Overlays/Home/Friends/FriendsOnlineStatusControl.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Home.Friends
|
||||||
|
{
|
||||||
|
public class FriendsOnlineStatusControl : OverlayStreamControl<FriendsBundle>
|
||||||
|
{
|
||||||
|
protected override OverlayStreamItem<FriendsBundle> CreateStreamItem(FriendsBundle value) => new FriendsOnlineStatusItem(value);
|
||||||
|
|
||||||
|
public void Populate(List<User> users)
|
||||||
|
{
|
||||||
|
var userCount = users.Count;
|
||||||
|
var onlineUsersCount = users.Count(user => user.IsOnline);
|
||||||
|
|
||||||
|
AddItem(new FriendsBundle(FriendsOnlineStatus.All, userCount));
|
||||||
|
AddItem(new FriendsBundle(FriendsOnlineStatus.Online, onlineUsersCount));
|
||||||
|
AddItem(new FriendsBundle(FriendsOnlineStatus.Offline, userCount - onlineUsersCount));
|
||||||
|
|
||||||
|
Current.Value = Items.FirstOrDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
39
osu.Game/Overlays/Home/Friends/FriendsOnlineStatusItem.cs
Normal file
39
osu.Game/Overlays/Home/Friends/FriendsOnlineStatusItem.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Home.Friends
|
||||||
|
{
|
||||||
|
public class FriendsOnlineStatusItem : OverlayStreamItem<FriendsBundle>
|
||||||
|
{
|
||||||
|
public FriendsOnlineStatusItem(FriendsBundle value)
|
||||||
|
: base(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string MainText => Value.Status.ToString();
|
||||||
|
|
||||||
|
protected override string AdditionalText => Value.Count.ToString();
|
||||||
|
|
||||||
|
protected override Color4 GetBarColour(OsuColour colours)
|
||||||
|
{
|
||||||
|
switch (Value.Status)
|
||||||
|
{
|
||||||
|
case FriendsOnlineStatus.All:
|
||||||
|
return Color4.White;
|
||||||
|
|
||||||
|
case FriendsOnlineStatus.Online:
|
||||||
|
return colours.GreenLight;
|
||||||
|
|
||||||
|
case FriendsOnlineStatus.Offline:
|
||||||
|
return Color4.Black;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new ArgumentException($@"{Value.Status} status does not provide a colour in {nameof(GetBarColour)}.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,42 +3,32 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Changelog
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class UpdateStreamBadgeArea : TabControl<APIUpdateStream>
|
public abstract class OverlayStreamControl<T> : TabControl<T>
|
||||||
{
|
{
|
||||||
public UpdateStreamBadgeArea()
|
protected OverlayStreamControl()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Populate(List<APIUpdateStream> streams)
|
public void Populate(List<T> streams) => streams.ForEach(AddItem);
|
||||||
|
|
||||||
|
protected override Dropdown<T> CreateDropdown() => null;
|
||||||
|
|
||||||
|
protected override TabItem<T> CreateTabItem(T value) => CreateStreamItem(value).With(item =>
|
||||||
{
|
{
|
||||||
foreach (var updateStream in streams)
|
item.SelectedItem.BindTo(Current);
|
||||||
AddItem(updateStream);
|
});
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
[NotNull]
|
||||||
{
|
protected abstract OverlayStreamItem<T> CreateStreamItem(T value);
|
||||||
foreach (var streamBadge in TabContainer.Children.OfType<UpdateStreamBadge>())
|
|
||||||
streamBadge.UserHoveringArea = true;
|
|
||||||
|
|
||||||
return base.OnHover(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
|
||||||
{
|
|
||||||
foreach (var streamBadge in TabContainer.Children.OfType<UpdateStreamBadge>())
|
|
||||||
streamBadge.UserHoveringArea = false;
|
|
||||||
|
|
||||||
base.OnHoverLost(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer
|
protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer
|
||||||
{
|
{
|
||||||
@ -47,9 +37,20 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
AllowMultiline = true,
|
AllowMultiline = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override Dropdown<APIUpdateStream> CreateDropdown() => null;
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
{
|
||||||
|
foreach (var streamBadge in TabContainer.Children.OfType<OverlayStreamItem<T>>())
|
||||||
|
streamBadge.UserHoveringArea = true;
|
||||||
|
|
||||||
protected override TabItem<APIUpdateStream> CreateTabItem(APIUpdateStream value) =>
|
return base.OnHover(e);
|
||||||
new UpdateStreamBadge(value) { SelectedTab = { BindTarget = Current } };
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
|
{
|
||||||
|
foreach (var streamBadge in TabContainer.Children.OfType<OverlayStreamItem<T>>())
|
||||||
|
streamBadge.UserHoveringArea = false;
|
||||||
|
|
||||||
|
base.OnHoverLost(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,46 +1,52 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// 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 Humanizer;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Changelog
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class UpdateStreamBadge : TabItem<APIUpdateStream>
|
public abstract class OverlayStreamItem<T> : TabItem<T>
|
||||||
{
|
{
|
||||||
private const float badge_width = 100;
|
public readonly Bindable<T> SelectedItem = new Bindable<T>();
|
||||||
private const float transition_duration = 100;
|
|
||||||
|
|
||||||
public readonly Bindable<APIUpdateStream> SelectedTab = new Bindable<APIUpdateStream>();
|
private bool userHoveringArea;
|
||||||
|
|
||||||
private readonly APIUpdateStream stream;
|
public bool UserHoveringArea
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == userHoveringArea)
|
||||||
|
return;
|
||||||
|
|
||||||
|
userHoveringArea = value;
|
||||||
|
updateState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private FillFlowContainer<SpriteText> text;
|
private FillFlowContainer<SpriteText> text;
|
||||||
private ExpandingBar expandingBar;
|
private ExpandingBar expandingBar;
|
||||||
|
|
||||||
public UpdateStreamBadge(APIUpdateStream stream)
|
protected OverlayStreamItem(T value)
|
||||||
: base(stream)
|
: base(value)
|
||||||
{
|
{
|
||||||
this.stream = stream;
|
Height = 60;
|
||||||
|
Width = 100;
|
||||||
|
Padding = new MarginPadding(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider, OsuColour colours)
|
||||||
{
|
{
|
||||||
Size = new Vector2(stream.IsFeatured ? badge_width * 2 : badge_width, 60);
|
|
||||||
Padding = new MarginPadding(5);
|
|
||||||
|
|
||||||
AddRange(new Drawable[]
|
AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
text = new FillFlowContainer<SpriteText>
|
text = new FillFlowContainer<SpriteText>
|
||||||
@ -52,17 +58,17 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = stream.DisplayName,
|
Text = MainText,
|
||||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Black),
|
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Black),
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = stream.LatestBuild.DisplayVersion,
|
Text = AdditionalText,
|
||||||
Font = OsuFont.GetFont(size: 16, weight: FontWeight.Regular),
|
Font = OsuFont.GetFont(size: 16, weight: FontWeight.Regular),
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = stream.LatestBuild.Users > 0 ? $"{"user".ToQuantity(stream.LatestBuild.Users, "N0")} online" : null,
|
Text = InfoText,
|
||||||
Font = OsuFont.GetFont(size: 10),
|
Font = OsuFont.GetFont(size: 10),
|
||||||
Colour = colourProvider.Foreground1
|
Colour = colourProvider.Foreground1
|
||||||
},
|
},
|
||||||
@ -71,7 +77,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
expandingBar = new ExpandingBar
|
expandingBar = new ExpandingBar
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Colour = stream.Colour,
|
Colour = GetBarColour(colours),
|
||||||
ExpandedSize = 4,
|
ExpandedSize = 4,
|
||||||
CollapsedSize = 2,
|
CollapsedSize = 2,
|
||||||
Expanded = true
|
Expanded = true
|
||||||
@ -79,9 +85,17 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
new HoverClickSounds()
|
new HoverClickSounds()
|
||||||
});
|
});
|
||||||
|
|
||||||
SelectedTab.BindValueChanged(_ => updateState(), true);
|
SelectedItem.BindValueChanged(_ => updateState(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract string MainText { get; }
|
||||||
|
|
||||||
|
protected abstract string AdditionalText { get; }
|
||||||
|
|
||||||
|
protected virtual string InfoText => string.Empty;
|
||||||
|
|
||||||
|
protected abstract Color4 GetBarColour(OsuColour colours);
|
||||||
|
|
||||||
protected override void OnActivated() => updateState();
|
protected override void OnActivated() => updateState();
|
||||||
|
|
||||||
protected override void OnDeactivated() => updateState();
|
protected override void OnDeactivated() => updateState();
|
||||||
@ -104,7 +118,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
bool textHighlighted = IsHovered;
|
bool textHighlighted = IsHovered;
|
||||||
bool barExpanded = IsHovered;
|
bool barExpanded = IsHovered;
|
||||||
|
|
||||||
if (SelectedTab.Value == null)
|
if (SelectedItem.Value == null)
|
||||||
{
|
{
|
||||||
// at listing, all badges are highlighted when user is not hovering any badge.
|
// at listing, all badges are highlighted when user is not hovering any badge.
|
||||||
textHighlighted |= !userHoveringArea;
|
textHighlighted |= !userHoveringArea;
|
||||||
@ -120,21 +134,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
}
|
}
|
||||||
|
|
||||||
expandingBar.Expanded = barExpanded;
|
expandingBar.Expanded = barExpanded;
|
||||||
text.FadeTo(textHighlighted ? 1 : 0.5f, transition_duration, Easing.OutQuint);
|
text.FadeTo(textHighlighted ? 1 : 0.5f, 100, Easing.OutQuint);
|
||||||
}
|
|
||||||
|
|
||||||
private bool userHoveringArea;
|
|
||||||
|
|
||||||
public bool UserHoveringArea
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == userHoveringArea)
|
|
||||||
return;
|
|
||||||
|
|
||||||
userHoveringArea = value;
|
|
||||||
updateState();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user