// -------------------------------------------

        /*
         * OnSendInvitationsPressed
         */
        private void OnAcceptInvitationsPressed()
        {
            ItemRoomView roomSelected = null;

            for (int i = 0; i < m_rooms.Count; i++)
            {
                if (m_rooms[i].Selected)
                {
                    roomSelected = m_rooms[i];
                }
            }

            if (roomSelected != null)
            {
                NetworkEventController.Instance.MenuController_SaveRoomNumberInServer(roomSelected.Room);
                NetworkEventController.Instance.MenuController_SaveRoomNameInServer(roomSelected.DisplayName);

                // JOIN ROOM IN FACEBOOK
#if ENABLE_BALANCE_LOADER
                NetworkEventController.Instance.MenuController_SaveIPAddressServer(roomSelected.IPAddress);
                NetworkEventController.Instance.MenuController_SavePortServer(roomSelected.Port);
#endif
                JoinGamePressed();
            }
            else
            {
                UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_OPEN_INFORMATION_SCREEN, ScreenInformationView.SCREEN_INFORMATION, UIScreenTypePreviousAction.KEEP_CURRENT_SCREEN, LanguageController.Instance.GetText("message.warning"), LanguageController.Instance.GetText("message.you.should.select.an.item"), null, "");
            }
        }
        // -------------------------------------------

        /*
         * OnMenuBasicEvent
         */
        protected override void OnMenuEvent(string _nameEvent, params object[] _list)
        {
            base.OnMenuEvent(_nameEvent, _list);

            if (_nameEvent == ItemRoomView.EVENT_ITEM_ROOM_SELECTED)
            {
                ItemRoomView itemRoomView = (ItemRoomView)_list[0];
                for (int i = 0; i < m_rooms.Count; i++)
                {
                    if (m_rooms[i] == itemRoomView)
                    {
                        m_rooms[i].Selected = true;
                    }
                    else
                    {
                        m_rooms[i].Selected = false;
                    }
                }
            }
            if (_nameEvent == ClientTCPEventsController.EVENT_CLIENT_TCP_LIST_OF_GAME_ROOMS)
            {
                LoadInvitations(ClientTCPEventsController.Instance.RoomsInvited);
            }
            if (_nameEvent == MenuScreenController.EVENT_MENUEVENTCONTROLLER_SHOW_LOADING_MESSAGE)
            {
                UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_OPEN_GENERIC_SCREEN, ScreenLoadingView.SCREEN_NAME, UIScreenTypePreviousAction.KEEP_CURRENT_SCREEN, false, null);
            }
            if (_nameEvent == GetListRoomsHTTP.EVENT_CLIENT_HTTP_LIST_OF_GAME_ROOMS)
            {
                UIEventController.Instance.DispatchUIEvent(MenuScreenController.EVENT_FORCE_DESTRUCTION_POPUP);
                if (_list.Length == 1)
                {
                    LoadInvitations((List <ItemMultiTextEntry>)_list[0]);
                }
                else
                {
                    UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_DESTROY_SCREEN, this.gameObject);
                    UIEventController.Instance.DispatchUIEvent(UIEventController.EVENT_SCREENMANAGER_OPEN_INFORMATION_SCREEN, ScreenInformationView.SCREEN_INFORMATION, UIScreenTypePreviousAction.KEEP_CURRENT_SCREEN, LanguageController.Instance.GetText("message.error"), LanguageController.Instance.GetText("screen.room.list.not.retrieved"), null, "");
                }
            }
        }