Skip to content

Commit

Permalink
Implement copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Oct 25, 2023
1 parent 5f3f7cc commit 312a0e6
Show file tree
Hide file tree
Showing 8 changed files with 621 additions and 44 deletions.
630 changes: 590 additions & 40 deletions Assets/Prefabs/Menus/Card Game Editor Menu.prefab

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions Assets/Scenes/MainMenu.unity

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

6 changes: 4 additions & 2 deletions Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using Newtonsoft.Json.Serialization;
using SFB;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
using UnityExtensionMethods;

Expand Down Expand Up @@ -46,7 +45,7 @@ public class CardGameEditorMenu : Modal
public Image bannerImage;
public Image cardBackImage;
public Image playMatImage;
[FormerlySerializedAs("newCardGameButton")] public Button saveButton;
public Button saveButton;

private DownloadMenu Downloader =>
_downloader ??= Instantiate(downloadMenuPrefab).GetOrAddComponent<DownloadMenu>();
Expand Down Expand Up @@ -106,6 +105,8 @@ public string Height

[UsedImplicitly] public int PlayMatImageFileType { get; set; }

[UsedImplicitly] public string Copyright { get; set; }

[UsedImplicitly] public string RulesUrl { get; set; }

private void Update()
Expand Down Expand Up @@ -372,6 +373,7 @@ private IEnumerator CreateGame()
CardSetIdentifier = "setCode",
PlayMatImageFileType = PlayMatImageFileType == 0 ? "png" : "jpg",
PlayMatImageUrl = _game.PlayMatImageUrl,
Copyright = string.IsNullOrWhiteSpace(Copyright) ? "" : Copyright,
RulesUrl = Uri.IsWellFormedUriString(RulesUrl, UriKind.Absolute) ? new Uri(RulesUrl) : null
};

Expand Down
7 changes: 7 additions & 0 deletions Assets/Scripts/Cgs/Menu/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ private static bool HasSeenWelcome
private void OnEnable()
{
CardGameManager.Instance.OnSceneActions.Add(ResetGameSelectionCarousel);
CardGameManager.Instance.OnSceneActions.Add(SetCopyright);
}

private void SetCopyright()
{
if (!string.IsNullOrWhiteSpace(CardGameManager.Current.Copyright))
copyrightText.text = CardGameManager.Current.Copyright;
}

private void Start()
Expand Down
1 change: 1 addition & 0 deletions docs/games/Arcmage/Arcmage.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"y": 3.622
},
"cgsGamesLink": "https://cgs.games/link/arcmage",
"copyright": "Arcmage.org",
"deckMaxCount": 45,
"deckSharePreference": "individual",
"enums": [
Expand Down
3 changes: 3 additions & 0 deletions docs/games/grand_archive/grand_archive.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"cardSetsInList": true,
"cardSetIdentifier": "editions",
"cgsGamesLink": "https://cgs.games/link/grand_archive",
"copyright": "Weebs of the Shore",
"deckSharePreference": "individual",
"deckUrls": [
{
Expand Down Expand Up @@ -252,6 +253,7 @@
],
"gamePlayZones": [
{
"defaultCardAction": "flip",
"face": "down",
"position": {
"x": 0,
Expand All @@ -264,6 +266,7 @@
"type": "horizontal"
},
{
"defaultCardAction": "flip",
"face": "down",
"position": {
"x": 0,
Expand Down
1 change: 1 addition & 0 deletions docs/games/zu_tiles/zu_tiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"y": 3.0
},
"cgsGamesLink": "https://cgs.games/link/zu_tiles",
"copyright": "ZU Studios",
"deckSharePreference": "individual",
"deckUrls": [
{
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ permalink: roadmap.html
# Roadmap

## What's New - v1.93
- Game-Play: Face-Up Stacks (Always reveal the top card); default based on bottom
- default rotation for players objects
- Main Menu: Footer with copyright
- default rotation for players objects
- Game-Play: Face-Up Stacks (Always reveal the top card); default based on bottom

## Active Sprint
- Deck-Editor: Card Zone should move containing scrollrect
Expand Down

0 comments on commit 312a0e6

Please sign in to comment.