Skip to content

Commit

Permalink
Support Ukraine Logo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandrem committed Feb 25, 2022
1 parent f3512ca commit 3a2e11e
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 0 deletions.
Binary file modified Assets/Scenes/MainMenu.unity
Binary file not shown.
14 changes: 14 additions & 0 deletions Assets/Scripts/MainMenu/Model/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public void OnSupportOnPatreonClick()
Application.OpenURL(PatreonUrl);
}

public void OnSupportUkraineClick()
{
Application.OpenURL("https://ukraine.ua/news/stand-with-ukraine/");
}

private void UpdateVersionInfo()
{
GameObject.Find("UI/Panels/MainMenuPanel/Background/Version/Version Text").GetComponent<Text>().text = Global.CurrentVersion;
Expand Down Expand Up @@ -112,6 +117,7 @@ private void PrepareUpdateChecker()
{
RemoteSettings.Completed += CheckUpdateNotification;
RemoteSettings.Completed += CheckPatreonSupportNotification;
RemoteSettings.Completed += CheckSupportUkraineNotification;
RemoteSettings.ForceUpdate();
}

Expand All @@ -136,6 +142,14 @@ private void CheckPatreonSupportNotification(bool arg1, bool arg2, int arg3)
RemoteSettings.Completed -= CheckPatreonSupportNotification;
}

private void CheckSupportUkraineNotification(bool arg1, bool arg2, int arg3)
{
bool support = RemoteSettings.GetBool("SupportUkraine", false);
if (support != false) ShowSupportUkraine();

RemoteSettings.Completed -= CheckSupportUkraineNotification;
}

// 0.3.2 UI

public void CreateMatch()
Expand Down
9 changes: 9 additions & 0 deletions Assets/Scripts/MainMenu/View/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ private void ShowSupportOnPatreon(int support)
}
}

private void ShowSupportUkraine()
{
GameObject mainMenuPanel = GameObject.Find("UI/Panels").transform.Find("MainMenuPanel").gameObject;
if (!mainMenuPanel.activeSelf) return;

GameObject panel = GameObject.Find("UI/Panels").transform.Find("MainMenuPanel").Find("SupportUkraine").gameObject;
panel.SetActive(true);
}

public void ChangeEditionIsClicked(GameObject editionGO)
{
ShowActiveEdition(editionGO.name);
Expand Down
Binary file added Assets/Textures/Flag-Ukraine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions Assets/Textures/Flag-Ukraine.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a2e11e

Please sign in to comment.