From 291299ee74833f73fd3e0f3b8f85ae4cd3cc98ef Mon Sep 17 00:00:00 2001 From: Patrice Vignola Date: Sun, 16 Aug 2015 03:28:50 -0400 Subject: [PATCH] - Added the friends count in the UI for better visibility --- Assets/Prefabs/PersonDetailsPanel.prefab | 9 +-- Assets/Scenes/Gameplay.unity | 75 +----------------------- Assets/Scripts/PersonDetailsPanel.cs | 3 + 3 files changed, 9 insertions(+), 78 deletions(-) diff --git a/Assets/Prefabs/PersonDetailsPanel.prefab b/Assets/Prefabs/PersonDetailsPanel.prefab index 24977fd..c84ec28 100644 --- a/Assets/Prefabs/PersonDetailsPanel.prefab +++ b/Assets/Prefabs/PersonDetailsPanel.prefab @@ -671,6 +671,7 @@ MonoBehaviour: m_EditorClassIdentifier: ProfilePicture: {fileID: 11440110} Name: {fileID: 11472562} + FriendsTitle: {fileID: 11400246} FriendsPanel: {fileID: 159508} KillButton: {fileID: 11400492} WatchButton: {fileID: 11491412} @@ -1151,8 +1152,8 @@ RectTransform: m_Children: [] m_Father: {fileID: 22471300} m_RootOrder: 1 - m_AnchorMin: {x: .185000002, y: .147} - m_AnchorMax: {x: .464206487, y: .5} + m_AnchorMin: {x: .465619415, y: 0} + m_AnchorMax: {x: .857309759, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: .5, y: .5} @@ -1296,8 +1297,8 @@ RectTransform: m_Children: [] m_Father: {fileID: 22471300} m_RootOrder: 2 - m_AnchorMin: {x: .185000002, y: .546483397} - m_AnchorMax: {x: 1, y: .877516687} + m_AnchorMin: {x: .185000002, y: 0} + m_AnchorMax: {x: .450309694, y: .877516687} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: .5, y: .5} diff --git a/Assets/Scenes/Gameplay.unity b/Assets/Scenes/Gameplay.unity index 6fa325f..dd5a0b4 100644 --- a/Assets/Scenes/Gameplay.unity +++ b/Assets/Scenes/Gameplay.unity @@ -852,84 +852,11 @@ Prefab: value: .5 objectReference: {fileID: 0} - target: {fileID: 22417254, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMin.y + propertyPath: m_AnchorMax.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 22417254, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - target: {fileID: 22417254, guid: c993e87661906234fba410e55ed66832, type: 2} propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 11414010, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_Value - value: .999384761 - objectReference: {fileID: 0} - - target: {fileID: 11414010, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_Size - value: .420931697 - objectReference: {fileID: 0} - - target: {fileID: 11476684, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: FriendPicture - value: - objectReference: {fileID: 11469406, guid: 16a1d168f1ef75b4690435675a9e69b0, - type: 2} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMax.x - value: .857309759 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMin.x - value: .465619415 - objectReference: {fileID: 0} - - target: {fileID: 22454288, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 22483690, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22483690, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22483690, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22483690, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchorMax.x - value: .450309694 - objectReference: {fileID: 0} - - target: {fileID: 22483690, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 22483690, guid: c993e87661906234fba410e55ed66832, type: 2} - propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] diff --git a/Assets/Scripts/PersonDetailsPanel.cs b/Assets/Scripts/PersonDetailsPanel.cs index 10e0fb3..98e30b1 100644 --- a/Assets/Scripts/PersonDetailsPanel.cs +++ b/Assets/Scripts/PersonDetailsPanel.cs @@ -9,6 +9,7 @@ public class PersonDetailsPanel : MonoBehaviour, IObserver { public Image ProfilePicture; public Text Name; + public Text FriendsTitle; public GameObject FriendsPanel; public Button KillButton; public Button WatchButton; @@ -78,6 +79,8 @@ public class PersonDetailsPanel : MonoBehaviour, IObserver List list = new List(_model.FriendList); list.Sort(); + FriendsTitle.text = string.Concat("Friends (", list.Count, ")"); + for (int i = 0; i < list.Count; i++) { Person friend = list[i].Friend;