Exemple #1
0
        protected virtual void AddHeadingContent(HeadingTextQuestContent headingContent)
        {
            var instance = Instantiate <UnityUITextTemplate>(GetHeadingTemplate(headingContent.headingLevel));

            currentContentManager.Add(instance, currentContentContainer);
            instance.Assign(headingContent.runtimeText);
            currentIconList = null;
        }
        public QuestContent CreateTitleContent()
        {
            var content = HeadingTextQuestContent.CreateInstance <HeadingTextQuestContent>();

            content.name          = "title";
            content.useQuestTitle = true;
            content.headingLevel  = 1;
            return(content);
        }
        public QuestContent CreateHeadingContent(StringField text, int level)
        {
            var content = HeadingTextQuestContent.CreateInstance <HeadingTextQuestContent>();

            content.name          = "heading";
            content.useQuestTitle = false;
            content.headingText   = text;
            content.headingLevel  = level;
            return(content);
        }
        private static void ApplyHeadingTextQuestContentProxyData(HeadingTextQuestContent headingTextQuestContent, string s)
        {
            if (headingTextQuestContent == null || s == null)
            {
                return;
            }
            var fields = s.Split(';');

            if (fields.Length < 2)
            {
                return;
            }
            headingTextQuestContent.headingLevel = SafeConvert.ToInt(fields[0]);
            headingTextQuestContent.originalText = new StringField(fields[1]);
        }
 private static string GetHeadingTextQuestContentProxyData(HeadingTextQuestContent headingTextQuestContent)
 {
     return(headingTextQuestContent.headingLevel + ";" + StringField.GetStringValue(headingTextQuestContent.originalText));
 }