Update tab text font on activation/deactivation

This commit is contained in:
Roman Kapustin
2018-12-29 17:43:19 +03:00
parent 1b35eae1ba
commit 850a7aa327
2 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,6 @@ namespace osu.Game.Graphics.UserInterface
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Text = (value as IHasDescription)?.Description ?? (value as Enum)?.GetDescription() ?? value.ToString(), Text = (value as IHasDescription)?.Description ?? (value as Enum)?.GetDescription() ?? value.ToString(),
TextSize = 14, TextSize = 14,
Font = @"Exo2.0-Bold", // Font should only turn bold when active?
}, },
Bar = new Box Bar = new Box
{ {
@ -173,6 +172,8 @@ namespace osu.Game.Graphics.UserInterface
}, },
new HoverClickSounds() new HoverClickSounds()
}; };
Active.BindValueChanged(val => Text.Font = val ? @"Exo2.0-Bold" : @"Exo2.0", true);
} }
protected override void OnActivated() => fadeActive(); protected override void OnActivated() => fadeActive();

View File

@ -46,7 +46,6 @@ namespace osu.Game.Graphics.UserInterface
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Text = (value as Enum)?.GetDescription() ?? value.ToString(), Text = (value as Enum)?.GetDescription() ?? value.ToString(),
TextSize = 14, TextSize = 14,
Font = @"Exo2.0-Bold",
}, },
box = new Box box = new Box
{ {
@ -59,6 +58,8 @@ namespace osu.Game.Graphics.UserInterface
}, },
new HoverClickSounds() new HoverClickSounds()
}; };
Active.BindValueChanged(val => Text.Font = val ? @"Exo2.0-Bold" : @"Exo2.0", true);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]