made the news button optional
This commit is contained in:
@@ -206,6 +206,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
new Download(Game.Settings.Game.NewsUrl, cacheFile, e => { }, (e, c) => NewsDownloadComplete(e, c, cacheFile, currentNews));
|
new Download(Game.Settings.Game.NewsUrl, cacheFile, e => { }, (e, c) => NewsDownloadComplete(e, c, cacheFile, currentNews));
|
||||||
|
|
||||||
var newsButton = newsBG.GetOrNull<DropDownButtonWidget>("NEWS_BUTTON");
|
var newsButton = newsBG.GetOrNull<DropDownButtonWidget>("NEWS_BUTTON");
|
||||||
|
if (newsButton != null)
|
||||||
|
{
|
||||||
newsButton.OnClick = () =>
|
newsButton.OnClick = () =>
|
||||||
{
|
{
|
||||||
newsButton.AttachPanel(newsPanel);
|
newsButton.AttachPanel(newsPanel);
|
||||||
@@ -214,6 +216,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
newsButton.IsHighlighted = () => newsHighlighted && Game.LocalTick % 50 < 25;
|
newsButton.IsHighlighted = () => newsHighlighted && Game.LocalTick % 50 < 25;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Game.OnRemoteDirectConnect += (host, port) =>
|
Game.OnRemoteDirectConnect += (host, port) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user