コード例 #1
0
        //頂点情報を作成
        void Refresh()
        {
            if (isRequestingCharactersInTexture)
            {
                if (isDebugLog)
                {
                    Debug.LogError("RequestingCharactersInTexture on Reflesh");
                }
                return;
            }

            //TextData作成
            textData = new TextData(NovelText.text);
            if (isDebugLog)
            {
                Debug.Log(textData.ParsedText.OriginalText);
            }

            //描画範囲のサイズを設定しておく
            Rect rect = CachedRectTransform.rect;

            maxWidth  = Mathf.Abs(rect.width);
            maxHeight = Mathf.Abs(rect.height);

            //文字データを作成
            List <UguiNovelTextCharacter> characterDataList = CreateCharacterDataList();

            //拡張的な情報を作成
            addtional = new UguiNovelTextGeneratorAddtional(characterDataList, this);
            //フォントの文字画像を準備・設定
            InitFontCharactes(NovelText.font, characterDataList);
            //拡張的な情報の初期化
            Addtional.InitAfterCharacterInfo(this);
            //独自の改行処理を入れる
            AutoLineBreak(characterDataList);
            //行ごとの文字データを作成
            lineDataList = CreateLineList(characterDataList);
            //テキストのアンカーを適用する
            ApplyTextAnchor(lineDataList, NovelText.alignment);
            //Offsetを適用する
            ApplyOffset(lineDataList);
            //拡張的な情報の表示位置を初期化
            Addtional.InitPosition(this);
            //各頂点データを構築
            MakeVerts(lineDataList);

            isInitGraphicObjectList = false;
            HasChangedLitte         = false;
            HasChanged   = false;
            IsRebuidFont = false;
        }
コード例 #2
0
		//頂点情報を作成
		void Refresh()
		{
			if (isRequestingCharactersInTexture)
			{
				if (isDebugLog) Debug.LogError("RequestingCharactersInTexture on Reflesh");
				return;
			}

			//TextData作成
			textData = new TextData(NovelText.text);
			if (isDebugLog) Debug.Log(textData.ParsedText.OriginalText);

			//描画範囲のサイズを設定しておく
			Rect rect = CachedRectTransform.rect;
			maxWidth = Mathf.Abs(rect.width);
			maxHeight = Mathf.Abs(rect.height);

			//文字データを作成
			List<UguiNovelTextCharacter> characterDataList = CreateCharacterDataList();
			//拡張的な情報を作成
			addtional = new UguiNovelTextGeneratorAddtional(characterDataList, this);
			//フォントの文字画像を準備・設定
			InitFontCharactes(NovelText.font, characterDataList);
			//拡張的な情報の初期化
			Addtional.InitAfterCharacterInfo(this);
			//独自の改行処理を入れる
			AutoLineBreak(characterDataList);
			//行ごとの文字データを作成
			lineDataList = CreateLineList(characterDataList);
			//テキストのアンカーを適用する
			ApplyTextAnchor(lineDataList, NovelText.alignment);
			//Offsetを適用する
			ApplyOffset(lineDataList);
			//拡張的な情報の表示位置を初期化
			Addtional.InitPosition(this);
			//各頂点データを構築
			MakeVerts(lineDataList);

			isInitGraphicObjectList = false;
			HasChangedLitte = false;
			HasChanged = false;
			IsRebuidFont = false;
		}