Ejemplo n.º 1
0
        private void displayStatus(UserStatus status, UserActivity activity = null)
        {
            if (status != null)
            {
                LastVisitMessage.FadeTo(status is UserStatusOffline && User.LastVisit.HasValue ? 1 : 0);

                // Set status message based on activity (if we have one) and status is not offline
                if (activity != null && !(status is UserStatusOffline))
                {
                    statusMessage.Text = activity.Status;
                    statusIcon.FadeColour(activity.GetAppropriateColour(colours), 500, Easing.OutQuint);
                    return;
                }

                // Otherwise use only status
                statusMessage.Text = status.Message;
                statusIcon.FadeColour(status.GetAppropriateColour(colours), 500, Easing.OutQuint);

                return;
            }

            // Fallback to web status if local one is null
            if (User.IsOnline)
            {
                Status.Value = new UserStatusOnline();
                return;
            }

            Status.Value = new UserStatusOffline();
        }
Ejemplo n.º 2
0
 protected override bool OnHover(HoverEvent e)
 {
     base.OnHover(e);
     hoverBackground.FadeIn(200, Easing.OutQuint);
     chevron.FadeColour(ColourProvider.Light1, 200, Easing.OutQuint);
     return(true);
 }
Ejemplo n.º 3
0
 protected override bool OnHover(HoverEvent e)
 {
     icon.FadeColour(Color4.Red, 200, Easing.OutQuint);
     return(base.OnHover(e));
 }
Ejemplo n.º 4
0
 protected override void UpdateHoverState()
 {
     base.UpdateHoverState();
     icon.FadeColour(!IsHeld && IsHovered ? Color4.White : Color4.Black, TRANSFORM_DURATION, Easing.OutQuint);
 }
Ejemplo n.º 5
0
 protected override bool OnHover(HoverEvent e)
 {
     icon.FadeColour(hoverColour, 120, Easing.InOutQuint);
     return(base.OnHover(e));
 }
Ejemplo n.º 6
0
 protected override bool OnHover(InputState state)
 {
     icon.FadeColour(Color4.Red, 200, Easing.OutQuint);
     return(base.OnHover(state));
 }
Ejemplo n.º 7
0
 protected override bool OnHover(InputState state)
 {
     icon.FadeColour(hoverColour, 120, Easing.InOutQuint);
     return(base.OnHover(state));
 }
Ejemplo n.º 8
0
 protected override bool OnHover(InputState state)
 {
     hover.FadeIn(500, Easing.OutQuint);
     icon.FadeColour(IconHoverColour, 500, Easing.OutQuint);
     return(base.OnHover(state));
 }
Ejemplo n.º 9
0
 private void updateState()
 {
     background.FadeTo(IsHovered || Active.Value ? 1 : 0, fade_time, Easing.OutQuint);
     icon.FadeColour(Active.Value && !IsHovered ? colourProvider.Light1 : colourProvider.Content1, fade_time, Easing.OutQuint);
 }
Ejemplo n.º 10
0
 protected override bool OnHover(HoverEvent e)
 {
     spriteIcon.FadeColour(colourProvider.Content2, 200, Easing.OutQuint);
     return(base.OnHover(e));
 }
Ejemplo n.º 11
0
 protected override bool OnHover(HoverEvent e)
 {
     linkIcon.FadeColour(hoverColour, 500, Easing.OutQuint);
     return(base.OnHover(e));
 }
Ejemplo n.º 12
0
 private void updateState()
 {
     modIcon?.FadeColour(Active.Value ? activeForegroundColour : inactiveForegroundColour, 200, Easing.OutQuint);
     background.FadeColour(Active.Value ? activeBackgroundColour : inactiveBackgroundColour, 200, Easing.OutQuint);
 }