Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtomhewitt committed Dec 31, 2019
2 parents c40c698 + e548635 commit 433e478
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 30 deletions.
20 changes: 10 additions & 10 deletions Assets/Scenes/Dashboard.unity
Original file line number Diff line number Diff line change
Expand Up @@ -6689,7 +6689,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 1
m_Spacing: 0
m_Spacing: 3
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
Expand Down Expand Up @@ -9660,7 +9660,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 1
m_Spacing: 0
m_Spacing: 3
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
Expand Down Expand Up @@ -13038,7 +13038,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -6.5734, y: -4.6}
m_AnchoredPosition: {x: -6.5734, y: -4.55}
m_SizeDelta: {x: 1.7519, y: 0.28677}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1206929985
Expand Down Expand Up @@ -14088,7 +14088,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 7.5894814, y: -7.75}
m_AnchoredPosition: {x: 7.5894775, y: -7.630005}
m_SizeDelta: {x: 2.9, y: 2.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1273118027
Expand Down Expand Up @@ -14163,7 +14163,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 7.5894775, y: -4.75}
m_AnchoredPosition: {x: 7.5894775, y: -4.630005}
m_SizeDelta: {x: 2.9, y: 2.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1281220135
Expand Down Expand Up @@ -15076,7 +15076,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 7.5892944, y: -1.75}
m_AnchoredPosition: {x: 7.5892944, y: -1.6300049}
m_SizeDelta: {x: 2.9, y: 2.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1328514300
Expand Down Expand Up @@ -20534,7 +20534,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 4.589901, y: -6.249996}
m_AnchoredPosition: {x: 4.589905, y: -6.130005}
m_SizeDelta: {x: 2.9, y: 5.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1763180177
Expand Down Expand Up @@ -21473,7 +21473,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 13.619015, y: -4.75}
m_AnchoredPosition: {x: 13.619019, y: -4.630005}
m_SizeDelta: {x: 2.9, y: 8.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1833876608
Expand Down Expand Up @@ -22100,7 +22100,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10.604, y: -3.25}
m_AnchoredPosition: {x: 10.604004, y: -3.130005}
m_SizeDelta: {x: 2.9, y: 5.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1870469004
Expand Down Expand Up @@ -23681,7 +23681,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 4.589901, y: -1.75}
m_AnchoredPosition: {x: 4.589905, y: -1.6300049}
m_SizeDelta: {x: 2.9, y: 2.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2062732455
Expand Down
12 changes: 6 additions & 6 deletions Assets/Widgets/Google Calendar/UI/Google Calendar Event.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions Assets/Widgets/Online List/UI/Online List Entry.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -114,7 +114,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 10.451, y: 0}
m_SizeDelta: {x: -20.901, y: 0}
m_SizeDelta: {x: 7.427, y: 5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8275654659780976893
CanvasRenderer:
Expand Down Expand Up @@ -240,8 +240,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0.0000009536743, y: 0}
m_SizeDelta: {x: 41.398, y: 6.1260004}
m_AnchoredPosition: {x: 384.112, y: 432.4865}
m_SizeDelta: {x: 20.5, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!222 &8526732700845780684
CanvasRenderer:
Expand Down Expand Up @@ -271,7 +271,7 @@ MonoBehaviour:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 5
m_FontSize: 2
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 0
Expand Down
27 changes: 26 additions & 1 deletion Assets/Widgets/Trains/Trains.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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)
Expand All @@ -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++;
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions Assets/Widgets/Trains/UI/Train Entry.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 433e478

Please sign in to comment.