public void CloseAllMainMenuStates(bool closeBottomBar)
    {
        switch (currentMainMenuState)
        {
        case MainMenuState.viewingPosters:
            break;

        case MainMenuState.browsingStrains:
            StopBrowsingStrains(closeBottomBar);
            break;

        case MainMenuState.browsingBongs:
            StopBrowsingBongs(closeBottomBar);
            break;

        case MainMenuState.creatingNewSavegame:
            windowController.CancelCreatingNewSavegame();
            break;

        case MainMenuState.viewingSavegames:
            windowController.CancelViewingSavegames();
            break;

        case MainMenuState.viewingCompany:
            windowController.CancelViewingCompany();
            break;
        }
    }
    void Update()
    {
        if (!controller.manager.canInteract)
        {
            return;
        }
        if (gameObject.activeSelf)
        {
            Ray          ray  = mainCamera.ScreenPointToRay(Input.mousePosition);
            RaycastHit[] hits = Physics.RaycastAll(ray);
            bool         mouseClickRegistered           = false;
            bool         mouseClickedOnActiveInputField = false;
            foreach (RaycastHit hit in hits)
            {
                if (hit.transform.name.Equals(goBackButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        controller.CancelCreatingNewSavegame();
                        mouseClickRegistered = true;
                    }
                }
                else if (hit.transform.name.Equals(companyTypeSelector_careerButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        careerToggledOn      = true;
                        mouseClickRegistered = true;
                    }
                }
                else if (hit.transform.name.Equals(companyTypeSelector_sandBoxButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        careerToggledOn      = false;
                        mouseClickRegistered = true;
                    }
                }
                else if (hit.transform.name.Equals(companyTypeSelector_confirmButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        CompanyTypeSelectorOffScreen();
                        CreateCompanyUIGroupingOnScreen();
                        mouseClickRegistered = true;
                    }
                }
                else if (hit.transform.name.Equals(startupAsDispensaryButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        dispensaryToggledOn  = true;
                        mouseClickRegistered = true;
                    }
                }
                else if (hit.transform.name.Equals(startupAsSupplierButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        dispensaryToggledOn  = false;
                        mouseClickRegistered = true;
                    }
                }
                else if (hit.transform.name.Equals(companyNameInputField.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        ActivateCompanyNameInputField();
                        mouseClickRegistered = true;
                        if (companyNameInputFieldActive)
                        {
                            mouseClickedOnActiveInputField = true;
                        }
                    }
                }
                else if (hit.transform.name.Equals(managersNameInputField.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        ActivateManagersNameInputField();
                        mouseClickRegistered = true;
                        if (managersNameInputFieldActive)
                        {
                            mouseClickedOnActiveInputField = true;
                        }
                    }
                }
                else if (hit.transform.name.Equals(buildingNameInputField.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        ActivateBuildingNameInputField();
                        mouseClickRegistered = true;
                        if (buildingNameInputFieldActive)
                        {
                            mouseClickedOnActiveInputField = true;
                        }
                    }
                }
                else if (hit.transform.name.Equals(finishCreatingCompanyButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        mouseClickRegistered = true;
                        FinishCreatingCompany();
                    }
                }
                else if (hit.transform.name.Equals(finishCreatingBuildingButton.name))
                {
                    if (Input.GetMouseButtonUp(0))
                    {
                        mouseClickRegistered = true;
                        FinishAddingCompany(dispensaryToggledOn);
                    }
                }

                if (mouseClickRegistered && anyInputFieldActive && !mouseClickedOnActiveInputField)
                {
                    DeactivateAllInputFields();
                }
            }
            if (anyInputFieldActive && Input.GetKeyUp(KeyCode.Tab))
            {
                if (companyNameInputField.gameObject.activeSelf)
                {
                    if (companyNameInputFieldActive)
                    {
                        ActivateManagersNameInputField();
                    }
                    else if (managersNameInputFieldActive)
                    {
                        ActivateCompanyNameInputField();
                    }
                }
            }
        }
        if (careerToggledOn)
        {
            confirmButtonText.text = "Create Career";
            companyTypeSelector_careerButton.SetInactive();
            companyTypeSelector_sandBoxButton.SetActive();
        }
        else
        {
            confirmButtonText.text = "Create Sandbox";
            companyTypeSelector_sandBoxButton.SetInactive();
            companyTypeSelector_careerButton.SetActive();
        }
        if (dispensaryToggledOn)
        {
            buildingNameInputFieldTitleText.text = "Dispensary Name";
            startupAsDispensaryButton.SetInactive();
            startupAsSupplierButton.SetActive();
        }
        else
        {
            buildingNameInputFieldTitleText.text = "Supplier Name";
            startupAsSupplierButton.SetInactive();
            startupAsDispensaryButton.SetActive();
        }
    }