Beispiel #1
0
        /// <summary>
        /// Default section constructor
        /// </summary>
        /// <param name="sectionTitle">Title of the section</param>
        /// <param name="open">If is open or closed upon creation</param>
        /// <param name="content">Delegate function for drawing the section content</param>
        /// <param name="changesCheck">Delegate fucntion for checks that need to be done knowing if the box is open or enabled at all</param>
        public Section(GUIContent sectionTitle, bool open, SectionContent content, ChangesCheck changesCheck)
        {
            this.sectionTitle = sectionTitle;
            this.isOpen       = open;
            this.content      = content;
            this.changesCheck = changesCheck;

            TSSettings settings = JsonUtility.FromJson <TSSettings>(File.ReadAllText(TSConstants.SettingsJSONPath));

            sectionStyle        = (SectionStyle)settings.sectionStyle;
            this.sectionBgColor = settings.sectionColor;
        }
Beispiel #2
0
 /// <summary>
 /// Main constructor
 /// </summary>
 /// <param name="sectionTitle">Title of the section</param>
 /// <param name="content">Delegate function for drawing the section content</param>
 /// <param name="changesCheck">Delegate fucntion for checks that need to be done knowing if the box is open or enabled at all</param>
 /// <param name="indexNumber">Delegate fucntion that returns a BoxParameters object that contains the index and box properties</param>
 /// <returns></returns>
 public OrderedSection(GUIContent sectionTitle, SectionContent content, ChangesCheck changesCheck, IndexNumber indexNumber) : base(sectionTitle, indexNumber().box.floatValue != 0, content, changesCheck)
 {
     this.indexNumber = indexNumber;
 }