Skip to content

Commit

Permalink
Fix tab switching regression
Browse files Browse the repository at this point in the history
  • Loading branch information
VolcanicArts committed Nov 14, 2022
1 parent 94ac2d5 commit eb056b2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions VRCOSC.Game/Graphics/TabBar/DrawableTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osuTK;
using VRCOSC.Game.Modules;

namespace VRCOSC.Game.Graphics.TabBar;

Expand All @@ -31,6 +32,9 @@ public sealed class DrawableTab : ClickableContainer
[Resolved]
private Bindable<Tab> selectedTab { get; set; } = null!;

[Resolved]
private ModuleManager moduleManager { get; set; } = null!;

public DrawableTab()
{
RelativeSizeAxes = Axes.Both;
Expand Down Expand Up @@ -94,6 +98,17 @@ protected override void LoadComplete()
Action += () => selectedTab.Value = Tab;
}

protected override bool OnClick(ClickEvent e)
{
if (moduleManager.Running)
{
background.FlashColour(VRCOSCColour.Red, 250, Easing.OutQuad);
return true;
}

return base.OnClick(e);
}

protected override bool OnHover(HoverEvent e)
{
background.FadeColour(hover_colour, onhover_duration, Easing.InOutSine);
Expand Down

0 comments on commit eb056b2

Please sign in to comment.