public void Initialise(string residueName, MoleculeRenderSettings settings, PrimaryStructure primaryStructure, SaveCustomResidueSettingsDelegate saveCustomResidueSettings, ResidueRenderSettingsUpdated settingsUpdatedCallback, ClosedResidueSettingsPanel onClose)
        {
            this.residueName               = residueName;
            this.moleculeRenderSettings    = settings;
            this.primaryStructure          = primaryStructure;
            this.saveCustomResidueSettings = saveCustomResidueSettings;
            this.settingsUpdatedCallback   = settingsUpdatedCallback;
            this.onClose = onClose;

            ResidueNameInformationText.text = "Showing residue IDs for " + residueName;

            residueIDs = primaryStructure.GetResidueIDs(new List <String>()
            {
                residueName
            }).ToList();
            residueIDs.Sort();

            renderResidueIDButtons();

            allResiduesEnabled = true;
            foreach (int residueID in residueIDs)
            {
                if (!moleculeRenderSettings.EnabledResidueIDs.Contains(residueID))
                {
                    allResiduesEnabled = false;
                    break;
                }
            }

            updateToggleResidueButtonText();

            residueIDsPanel.SetActive(true);
        }
Exemple #2
0
        public void Initialise(MoleculeRenderSettings moleculeRenderSettings, ResidueRenderSettingsUpdated settingsUpdatedCallback, UpdatedResidueIDsDelegate residueIDsUpdated, OpenUpdateAllResiduesPanel openUpdateAllPanel, ClosedResidueSettingsPanel onClose)
        {
            this.moleculeRenderSettings  = moleculeRenderSettings;
            this.settingsUpdatedCallback = settingsUpdatedCallback;
            this.residueIDsUpdated       = residueIDsUpdated;
            this.openUpdateAllPanel      = openUpdateAllPanel;
            this.onClose = onClose;

            updateToggleResidueButtonText();
            residueUpdateRangePanel.SetActive(true);
        }
        public void Initialise(MoleculeRenderSettings moleculeRenderSettings, PrimaryStructure primaryStructure, ResidueRenderSettingsUpdated settingsUpdatedCallback)
        {
            this.moleculeRenderSettings  = moleculeRenderSettings;
            this.primaryStructure        = primaryStructure;
            this.settingsUpdatedCallback = settingsUpdatedCallback;

            residueNames = primaryStructure.ResidueNames.ToList();
            residueNames.Sort();

            renderResidueNameButtons();

            allResiduesEnabled = false;
            if (this.moleculeRenderSettings.EnabledResidueNames != null && residueNameButtons.Count == this.moleculeRenderSettings.EnabledResidueNames.Count)
            {
                allResiduesEnabled = true;
            }

            updateToggleResidueButtonText();

            residueNamesPanel.SetActive(true);
        }