Beispiel #1
0
        /// <summary>
        /// 現在のページのテキストデータを更新
        /// </summary>
        public void UpdatePageTextData(AdvScenarioTextDataInPage textData)
        {
            if (textData.IsCharacterShowOnly)
            {
                //キャラ表示のみ
            }
            else
            {
                bool isLastBr = this.Contoller.IsBr;
                CurrentTextDataInPage = textData;
                this.Contoller.Update(CurrentTextDataInPage.PageCtrlType);
                this.isInputSendMessage = false;
                if (isLastBr)
                {
                    ++CurrentTextLengthMax;
                }

                //テキストがないとき
                if (CurrentTextDataInPage.IsEmptyText)
                {
                    Engine.SelectionManager.TryStartWaitInputIfShowing();
                }
                else
                {
                    RemakeText();
                    Engine.UiManager.ShowMessageWindow();
                    Engine.BacklogManager.AddCurrentPageLog(CurrentTextDataInPage);
                }
            }
        }
        internal AdvScenarioTextDataInPage AddTextDataInPage(AdvCommand command)
        {
            AdvScenarioTextDataInPage textData = new AdvScenarioTextDataInPage(command);

            TextDataList.Add(textData);
            return(textData);
        }
Beispiel #3
0
 public AdvBacklogDataInPage(AdvScenarioTextDataInPage dataInPage)
 {
     LogText       = "";
     VoiceFileName = "";
     if (dataInPage.CharacterInfo != null)
     {
         CharacterLabel    = dataInPage.CharacterInfo.Label;
         CharacterNameText = TextParser.MakeLogText(LanguageManager.Instance.LocalizeText(dataInPage.CharacterInfo.NameText));
     }
     else
     {
         CharacterLabel    = "";
         CharacterNameText = "";
     }
     LogText = TextParser.MakeLogText(dataInPage.Command.ParseCellLocalizedText());
     if (dataInPage.VoiceFile != null)
     {
         VoiceFileName = dataInPage.VoiceFile.FileName;
         LogText       = TextParser.AddTag(LogText, TextParser.TagSound, dataInPage.VoiceFile.FileName);
     }
     else
     {
         VoiceFileName = "";
     }
     if (dataInPage.IsNextBr)
     {
         LogText += "\n";
     }
 }
Beispiel #4
0
        //現在のページを更新
        internal void AddCurrentPageLog(AdvScenarioTextDataInPage dataInPage)
        {
            onAddData.Invoke(this);
            if (IgnoreLog)
            {
                return;
            }

            AdvBacklog log = LastLog;

            if (log != null)
            {
                log.AddData(dataInPage);
            }
        }
        //指定のデータまでのテキストを取得
        public string MakeText(AdvScenarioTextDataInPage currentTextDataInPage)
        {
            StringBuilder builder = new StringBuilder();

            foreach (var item in TextDataList)
            {
                if (item.IsEmptyText)
                {
                    continue;
                }
                builder.Append(item.Command.ParseCellLocalizedText());
                if (item.IsNextBr)
                {
                    builder.Append("\n");
                }
                if (item == currentTextDataInPage)
                {
                    return(builder.ToString());
                }
            }
            return("");
        }
Beispiel #6
0
 protected virtual void InitTextDataInPage(AdvScenarioTextDataInPage textDataInPage)
 {
     TextDataInPage = textDataInPage;
 }
 protected override void InitTextDataInPage(AdvScenarioTextDataInPage textDataInPage)
 {
     base.InitTextDataInPage(textDataInPage);
     TextDataInPage.VoiceFile = voiceFile;
 }
Beispiel #8
0
 //データの追加
 internal void AddData(AdvScenarioTextDataInPage dataInPage)
 {
     dataList.Add(new AdvBacklogDataInPage(dataInPage));
 }