DiscoverTenerife
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SearchedFriendsPanel Class Reference

Class that controls the panel that shows the result of player search. More...

Inheritance diagram for SearchedFriendsPanel:

Public Member Functions

void addSearchedFriendToPanel (Dictionary< string, string > searchedFriendData)
 this method generates a new GameObject with the prefab that is on searchedFriendPrefab_ and add it as a child of the panel and then calls the adjustPanelSize method. More...
 
int getSearchedFriendsCount ()
 
void clearSearchedFriendsPanel ()
 This method destroy each of the elements of the panel and calls the adjustPanelSize method. More...
 

Private Member Functions

void Awake ()
 This method is called before the first frame. It initializes both the searchedFriends_ and the initialHeight_ property. More...
 
void adjustPanelSize ()
 This method adjust the size of the panel if there is more than 4 elements on it. This method should be called each time that its added a new searched friend. This method allows the panel keep the aparience when more elements are added or deleted. More...
 

Private Attributes

GameObject searchedFriendPrefab_
 GameObject the prefab that shows the information of the searched user. More...
 
List< GameObject > searchedFriends_
 List<GameObject> List of the generated prefabs that represent the users that were found by the search. More...
 
float initialHeight_
 the original height of the panel. More...
 

Detailed Description

Class that controls the panel that shows the result of player search.

Member Function Documentation

◆ addSearchedFriendToPanel()

void SearchedFriendsPanel.addSearchedFriendToPanel ( Dictionary< string, string >  searchedFriendData)

this method generates a new GameObject with the prefab that is on searchedFriendPrefab_ and add it as a child of the panel and then calls the adjustPanelSize method.

Parameters
Dictionary<string,string>that contains the information of the searched friend.

◆ adjustPanelSize()

void SearchedFriendsPanel.adjustPanelSize ( )
private

This method adjust the size of the panel if there is more than 4 elements on it. This method should be called each time that its added a new searched friend. This method allows the panel keep the aparience when more elements are added or deleted.

◆ Awake()

void SearchedFriendsPanel.Awake ( )
private

This method is called before the first frame. It initializes both the searchedFriends_ and the initialHeight_ property.

◆ clearSearchedFriendsPanel()

void SearchedFriendsPanel.clearSearchedFriendsPanel ( )

This method destroy each of the elements of the panel and calls the adjustPanelSize method.

◆ getSearchedFriendsCount()

int SearchedFriendsPanel.getSearchedFriendsCount ( )
Returns
int The count of the searched friends.

Member Data Documentation

◆ initialHeight_

float SearchedFriendsPanel.initialHeight_
private

the original height of the panel.

◆ searchedFriendPrefab_

GameObject SearchedFriendsPanel.searchedFriendPrefab_
private

GameObject the prefab that shows the information of the searched user.

◆ searchedFriends_

List<GameObject> SearchedFriendsPanel.searchedFriends_
private

List<GameObject> List of the generated prefabs that represent the users that were found by the search.


The documentation for this class was generated from the following file: