protected sealed override void UpdateGUI()

in Editor/Window/ManagedEC2/EC2LaunchClientStep.cs [82:126]


        protected sealed override void UpdateGUI()
        {

            bool canLaunchClient = _deploymentSettings.CurrentStackInfo.StackStatus is StackStatus.CreateComplete or StackStatus.UpdateComplete;

            // if the client settings have changed due to a deployment or due to manual changes, this will require the user to configure the client settings again
            bool isClientConfigured = _gameLiftClientSettings && !_gameLiftClientSettings.IsGameLiftAnywhere
                                            && _gameLiftClientSettings.AwsRegion == _stateManager.Region
                                            && _gameLiftClientSettings.ApiGatewayUrl == _deploymentSettings.CurrentStackInfo.ApiGatewayEndpoint
                                            && _gameLiftClientSettings.UserPoolClientId == _deploymentSettings.CurrentStackInfo.UserPoolClientId;

            bool isLaunchClientEnabled = canLaunchClient && isClientConfigured;
            bool isConfigureClientEnabled = canLaunchClient && !isClientConfigured && _gameLiftClientSettings;

            _launchClientButton.SetEnabled(isLaunchClientEnabled);
            if (isLaunchClientEnabled)
            {
                _launchClientButton.AddToClassList(_primaryButtonClassName);
            }
            else
            {
                _launchClientButton.RemoveFromClassList(_primaryButtonClassName);
            }

            if (_deploymentSettings.Scenario == DeploymentScenarios.FlexMatch)
            {
                Hide(_launchClientButton);
                Show(_launchClientDescription);
            }
            else
            {
                Hide(_launchClientDescription);
                Show(_launchClientButton);
            }

            _configureClientButton.SetEnabled(isConfigureClientEnabled);
            if (isConfigureClientEnabled)
            {
                _configureClientButton.AddToClassList(_primaryButtonClassName);
            }
            else
            {
                _configureClientButton.RemoveFromClassList(_primaryButtonClassName);
            }
        }