public void SetUp()
        {
            const string prefabAssetPath =
                "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/UsersSearchPrompt/UsersSearchPromptView.prefab";
            var viewPrefab = AssetDatabase.LoadAssetAtPath <UsersSearchPromptView>(prefabAssetPath);

            promptView = Object.Instantiate(viewPrefab);
        }
Example #2
0
    public UsersSearchPromptController(UsersSearchPromptView promptView)
    {
        view = promptView;
        view.SetIdleSearchTime(1.5f);

        userViewsHandler = new UsersSearchUserViewsHandler(view.GetUsersBaseElement(), view.GetUserElementsParent());
        usersSearcher    = new UsersSearcher();

        view.OnSearchText             += OnSearchText;
        view.OnShouldHide             += OnShouldHidePrompt;
        userViewsHandler.OnAddUser    += OnAddUserPressed;
        userViewsHandler.OnRemoveUser += OnRemoveUserPressed;
    }
Example #3
0
    public FriendsSearchPromptController(UsersSearchPromptView promptView, IFriendsController friendsController)
    {
        view = promptView;
        view.SetIdleSearchTime(IDLE_TIME_TRIGGER_SEARCH);

        friendsHandler   = new UsersSearchFriendsHandler(friendsController);
        userViewsHandler = new UsersSearchUserViewsHandler(view.GetUsersBaseElement(), view.GetUserElementsParent());

        friendsHandler.OnFriendRemoved += OnFriendRemoved;
        searchHandler.OnSearchChanged  += OnSearchResult;
        view.OnSearchText             += OnSearchText;
        view.OnShouldHide             += OnShouldHidePrompt;
        userViewsHandler.OnAddUser    += OnAddUserPressed;
        userViewsHandler.OnRemoveUser += OnRemoveUserPressed;
    }