Skip to content

Commit

Permalink
.gitattributes and CGS Games Browser
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Sep 8, 2024
1 parent d6aad31 commit c7faf99
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 62 deletions.
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Git attributes for Unity projects
#
# Compiled by the GameCI community - https://game.ci
# Compiled by the GameCI community under the MIT license - https://game.ci
#
# Latest version at https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc
#
Expand All @@ -15,7 +15,7 @@

# Macro attribute: Files with Unity's yaml format
# linguist-generated means the file is ignored for the repository's language statistics and diffs are hidden by default.
[attr]unity-yaml-file -text -merge=unityyamlmerge linguist-generated
[attr]unity-yaml-file -text merge=unityyamlmerge linguist-generated

# Macro attribute: Files intended for LFS
[attr]lfs-file filter=lfs diff=lfs merge=lfs -text
Expand Down Expand Up @@ -111,6 +111,8 @@
*.dfx lfs-file
*.FBX lfs-file
*.fbx lfs-file
*.glb lfs-file
*.gltf lfs-file
*.lwo lfs-file
*.lwo2 lfs-file
*.lxo lfs-file
Expand Down
182 changes: 124 additions & 58 deletions Assets/Prefabs/Menus/CGS Games Browser Menu.prefab

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

13 changes: 11 additions & 2 deletions Assets/Scripts/Cgs/Menu/CgsGamesBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ private void Update()
if (Input.GetKeyDown(Inputs.BluetoothReturn) && Toggles.Select(toggle => toggle.gameObject)
.Contains(EventSystem.current.currentSelectedGameObject))
EventSystem.current.currentSelectedGameObject.GetComponent<Toggle>().isOn = true;
else if (Inputs.IsOption)
GoToCgsGamesBrowser();
else if (Inputs.IsSubmit)
Download();
Import();
else if (Inputs.IsPageVertical && !Inputs.WasPageVertical)
ScrollPage(Inputs.IsPageDown);
else if (Inputs.IsCancel)
Expand All @@ -99,9 +101,16 @@ public void SelectGame(Toggle toggle, int gameId)
}

[UsedImplicitly]
public void Download()
public void GoToCgsGamesBrowser()
{
Application.OpenURL(Tags.CgsGamesBrowseUrl);
}

[UsedImplicitly]
public void Import()
{
CardGameManager.Instance.StartGetCardGame(_gameOptions[_selectedGameId].AutoUpdateUrl);
Hide();
}

[UsedImplicitly]
Expand Down

0 comments on commit c7faf99

Please sign in to comment.