mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* 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
42 lines
1.2 KiB
C#
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();
|
|
}
|
|
}
|
|
|