mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Naming fixes for overlays using ScreenTitle
This commit is contained in:
@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
|
|
||||||
public ChangelogHeaderTitle()
|
public ChangelogHeaderTitle()
|
||||||
{
|
{
|
||||||
Title = "Changelog";
|
Title = "changelog";
|
||||||
Version = null;
|
Version = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.News
|
|||||||
{
|
{
|
||||||
public class NewsHeader : OverlayHeader
|
public class NewsHeader : OverlayHeader
|
||||||
{
|
{
|
||||||
private const string front_page_string = "Front Page";
|
private const string front_page_string = "frontpage";
|
||||||
|
|
||||||
private NewsHeaderTitle title;
|
private NewsHeaderTitle title;
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ namespace osu.Game.Overlays.News
|
|||||||
ShowFrontPage?.Invoke();
|
ShowFrontPage?.Invoke();
|
||||||
};
|
};
|
||||||
|
|
||||||
Current.ValueChanged += showArticle;
|
Current.ValueChanged += showPost;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.News
|
|||||||
TabControl.AccentColour = colour.Violet;
|
TabControl.AccentColour = colour.Violet;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showArticle(ValueChangedEvent<string> e)
|
private void showPost(ValueChangedEvent<string> e)
|
||||||
{
|
{
|
||||||
if (e.OldValue != null)
|
if (e.OldValue != null)
|
||||||
TabControl.RemoveItem(e.OldValue);
|
TabControl.RemoveItem(e.OldValue);
|
||||||
@ -52,12 +52,12 @@ namespace osu.Game.Overlays.News
|
|||||||
TabControl.AddItem(e.NewValue);
|
TabControl.AddItem(e.NewValue);
|
||||||
TabControl.Current.Value = e.NewValue;
|
TabControl.Current.Value = e.NewValue;
|
||||||
|
|
||||||
title.IsReadingArticle = true;
|
title.IsReadingPost = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TabControl.Current.Value = front_page_string;
|
TabControl.Current.Value = front_page_string;
|
||||||
title.IsReadingArticle = false;
|
title.IsReadingPost = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,17 +84,17 @@ namespace osu.Game.Overlays.News
|
|||||||
|
|
||||||
private class NewsHeaderTitle : ScreenTitle
|
private class NewsHeaderTitle : ScreenTitle
|
||||||
{
|
{
|
||||||
private const string article_string = "Article";
|
private const string post_string = "post";
|
||||||
|
|
||||||
public bool IsReadingArticle
|
public bool IsReadingPost
|
||||||
{
|
{
|
||||||
set => Section = value ? article_string : front_page_string;
|
set => Section = value ? post_string : front_page_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NewsHeaderTitle()
|
public NewsHeaderTitle()
|
||||||
{
|
{
|
||||||
Title = "News";
|
Title = "news";
|
||||||
IsReadingArticle = false;
|
IsReadingPost = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateIcon() => new ScreenTitleTextureIcon(@"Icons/news");
|
protected override Drawable CreateIcon() => new ScreenTitleTextureIcon(@"Icons/news");
|
||||||
|
Reference in New Issue
Block a user