diff --git a/Assets/Prefabs/Menus/CGS Games Browser Menu.prefab b/Assets/Prefabs/Menus/CGS Games Browser Menu.prefab index 0688f746..401460e8 100644 --- a/Assets/Prefabs/Menus/CGS Games Browser Menu.prefab +++ b/Assets/Prefabs/Menus/CGS Games Browser Menu.prefab @@ -33,6 +33,7 @@ RectTransform: - {fileID: 3875962887023920637} - {fileID: 2799294768656501077} - {fileID: 1584116887537079624} + - {fileID: 4765516268720243039} - {fileID: 4910390342662143575} m_Father: {fileID: 2338949577431416928} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -244,7 +245,7 @@ PrefabInstance: - target: {fileID: 1190321458197282515, guid: 1ab22cc3401977e43821548819f8b3ef, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: GoToCgsGamesBrowser + value: Refresh objectReference: {fileID: 0} - target: {fileID: 1190321458197282515, guid: 1ab22cc3401977e43821548819f8b3ef, type: 3} @@ -391,12 +392,14 @@ PrefabInstance: type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: cb10f6d86c76a9d4f894e5fce9082598, + objectReference: {fileID: 21300000, guid: e4b0afb58da26e347b7ba30bf819e89b, type: 3} - target: {fileID: 6978737696480894952, guid: 1ab22cc3401977e43821548819f8b3ef, type: 3} propertyPath: m_Text - value: Website + value: 'Refresh + +' objectReference: {fileID: 0} - target: {fileID: 7024314410439346406, guid: 1ab22cc3401977e43821548819f8b3ef, type: 3} @@ -436,7 +439,7 @@ PrefabInstance: - target: {fileID: 7793500115142644863, guid: 1ab22cc3401977e43821548819f8b3ef, type: 3} propertyPath: tooltip - value: Go to CGS Games Website + value: Refresh objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -584,12 +587,12 @@ PrefabInstance: - target: {fileID: 66792000574508518, guid: cb34354267e822c41877c9c04f71e643, type: 3} propertyPath: m_Name - value: CGSGamesBrowser Label + value: CGSGames Label objectReference: {fileID: 0} - target: {fileID: 858674133167794374, guid: cb34354267e822c41877c9c04f71e643, type: 3} propertyPath: m_Text - value: CGS Games Browser + value: CGS Games objectReference: {fileID: 0} - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} @@ -604,7 +607,7 @@ PrefabInstance: - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} propertyPath: m_AnchorMax.x - value: 1 + value: 0.5 objectReference: {fileID: 0} - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} @@ -614,7 +617,7 @@ PrefabInstance: - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} propertyPath: m_AnchorMin.x - value: 0 + value: 0.5 objectReference: {fileID: 0} - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} @@ -624,7 +627,7 @@ PrefabInstance: - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} propertyPath: m_SizeDelta.x - value: -1000 + value: 420 objectReference: {fileID: 0} - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} @@ -674,7 +677,7 @@ PrefabInstance: - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} propertyPath: m_AnchoredPosition.y - value: -100 + value: -125 objectReference: {fileID: 0} - target: {fileID: 9063206868995599585, guid: cb34354267e822c41877c9c04f71e643, type: 3} @@ -841,6 +844,191 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 6450395915586258622} m_PrefabAsset: {fileID: 0} +--- !u!1001 &7324501596672757504 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 7604758572567513302} + m_Modifications: + - target: {fileID: 1494664878241574619, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_Text + value: Website + objectReference: {fileID: 0} + - target: {fileID: 1751753110650578252, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: isBelow + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1751753110650578252, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: tooltip + value: Go to CGS Games Website + objectReference: {fileID: 0} + - target: {fileID: 1751753110650578252, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: avoidOverlap + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2442268098906025027, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: cb10f6d86c76a9d4f894e5fce9082598, + type: 3} + - target: {fileID: 2848342772243254878, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_Name + value: Website Button + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_SizeDelta.x + value: 250 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_SizeDelta.y + value: 80 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -125 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -125 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1234166375893577372} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: GoToCgsGamesBrowser + objectReference: {fileID: 0} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: Cgs.Menu.CgsGamesBrowser, Cgs + objectReference: {fileID: 0} + - target: {fileID: 7269854554250268640, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 30c175fe170c9e0459ee166821450a03, type: 3} +--- !u!224 &4765516268720243039 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 2848342772243254879, guid: 30c175fe170c9e0459ee166821450a03, + type: 3} + m_PrefabInstance: {fileID: 7324501596672757504} + m_PrefabAsset: {fileID: 0} --- !u!1001 &7565084451530594163 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Dialog.prefab b/Assets/Prefabs/Menus/Dialog.prefab similarity index 100% rename from Assets/Prefabs/Dialog.prefab rename to Assets/Prefabs/Menus/Dialog.prefab diff --git a/Assets/Prefabs/Dialog.prefab.meta b/Assets/Prefabs/Menus/Dialog.prefab.meta similarity index 100% rename from Assets/Prefabs/Dialog.prefab.meta rename to Assets/Prefabs/Menus/Dialog.prefab.meta diff --git a/Assets/Scripts/Cgs/CardGameManager.cs b/Assets/Scripts/Cgs/CardGameManager.cs index 7148c67d..81dd059b 100644 --- a/Assets/Scripts/Cgs/CardGameManager.cs +++ b/Assets/Scripts/Cgs/CardGameManager.cs @@ -227,7 +227,6 @@ internal void LookupCardGames() { var newCardGame = new UnityCardGame(this, gameDirectoryName); newCardGame.ReadProperties(); - Debug.LogWarning(newCardGame.ToString()); if (!string.IsNullOrEmpty(newCardGame.Error)) Debug.LogError(LoadErrorMessage + newCardGame.Error); else diff --git a/Assets/Scripts/Cgs/Menu/CgsGamesBrowser.cs b/Assets/Scripts/Cgs/Menu/CgsGamesBrowser.cs index 4f629785..197ff3b2 100644 --- a/Assets/Scripts/Cgs/Menu/CgsGamesBrowser.cs +++ b/Assets/Scripts/Cgs/Menu/CgsGamesBrowser.cs @@ -32,8 +32,15 @@ public class CgsGamesBrowser : SelectionPanel private int _selectedGameId; - private IEnumerator Start() + private void Start() { + StartCoroutine(RunRefreshCoroutine()); + } + + private IEnumerator RunRefreshCoroutine() + { + ClearPanel(); + using var request = UnityWebRequest.Get(CgsGamesBrowseApiUrl); yield return request.SendWebRequest(); @@ -74,6 +81,8 @@ private void Update() EventSystem.current.currentSelectedGameObject.GetComponent().isOn = true; else if (Inputs.IsOption) GoToCgsGamesBrowser(); + else if (Inputs.IsLoad) + Refresh(); else if (Inputs.IsSubmit) Import(); else if (Inputs.IsPageVertical && !Inputs.WasPageVertical) @@ -106,6 +115,13 @@ public void GoToCgsGamesBrowser() Application.OpenURL(Tags.CgsGamesBrowseUrl); } + [UsedImplicitly] + public void Refresh() + { + StopAllCoroutines(); + StartCoroutine(RunRefreshCoroutine()); + } + [UsedImplicitly] public void Import() { diff --git a/Assets/Scripts/Cgs/UI/SelectionPanel.cs b/Assets/Scripts/Cgs/UI/SelectionPanel.cs index 0980550e..b21e5f19 100644 --- a/Assets/Scripts/Cgs/UI/SelectionPanel.cs +++ b/Assets/Scripts/Cgs/UI/SelectionPanel.cs @@ -24,6 +24,16 @@ public class SelectionPanel : MonoBehaviour protected List Toggles { get; } = new(); + protected void ClearPanel() + { + if (toggleGroup != null) + toggleGroup.allowSwitchOff = true; + + Toggles.Clear(); + selectionContent.DestroyAllChildren(); + selectionContent.sizeDelta = new Vector2(selectionContent.sizeDelta.x, 0); + } + protected void Rebuild(IDictionary options, OnSelectDelegate select, TKey current) { diff --git a/docs/pages/roadmap.md b/docs/pages/roadmap.md index 0561aeca..6010e690 100644 --- a/docs/pages/roadmap.md +++ b/docs/pages/roadmap.md @@ -14,11 +14,11 @@ permalink: roadmap.html - Bug-Fix: Deck Editor slows when loading too many cards - Cards: Select left and right on zoom in Cards Explorer - Game-Play: Enhanced Drawer Buttons -- Cards: Support mix of different card sizes in the same game - Game-Play: Move card to zone, stack, or drawer (E) - Game-Play: Animation for card and stack actions - Cards: Animated highlight - Game-Play: Special action buttons (i.e. button to reset rotation for all cards, button to turn all cards faceup, etc.) +- Cards: Support mix of different card sizes in the same game - Game-Play: Apply permissions for each other's decks/stacks/cards, shuffling, moving, deleting, viewing facedown, etc - Game-Play: Label which player is interacting with cards/playables - Game-Play: Name-Plates indicating player seats @@ -63,7 +63,7 @@ permalink: roadmap.html - Games: Ability to re-skin CGS per game, changing the look of the buttons, background, scroll bar, etc ## Icebox - Priority 3 -- Integration: Json Schema Generation via https://github.com/json-everything/json-everything +- Integration: Json Schema Generation via https://github.com/json-everything/json-everything and https://github.com/coveooss/json-schema-for-humans - Cards Explorer & Deck Editor: Add sorting + Sort Menu - Cards: Apply autoUpdate to cached images - Cards: Set card image cache limit