Skip to content

Commit

Permalink
Add flash background animation to title
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloYeew committed Aug 15, 2024
1 parent 8cf6543 commit 099354a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions Renako.Game/Graphics/Screens/SongSelectionScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
Expand Down Expand Up @@ -82,6 +83,10 @@ public partial class SongSelectionScreen : RenakoScreen
private Container beatmapNoteCountContainer;
private Box beatmapNoteCountBox;

private Box modeBackgroundBox;
private Box sourceBackgroundBox;
private Box songInfoBackgroundBox;

private Container idleRenakoLogoContainer;
private RightBottomBeatmapSetDetailContainer rightBottomDetailsContainer;

Expand Down Expand Up @@ -228,7 +233,7 @@ private void load(TextureStore textureStore, RenakoConfigManager config, AudioMa
CornerRadius = 15,
Children = new Drawable[]
{
new Box()
modeBackgroundBox = new Box()
{
Colour = Color4Extensions.FromHex("E0BCD5"),
RelativeSizeAxes = Axes.Both,
Expand Down Expand Up @@ -270,7 +275,7 @@ private void load(TextureStore textureStore, RenakoConfigManager config, AudioMa
CornerRadius = 15,
Children = new Drawable[]
{
new Box()
sourceBackgroundBox = new Box()
{
Colour = Color4Extensions.FromHex("E0BCD5"),
RelativeSizeAxes = Axes.Both,
Expand Down Expand Up @@ -322,7 +327,7 @@ private void load(TextureStore textureStore, RenakoConfigManager config, AudioMa
CornerRadius = 15,
Children = new Drawable[]
{
new Box()
songInfoBackgroundBox = new Box()
{
Colour = Color4Extensions.FromHex("BEB6BA"),
RelativeSizeAxes = Axes.Both,
Expand Down Expand Up @@ -1176,6 +1181,12 @@ protected override void LoadComplete()
Setting = RenakoSetting.PlayfieldBackgroundDim
}
];

modeBackgroundBox.FlashColour(Color4Extensions.FromHex("f7f0f4"), 600, Easing.OutCirc).Delay(1000).Loop();
songTitle.BackgroundBox.Delay(100).FlashColour(Color4Extensions.FromHex("f7f0f4"), 600, Easing.OutCirc).Delay(900).Loop();
sourceBackgroundBox.Delay(200).FlashColour(Color4Extensions.FromHex("f7f0f4"), 600, Easing.OutCirc).Delay(800).Loop();
songInfoBackgroundBox.Delay(300).FlashColour(Color4Extensions.FromHex("f7f0f4"), 600, Easing.OutCirc).Delay(700).Loop();
beatmapInfoBox.Delay(400).FlashColour(Color4Extensions.FromHex("f7f0f4"), 600, Easing.OutCirc).Delay(600).Loop();
}

protected override void Update()
Expand Down
4 changes: 2 additions & 2 deletions Renako.Game/Graphics/UserInterface/MenuTitleWithTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial class MenuTitleWithTexture : CompositeDrawable

public const float CONTAINER_PADDING = 20;

private Box backgroundBox;
public Box BackgroundBox;
private SpriteText titleSpriteText;
private SpriteText descriptionSpriteText;
private Container textureContainer;
Expand Down Expand Up @@ -65,7 +65,7 @@ private void load()
Colour = Colour4.White;
InternalChildren = new Drawable[]
{
backgroundBox = new Box()
BackgroundBox = new Box()
{
Colour = BackgroundColor,
RelativeSizeAxes = Axes.Both,
Expand Down

0 comments on commit 099354a

Please sign in to comment.