This class controls the search bar of the screen that allow the user find other users to send them a new friendship invitation.
More...
|
void | OnWriting (string whatIsWriting) |
| This method is called when the user is writing on the search bar input box, it sets the state_ property to "waiting" value. More...
|
|
void | OnEndWriting (string searchedName) |
| This method is called when the user finish to write on the search bar input box, if there is no internet connection or the searched user is the current user or the searched user is currently a friend it sets the state_ property to notFound. If there is internet connection and the user wrote something on the search bar it calls the SearchOtherUserByName method of firebaseHandler. More...
|
|
void | resultsOfTheSearch (Dictionary< string, string > result) |
| this method checks the result of the search and set the correct state if the result finished successfully, it calls the addSearchedFriendToPanel method of the SearchedFriendsPanel class. More...
|
|
string | getState () |
| getter of the current state of the search. More...
|
|
string | getWordsToSearch () |
| Getter of the string that the user wrote on the search bar. More...
|
|
|
void | Awake () |
| This method is called before the first frame, it sets the state_ property to "waiting" value. More...
|
|
|
GameObject | text_ |
| This should be a reference to the text of the input panel. More...
|
|
GameObject | panel_ |
| This should be a reference to the panel that shows the results of the search. More...
|
|
string | state_ |
| This property controls the state of the search. It could be: More...
|
|
This class controls the search bar of the screen that allow the user find other users to send them a new friendship invitation.
◆ Awake()
This method is called before the first frame, it sets the state_ property to "waiting" value.
◆ getState()
string SearchBar.getState |
( |
| ) |
|
getter of the current state of the search.
- Returns
- string with the current state of the search.
◆ getWordsToSearch()
string SearchBar.getWordsToSearch |
( |
| ) |
|
Getter of the string that the user wrote on the search bar.
- Returns
- string with what the user wrote on the search bar.
◆ OnEndWriting()
void SearchBar.OnEndWriting |
( |
string |
searchedName | ) |
|
This method is called when the user finish to write on the search bar input box, if there is no internet connection or the searched user is the current user or the searched user is currently a friend it sets the state_ property to notFound. If there is internet connection and the user wrote something on the search bar it calls the SearchOtherUserByName method of firebaseHandler.
◆ OnWriting()
void SearchBar.OnWriting |
( |
string |
whatIsWriting | ) |
|
This method is called when the user is writing on the search bar input box, it sets the state_ property to "waiting" value.
◆ resultsOfTheSearch()
void SearchBar.resultsOfTheSearch |
( |
Dictionary< string, string > |
result | ) |
|
this method checks the result of the search and set the correct state if the result finished successfully, it calls the addSearchedFriendToPanel method of the SearchedFriendsPanel class.
- Parameters
-
List<Dictionary<string,string>> | dictionary that contains the result of the search |
◆ panel_
GameObject SearchBar.panel_ |
|
private |
This should be a reference to the panel that shows the results of the search.
◆ state_
This property controls the state of the search. It could be:
- waiting: That means that the search not even started.
- searching: That means that it is searching right now.
- notFound: That means that the search didnt found any results.
- found: That means that the search found some results.
◆ text_
GameObject SearchBar.text_ |
|
private |
This should be a reference to the text of the input panel.
The documentation for this class was generated from the following file: