protected override void UpdateState() { Action = incompatible.Value ? () => { } : (Action)Active.Toggle; if (incompatible.Value) { Colour4 backgroundColour = ColourProvider.Background5; Colour4 textBackgroundColour = ColourProvider.Background4; Content.TransformTo(nameof(BorderColour), ColourInfo.GradientVertical(backgroundColour, textBackgroundColour), TRANSITION_DURATION, Easing.OutQuint); Background.FadeColour(backgroundColour, TRANSITION_DURATION, Easing.OutQuint); SwitchContainer.ResizeWidthTo(IDLE_SWITCH_WIDTH, TRANSITION_DURATION, Easing.OutQuint); SwitchContainer.FadeColour(Colour4.Gray, TRANSITION_DURATION, Easing.OutQuint); MainContentContainer.TransformTo(nameof(Padding), new MarginPadding { Left = IDLE_SWITCH_WIDTH, Right = CORNER_RADIUS }, TRANSITION_DURATION, Easing.OutQuint); TextBackground.FadeColour(textBackgroundColour, TRANSITION_DURATION, Easing.OutQuint); TextFlow.FadeColour(Colour4.White.Opacity(0.5f), TRANSITION_DURATION, Easing.OutQuint); return; } SwitchContainer.FadeColour(Colour4.White, TRANSITION_DURATION, Easing.OutQuint); base.UpdateState(); }
protected override void UpdateState() { base.UpdateState(); SwitchContainer.FadeColour(incompatible.Value ? Colour4.Gray : Colour4.White, TRANSITION_DURATION, Easing.OutQuint); }