From 85bcea86bdbe88914c9e49372822000ed7097d2f Mon Sep 17 00:00:00 2001 From: Tom Hewitt Date: Tue, 31 Dec 2019 10:13:54 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=92=BB=20Populate=20bus=20entries=20o?= =?UTF-8?q?n=20the=20train=20widget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Widgets/Trains/Trains.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Assets/Widgets/Trains/Trains.cs b/Assets/Widgets/Trains/Trains.cs index a0e870e1..8f6e61c3 100644 --- a/Assets/Widgets/Trains/Trains.cs +++ b/Assets/Widgets/Trains/Trains.cs @@ -57,6 +57,8 @@ private IEnumerator PopulateEntries() yield break; } + int lastRowNumber = 0; + for (int i = 0; i < json["trainServices"].Count; i++) { if (json["trainServices"].Count == i) @@ -75,6 +77,29 @@ private IEnumerator PopulateEntries() entry.GetDestinationText().text = locationName; entry.GetTimeText().text = trainService["std"] + " (" + trainService["etd"] + ")"; + + lastRowNumber++; + } + + for (int i = 0; i < json["busServices"].Count; i++) + { + if (json["busServices"].Count == i) + { + yield break; + } + + TrainEntry entry = trainEntries[lastRowNumber]; + JSONNode trainService = json["busServices"][i]; + string locationName = trainService["destination"][0]["locationName"]; + + if (locationName.Length > maxDestinationLength) + { + locationName = locationName.Substring(0, maxDestinationLength - 1) + "..."; + } + + entry.GetDestinationText().text = locationName; + entry.GetTimeText().text = trainService["std"] + " (Bus)"; + lastRowNumber++; } } } From b2808730cfe31bc0fbf4413081f3ffba29e0b68f Mon Sep 17 00:00:00 2001 From: Tom Hewitt Date: Tue, 31 Dec 2019 10:18:30 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=8E=A8=20Correct=20font=20and=20resiz?= =?UTF-8?q?e=20train=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Widgets/Trains/Trains.cs | 2 +- Assets/Widgets/Trains/UI/Train Entry.prefab | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/Widgets/Trains/Trains.cs b/Assets/Widgets/Trains/Trains.cs index 8f6e61c3..254dada5 100644 --- a/Assets/Widgets/Trains/Trains.cs +++ b/Assets/Widgets/Trains/Trains.cs @@ -15,7 +15,7 @@ public class Trains : FadingWidget private string apiToken; private string stationCode; - private int maxDestinationLength = 10; + private int maxDestinationLength = 11; private void Start() { diff --git a/Assets/Widgets/Trains/UI/Train Entry.prefab b/Assets/Widgets/Trains/UI/Train Entry.prefab index 3ba771d6..98f16f32 100644 --- a/Assets/Widgets/Trains/UI/Train Entry.prefab +++ b/Assets/Widgets/Trains/UI/Train Entry.prefab @@ -35,7 +35,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} m_AnchoredPosition: {x: 0.248, y: 0} - m_SizeDelta: {x: 11.95, y: 2.419} + m_SizeDelta: {x: 13.366, y: 3} m_Pivot: {x: 0, y: 0.5} --- !u!222 &8932881661957480715 CanvasRenderer: @@ -64,11 +64,11 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Font: {fileID: 12800000, guid: d9f34d8218de7804b9cbc0e3167c9854, type: 3} m_FontSize: 2 m_FontStyle: 1 m_BestFit: 0 - m_MinSize: 2 + m_MinSize: 1 m_MaxSize: 40 m_Alignment: 3 m_AlignByGeometry: 1 @@ -114,7 +114,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 27.318, y: 2.419} + m_SizeDelta: {x: 27.318, y: 3} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8932881662907039470 CanvasRenderer: @@ -173,7 +173,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} m_AnchoredPosition: {x: -0.684, y: 0} - m_SizeDelta: {x: 18.411, y: 2.419} + m_SizeDelta: {x: 15, y: 3} m_Pivot: {x: 1, y: 0.5} --- !u!222 &8932881663670497206 CanvasRenderer: @@ -202,11 +202,11 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Font: {fileID: 12800000, guid: d9f34d8218de7804b9cbc0e3167c9854, type: 3} m_FontSize: 2 m_FontStyle: 1 m_BestFit: 0 - m_MinSize: 2 + m_MinSize: 1 m_MaxSize: 40 m_Alignment: 5 m_AlignByGeometry: 1 From 1fe5762aca7dff8ddd9bd89b17b9eeac38ea48cf Mon Sep 17 00:00:00 2001 From: Tom Hewitt Date: Tue, 31 Dec 2019 10:20:03 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=8E=A8=20Correct=20font=20on=20Google?= =?UTF-8?q?=20Calendar=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Google Calendar/UI/Google Calendar Event.prefab | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Widgets/Google Calendar/UI/Google Calendar Event.prefab b/Assets/Widgets/Google Calendar/UI/Google Calendar Event.prefab index 054c318a..d649ece7 100644 --- a/Assets/Widgets/Google Calendar/UI/Google Calendar Event.prefab +++ b/Assets/Widgets/Google Calendar/UI/Google Calendar Event.prefab @@ -35,7 +35,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} m_AnchoredPosition: {x: 0.248, y: 0} - m_SizeDelta: {x: 19.917, y: 2.419} + m_SizeDelta: {x: 19.917, y: 3} m_Pivot: {x: 0, y: 0.5} --- !u!222 &7321161314555440772 CanvasRenderer: @@ -64,7 +64,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Font: {fileID: 12800000, guid: d9f34d8218de7804b9cbc0e3167c9854, type: 3} m_FontSize: 2 m_FontStyle: 1 m_BestFit: 0 @@ -112,7 +112,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} m_AnchoredPosition: {x: -0.93, y: 0} - m_SizeDelta: {x: 9.669, y: 2.419} + m_SizeDelta: {x: 9.669, y: 3} m_Pivot: {x: 1, y: 0.5} --- !u!222 &7321161315315073999 CanvasRenderer: @@ -141,7 +141,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Font: {fileID: 12800000, guid: d9f34d8218de7804b9cbc0e3167c9854, type: 3} m_FontSize: 2 m_FontStyle: 1 m_BestFit: 0 @@ -166,7 +166,7 @@ GameObject: - component: {fileID: 7321161315731493424} - component: {fileID: 7321161315731493455} m_Layer: 5 - m_Name: Event (1) + m_Name: Google Calendar Event m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -191,7 +191,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 27.318, y: 2.419} + m_SizeDelta: {x: 27.318, y: 3} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7321161315731493424 CanvasRenderer: From d83567f168dda96937d49668f405bf6ad1084f9a Mon Sep 17 00:00:00 2001 From: Tom Hewitt Date: Tue, 31 Dec 2019 10:24:38 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=8E=A8=20Fixing=20the=20sizing=20of?= =?UTF-8?q?=20online=20lists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/Dashboard.unity | 4 ++-- Assets/Widgets/Online List/UI/Online List Entry.prefab | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Assets/Scenes/Dashboard.unity b/Assets/Scenes/Dashboard.unity index d3f4a1df..416ab6f4 100644 --- a/Assets/Scenes/Dashboard.unity +++ b/Assets/Scenes/Dashboard.unity @@ -6689,7 +6689,7 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 1 - m_Spacing: 5 + m_Spacing: 3 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 0 m_ChildControlWidth: 0 @@ -9660,7 +9660,7 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 0 - m_Spacing: 5 + m_Spacing: 3 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 0 m_ChildControlWidth: 0 diff --git a/Assets/Widgets/Online List/UI/Online List Entry.prefab b/Assets/Widgets/Online List/UI/Online List Entry.prefab index 58918b82..6616098e 100644 --- a/Assets/Widgets/Online List/UI/Online List Entry.prefab +++ b/Assets/Widgets/Online List/UI/Online List Entry.prefab @@ -65,7 +65,7 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: d9f34d8218de7804b9cbc0e3167c9854, type: 3} - m_FontSize: 3 + m_FontSize: 2 m_FontStyle: 1 m_BestFit: 0 m_MinSize: 0 @@ -114,7 +114,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 7.427003, y: 0} - m_SizeDelta: {x: 7.427, y: 6} + m_SizeDelta: {x: 7.427, y: 5} m_Pivot: {x: 1, y: 1} --- !u!222 &8275654659780976893 CanvasRenderer: @@ -243,8 +243,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 382.62024, y: 432.4865} - m_SizeDelta: {x: 18.802, y: 0} + m_AnchoredPosition: {x: 384.112, y: 432.4865} + m_SizeDelta: {x: 20.5, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &8526732701419245916 MonoBehaviour: @@ -288,7 +288,7 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: d9f34d8218de7804b9cbc0e3167c9854, type: 3} - m_FontSize: 3 + m_FontSize: 2 m_FontStyle: 1 m_BestFit: 0 m_MinSize: 0 From bf67191fa04739db447516f51c311b974d92869a Mon Sep 17 00:00:00 2001 From: Tom Hewitt Date: Tue, 31 Dec 2019 10:32:22 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=94=A7=20Update=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectSettings/ProjectSettings.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 95b2ec6e..5c84e3af 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -120,7 +120,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 4.1.0 + bundleVersion: 4.2.0 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0