Class SocialClickHandler
Same concept as
Provides right click support to add friend, remove friend, remove blocked player. Left click to immediately whisper friends.
Inheritance
Inherited Members
Namespace: LlamaSoftware.Chat.UI
Assembly: LlamaSoftware.Chat.dll
Syntax
public class SocialClickHandler : SocialUIClickHandler
Fields
Popup
The active Popup. Will be repositioned and have UnityEngine.Animator.SetTrigger(System.String) FADE_IN / FADE_OUT on it.
Declaration
protected SocialUIPopup Popup
Field Value
Type | Description |
---|---|
SocialUIPopup |
Methods
HandleClick(SocialUIPopup, SocialPlayer, PointerEventData)
Called by SocialUIPopup when a left or right click happens on a Friend or Blocked Player.
Declaration
public override void HandleClick(SocialUIPopup Popup, SocialPlayer ClickedPlayer, PointerEventData pointerEventData)
Parameters
Type | Name | Description |
---|---|---|
SocialUIPopup | Popup | |
SocialPlayer | ClickedPlayer | |
UnityEngine.EventSystems.PointerEventData | pointerEventData |
Overrides
HandleLeftClick(SocialPlayer)
Handles left click. Changes the chat channel to directly message a player or informs the user that the clicked player is offline.
Declaration
protected virtual void HandleLeftClick(SocialPlayer ClickedPlayer)
Parameters
Type | Name | Description |
---|---|---|
SocialPlayer | ClickedPlayer | Player that was clicked on. |
HandleRemoveBlockPlayer(SocialPlayer)
Removes a player from the local player's block list. Sends a BlockUnblockPlayerMessage to the server.
Declaration
protected virtual void HandleRemoveBlockPlayer(SocialPlayer ClickedPlayer)
Parameters
Type | Name | Description |
---|---|---|
SocialPlayer | ClickedPlayer | Player to unblock. |
HandleRemoveFriend(SocialPlayer)
Removes the provided friend from the local player's friends list. Sends a AddRemoveFriendMessage to the server.
Declaration
protected virtual void HandleRemoveFriend(SocialPlayer ClickedPlayer)
Parameters
Type | Name | Description |
---|---|---|
SocialPlayer | ClickedPlayer | Player clicked on. |
HandleRightClick(SocialPlayer, PointerEventData)
Handles right click event. Calls UnityEngine.Animator.SetTrigger(System.String) with FADE_IN or FADE_OUT depending if it's the first click on a player or not. Repositions the SocialUIPopup based on UnityEngine.Input.mousePosition.
Declaration
protected virtual void HandleRightClick(SocialPlayer ClickedPlayer, PointerEventData pointerEventData)
Parameters
Type | Name | Description |
---|---|---|
SocialPlayer | ClickedPlayer | Clicked player. |
UnityEngine.EventSystems.PointerEventData | pointerEventData | Pointer event data from the UnityEngine.EventSystems.EventTrigger |
OnPointerClick(String)
This should be bound to the DynamicChatItem OnClick action. Handles event based on ClickId. Calls UnityEngine.Animator.SetTrigger(System.String) on FADE_OUT.
Currently supports WHISPER, REMOVE_FRIEND, or REMOVE_BLOCKED_PLAYER.
Declaration
public virtual void OnPointerClick(string ClickId)
Parameters
Type | Name | Description |
---|---|---|
System.String | ClickId | Id of the clicked item. Currently supports WHISPER, REMOVE_FRIEND, or REMOVE_BLOCKED_PLAYER. |