Files
wwdpublic/Content.Client/_White/UserInterface/Buttons/ViewPremiumInfoButton.cs
RedFoxIV 50b19259b8 Re: ghost (#849)
* it just works

* why hasn't it catastrophically failed yet

* not just gotta do the ui

oh god the ui

* that was easier than expected

* a devious misdirection

* touchups

* svin

* loc+fix

* touchups

* shitfix

* touchups x3

* for further use

* i hate this piece of shit engine

* touchups x4

* ribbit

also i'm retarded x2

* big tard energy

* bb

* rabbitson

* ?

* forgor

* k

* whoops

* fug
2025-09-27 08:38:24 +03:00

42 lines
1.2 KiB
C#

using Content.Client._White.UserInterface.Windows;
using Robust.Client.Animations;
using Robust.Client.UserInterface.Controls;
namespace Content.Client._White.UserInterface.Buttons;
public sealed class ViewPremiumInfoButton : Button
{
private WindowTracker<PremiumPassWindow> _premWindow = new();
public ViewPremiumInfoButton() : base()
{
OnPressed += Pressed;
var anim = new Animation()
{
Length = TimeSpan.FromSeconds(1.5f),
AnimationTracks =
{
new AnimationTrackControlProperty()
{
Property = nameof(Modulate),
InterpolationMode = Robust.Shared.Animations.AnimationInterpolationMode.Linear,
KeyFrames =
{
new AnimationTrackProperty.KeyFrame(Color.Yellow, 0f),
new AnimationTrackProperty.KeyFrame(Color.White, 1f)
}
}
}
};
PlayAnimation(anim, "hurr durr");
AnimationCompleted += _ => PlayAnimation(anim, "hurr durr");
}
private void Pressed(ButtonEventArgs args)
{
_premWindow.TryOpenCentered();
}
}