Class SocialUI
Social UI Panel. This manages Friends and Blocked Players. In the demo they are on the same Panel, though this is not a requirement This does not have a custom inspector since it's just references to other components and dispatching events as necessary.
Inheritance
Inherited Members
Namespace: LlamaSoftware.Chat.UI
Assembly: LlamaSoftware.Chat.dll
Syntax
public class SocialUI : MonoBehaviour
Fields
BlockedPlayerChatPopup
The SocialUIPopup to display when a user right clicks a blocked player.
Declaration
[Tooltip("The SocialUIPopup to display when a user right clicks a blocked player")]
public SocialUIPopup BlockedPlayerChatPopup
Field Value
| Type | Description |
|---|---|
| SocialUIPopup |
FriendChatPopup
The SocialUIPopup to display when a user right clicks a friend.
Declaration
[Tooltip("The SocialUIPopup to display when a user right clicks a friend")]
public SocialUIPopup FriendChatPopup
Field Value
| Type | Description |
|---|---|
| SocialUIPopup |
Methods
HandlePointerClick(PointerEventData, SocialPlayer, Boolean)
Event handler for Friend and Blocked Player click events. Called by FriendChatPopup or BlockedPlayerChatPopup.
Declaration
public virtual void HandlePointerClick(PointerEventData eventData, SocialPlayer Player, bool IsFriend)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.EventSystems.PointerEventData | eventData | Event data from click event |
| SocialPlayer | Player | Player that was clicked on |
| System.Boolean | IsFriend | If it's a friend or blocked player |
UpdateBlockListWithPlayers(List<SocialPlayer>)
Rebuild blocked player list with the new list
Declaration
public virtual void UpdateBlockListWithPlayers(List<SocialPlayer> BlockedPlayers)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<SocialPlayer> | BlockedPlayers | New list of blocked players |
UpdateFriendsListWithFriends(List<SocialPlayer>)
Rebuilds friends list since we got a new list
Declaration
public virtual void UpdateFriendsListWithFriends(List<SocialPlayer> friends)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<SocialPlayer> | friends | Upated list of friends |
UpdateFriendStatus(SocialPlayer)
Updates both status and name. Call when players go offline or come online
Declaration
public virtual void UpdateFriendStatus(SocialPlayer friend)
Parameters
| Type | Name | Description |
|---|---|---|
| SocialPlayer | friend | Friend to update |
UpdateScrollRectSize(MonoBehaviour, ScrollRect)
Updates the UnityEngine.UI.ScrollRect.content UnityEngine.RectTransform.sizeDelta based on. All samples utilize VerticalLayoutGroup, but potentially you want some other kind of layout. If you don't use Unity's HorizontalOrVerticalLayoutGroup you'll have to do something else here to determine the additional spacing. Otherwise we can only guess how big the content area should be based on the Friend prefab size.
Declaration
protected virtual void UpdateScrollRectSize(MonoBehaviour Prefab, ScrollRect ScrollView)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.MonoBehaviour | Prefab | Prefab to update ScrollRect size based on |
| UnityEngine.UI.ScrollRect | ScrollView | ScrollRect to update |