private void OnResult(int count)
        {
            if (count == 0)
            {
                SearchMenu.SetContents(null);
                return;
            }

            MenuContent[] contents = new MenuContent[count];

            for (int i = 0; i < count; i++)
            {
                Location location = LocationDatabase.GetLocationFromSearch(i);
                contents[i] = new MenuContent(null, location.displayedName);
            }

            SearchMenu.SetContents(contents);
        }
        private void ToggleSearch(bool show)
        {
            if (navigationMenu == null)
            {
                return;
            }

            if (show)
            {
                string placeholder = "Choose " + (currentContext == Context.SetDestination ? "destination" : "starting point");
                SearchMenu.Open(this.OnSearch, this.OnSelect, this.CloseContext, placeholder, true);
            }
            else if (SearchMenu.isOpen)
            {
                SearchMenu.Close();
            }

            navigationMenu.ShowBackground(show);
            chooseOnMapButton.gameObject.SetActive(show);
        }