Esempio n. 1
0
        private void EventScriptFormCategorySelectForm_Load(object sender, EventArgs e)
        {
            this.EscapeList = new List <TextEscape>();
            string[] lines = File.ReadAllLines(U.ConfigDataFilename("text_escape_"));
            for (int i = 0; i < lines.Length; i++)
            {
                string line = lines[i];
                if (U.IsComment(line) || U.OtherLangLine(line))
                {
                    continue;
                }
                line = U.ClipComment(line);
                if (line == "")
                {
                    continue;
                }
                string[] sp = line.Split('\t');
                if (sp.Length < 3)
                {
                    continue;
                }
                TextEscape te = new TextEscape();
                te.Code     = sp[0];
                te.Info     = sp[1];
                te.Category = sp[2];

                if (!IsDetail)
                {//詳細テキストじゃないと、移動とロードを出さない.
                    if (IsDetailOnly(te.Category))
                    {
                        continue;
                    }
                }

                this.EscapeList.Add(te);
            }


            this.CategoryDic = U.LoadTSVResourcePair((U.ConfigDataFilename("text_category_")));
            this.CategoryListBox.BeginUpdate();
            this.CategoryListBox.Items.Clear();
            foreach (var pair in CategoryDic)
            {
                if (!IsDetail)
                {//詳細テキストじゃないと、移動とロードを出さない.
                    if (IsDetailOnly(pair.Value))
                    {
                        continue;
                    }
                }
                this.CategoryListBox.Items.Add(pair.Key);
            }
            this.CategoryListBox.EndUpdate();
            CategoryListBox.SelectedIndex = 0;

            this.ToolTip = InputFormRef.GetToolTip <TextScriptFormCategorySelectForm>();
        }
Esempio n. 2
0
        void LoadTextEscapeList()
        {
            this.EscapeList = new List <TextEscape>();
            string[] lines = File.ReadAllLines(U.ConfigDataFilename("text_escape_"));
            for (int i = 0; i < lines.Length; i++)
            {
                string line = lines[i];
                if (U.IsComment(line) || U.OtherLangLine(line))
                {
                    continue;
                }
                line = U.ClipComment(line);
                if (line == "")
                {
                    continue;
                }
                string[] sp = line.Split('\t');
                if (sp.Length < 3)
                {
                    continue;
                }
                TextEscape te = new TextEscape();
                te.Code     = sp[0];
                te.Info     = sp[1];
                te.Category = sp[2];

                if (!IsDetail)
                {//詳細テキストじゃないと、移動とロードを出さない.
                    if (IsDetailOnly(te.Category))
                    {
                        continue;
                    }
                }

                this.EscapeList.Add(te);
            }

            //自動改行
            if (PatchUtil.SearchAutoNewLinePatch() == PatchUtil.AutoNewLine_enum.AutoNewLine)
            {
                {
                    TextEscape te = new TextEscape();
                    te.Code     = "@0080@0090";
                    te.Info     = R._("AutoNewLine Conversation Text[ConversationText]");
                    te.Category = "";
                    this.EscapeList.Add(te);
                }
                {
                    TextEscape te = new TextEscape();
                    te.Code     = "@0080@0091";
                    te.Info     = R._("AutoNewLine Battle Text[BattleText]");
                    te.Category = "";
                    this.EscapeList.Add(te);
                }
            }
        }
Esempio n. 3
0
        bool UpdateSelected()
        {
            string text = this.ListBox.Text;

            if (text.Length <= 0)
            {
                return(false);
            }

            foreach (TextEscape script in this.EscapeList)
            {
                if (makeCommandComboText(script) == text)
                {
                    this.Script = script;
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 4
0
        void LoadTextEscapeList()
        {
            this.EscapeList = new List <TextEscape>();
            string[] lines = File.ReadAllLines(U.ConfigDataFilename("text_escape_"));
            for (int i = 0; i < lines.Length; i++)
            {
                string line = lines[i];
                if (U.IsComment(line) || U.OtherLangLine(line))
                {
                    continue;
                }
                line = U.ClipComment(line);
                if (line == "")
                {
                    continue;
                }
                string[] sp = line.Split('\t');
                if (sp.Length < 3)
                {
                    continue;
                }
                TextEscape te = new TextEscape();
                te.Code     = sp[0];
                te.Info     = sp[1];
                te.Category = sp[2];

                if (!IsDetail)
                {//詳細テキストじゃないと、移動とロードを出さない.
                    if (IsDetailOnly(te.Category))
                    {
                        continue;
                    }
                }

                this.EscapeList.Add(te);
            }

            //パッチで追加される新しいエスケープシーケンス
            Program.TextEscape.MargeExstraEscapeList(this.EscapeList);
        }
Esempio n. 5
0
 string makeCommandComboText(TextEscape script)
 {
     return(script.Info + "//" + script.Code);
 }