コード例 #1
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list      = new List <TreeNode>();
            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            if (Dialog != null && Dialog.Messages != null && Dialog.Messages.Count > 0)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_GREEN, "Show");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " message: ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Dialog.Messages[0].Text + "...");

                node.Text        = TextColor.GetJsonisedObject();
                node.ToolTipText = "Show message: ";
                foreach (VO_Message message in Dialog.Messages)
                {
                    node.ToolTipText += "\r\n" + message.Text;
                }
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_GREEN, "Show");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " message: EMPTY");
                node.Text = TextColor.GetJsonisedObject();
            }
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #2
0
        /// <summary>
        /// Met en place le string du If
        /// </summary>
        private void MakeScriptString(TreeViewColorTool TextColor)
        {
            if (UseButton)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "< Button: ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, GameCore.Instance.GetTriggerById(Button).Title);
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " is ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Convert.ToString(ButtonValue));
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " >");
            }
            if (UseVariable)
            {
                if (VariableValue.VariableValue == Guid.Empty)
                {
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "< Variable: ");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, GameCore.Instance.GetVariableById(Variable).Title);
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " is ");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Operator.ToString());
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, " " + VariableValue.IntValue);
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " >");
                }
                else
                {
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "< Variable: ");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, GameCore.Instance.GetVariableById(Variable).Title);
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " is ");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Operator.ToString());
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, " " + GameCore.Instance.GetVariableById(VariableValue.VariableValue).Title);
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " >");
                }
            }

            return;
        }
コード例 #3
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list      = new List <TreeNode>();
            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Focus");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " camera on animation ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetStageAnimation(Animation).Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ", ");

            if (UseImmediately)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "immediately.");
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "with a speed of ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Convert.ToString(Speed));
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ".");
            }
            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #4
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();
            TreeNode        node = new TreeNode();

            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[Current Character]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " to ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetPlayableCharacterById(Character).Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ",");

            if (UseOldCoords)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Old position");
            }
            else
            {
                VO_Stage stage = GameCore.Instance.GetStageById(Coords.Map);
                if (stage != null)
                {
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Position: ");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + stage.Title + "]");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ", ");
                    TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Coords.Location.ToString());
                }
            }
            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #5
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            string activated = "deactivated";

            if (Loop)
            {
                activated = "activated";
            }

            VO_PlayableCharacter playableCharacter = GameCore.Instance.GetPlayableCharacterById(Character);

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " player ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + playableCharacter.Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " animation of type ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + AnimationType.GetDescription() + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " to ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetCharAnimationById(playableCharacter.CharacterId, Animation).Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ", loop ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + activated + "]");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #6
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            if (SecondsToWait.VariableValue == Guid.Empty)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_RED, "Wait");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " for ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, SecondsToWait.IntValue.ToString());
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " second(s)");
                node.Text = TextColor.GetJsonisedObject();
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_RED, "Wait");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " for ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetVariableById(SecondsToWait.VariableValue).Title + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " value");

                node.Text = TextColor.GetJsonisedObject();
            }
            node.Name = code;
            node.Tag  = this;

            list.Add(node);

            return(list);
        }
コード例 #7
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            if (Value.VariableValue == Guid.Empty)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Operator.GetDescription());
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, " " + Convert.ToString(Value.IntValue));
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " on ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetVariableById(Variable).Title + "]");

                node.Text = TextColor.GetJsonisedObject();
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Operator.GetDescription());
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, " [" + GameCore.Instance.GetVariableById(Value.VariableValue).Title + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " on ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetVariableById(Variable).Title + "]");

                node.Text = TextColor.GetJsonisedObject();
            }
            node.Name = code;
            node.Tag  = this;

            list.Add(node);

            return(list);
        }
コード例 #8
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            if (FreeAll == true)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Free all Animations of Character ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetStageCharacter(Character).Title + "]");
                node.Text = TextColor.GetJsonisedObject();
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Free Animation ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + AnimationType.GetDescription() + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " of Character ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetStageCharacter(Character).Title + "]");

                node.Text = TextColor.GetJsonisedObject();
            }
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #9
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          ifCondition = new TreeNode();
            TreeViewColorTool TextColor   = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "Loop");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " (");
            MakeScriptString(TextColor);
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ")");

            ifCondition.Text = TextColor.GetJsonisedObject();
            ifCondition.Name = code;
            ifCondition.Tag  = this;
            foreach (IScriptable line in WhileSubLines)
            {
                line.Valid = line.IsScriptValid();
                List <TreeNode> nodes = line.RenderInScriptManager("while");
                foreach (TreeNode node in nodes)
                {
                    ifCondition.Nodes.Add(node);
                }
            }
            ifCondition.Nodes.Add("while", "...");

            list.Add(ifCondition);
            return(list);
        }
コード例 #10
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_GREEN, "Add");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Action ");

            if (CharacterId == new Guid(GlobalConstants.CURRENT_PLAYER_ID))
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetActionById(ActionId).Title + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " to this Character ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[Current Player]");
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetActionById(ActionId).Title + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " to this Character ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetPlayableCharacterById(CharacterId).Title + "]");
            }

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #11
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Trigger ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetTriggerById(Button).Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " is ");

            if (IsActive == true)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_GREEN, "Enabled");
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_RED, "Disabled");
            }

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;

            list.Add(node);

            return(list);
        }
コード例 #12
0
        void RenderSpecialNode(object sender, DrawTreeNodeEventArgs e)
        {
            List <string[]> TextColorList = null;

            if (e.Node.Text == String.Empty || e.Node.Text[0] != '{')
            {
                string[] Simple = new string[2];
                Simple[0] = GlobalConstants.TREEVIEW_BLACK;
                Simple[1] = e.Node.Text;

                TextColorList = new List <string[]>();
                TextColorList.Add(Simple);
            }
            else
            {
                Stream ColorStream = new MemoryStream();
                byte[] StreamByte  = Encoding.Unicode.GetBytes(e.Node.Text);

                ColorStream.Write(StreamByte, 0, StreamByte.Length);
                ColorStream.Seek(0, SeekOrigin.Begin);

                DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(TreeViewColorTool));

                TreeViewColorTool Instance = (TreeViewColorTool)ser.ReadObject(ColorStream);
                TextColorList = Instance.TextColorList;
            }

            string BuildedString = string.Empty;
            Point  newst         = e.Bounds.Location;

            VO_Line CurrentLine = (VO_Line)e.Node.Tag;

            foreach (string[] CurrentText in TextColorList)
            {
                #region Si le VO_Line n'est pas valide, alors remplacer le texte en rouge

                if (CurrentLine != null && CurrentLine.Valid == false)
                {
                    CurrentText[0] = GlobalConstants.TREEVIEW_RED;
                }

                #endregion

                e.Graphics.DrawString(CurrentText[1], new Font(this.Font, FontStyle.Regular), new SolidBrush(ColorTranslator.FromHtml(CurrentText[0])), newst);
                BuildedString += CurrentText[1];
                newst.X        = newst.X + (int)e.Graphics.MeasureString(CurrentText[1], new Font(this.Font, FontStyle.Regular)).Width;
            }

            e.Node.ToolTipText = BuildedString;

            //e.Graphics.DrawString(s[0], new Font("Arial", 10f), Brushes.Red, e.Bounds.Location);
            //if (s.Length > 1)
            //{
            //    Point newst = e.Bounds.Location;
            //    newst.X = newst.X + (int)e.Graphics.MeasureString(s[0], new Font("Arial", 10f)).Width;
            //    e.Graphics.DrawString(s[1], new Font("Arial", 10f), Brushes.Green, newst);
            //}
        }
コード例 #13
0
        /// <summary>
        /// Ecris les lignes du treenode
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          ifCondition = new TreeNode();
            TreeViewColorTool TextColor   = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "If");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " (");
            MakeScriptString(TextColor);
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ")");

            ifCondition.Text = TextColor.GetJsonisedObject();
            ifCondition.Name = code;
            ifCondition.Tag  = this;
            if (ifCondition.IsExpanded == false)
            {
                foreach (IScriptable line in IfSubLines)
                {
                    line.Valid = line.IsScriptValid();
                    List <TreeNode> nodes = line.RenderInScriptManager("if");
                    foreach (TreeNode node in nodes)
                    {
                        ifCondition.Nodes.Add(node);
                    }
                }

                ifCondition.Nodes.Add("if", "...");
            }
            TreeNode          elseCondition = new TreeNode();
            TreeViewColorTool ElseColor     = new TreeViewColorTool();

            ElseColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "Else");

            elseCondition.Text = ElseColor.GetJsonisedObject();
            elseCondition.Name = code;
            elseCondition.Tag  = this;
            if (elseCondition.IsExpanded == false)
            {
                foreach (IScriptable line in ElseSubLines)
                {
                    line.Valid = line.IsScriptValid();
                    List <TreeNode> nodes = line.RenderInScriptManager("else");
                    foreach (TreeNode node in nodes)
                    {
                        elseCondition.Nodes.Add(node);
                    }
                }
                elseCondition.Nodes.Add("else", "...");
            }
            list.Add(ifCondition);
            list.Add(elseCondition);
            return(list);
        }
コード例 #14
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list      = new List <TreeNode>();
            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Go to Title Screen");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #15
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list      = new List <TreeNode>();
            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Music Frequency to ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Frequency + "%");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #16
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Call");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " global event ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetGlobalEventById(GlobalEvent).Title + "]");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #17
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Look forward");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " player ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetStageCharacter(Character).Title + "]");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #18
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list         = new List <TreeNode>();
            TreeNode          mainNode     = new TreeNode();
            TreeViewColorTool MainTreeNode = new TreeViewColorTool();

            MainTreeNode.AddNewColorAndText(GlobalConstants.TREEVIEW_GREEN, "Show");
            MainTreeNode.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " choices...");

            mainNode.Name = code;
            mainNode.Text = MainTreeNode.GetJsonisedObject();
            mainNode.Tag  = this;

            int i = 1;

            foreach (VO_LineChoices choice in Choices)
            {
                TreeNode          choiceNode = new TreeNode();
                TreeViewColorTool TextColor  = new TreeViewColorTool();

                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Choice ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Convert.ToString(i));
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, ": ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, choice.Choice);

                choiceNode.Name = code;
                choiceNode.Text = TextColor.GetJsonisedObject();
                choiceNode.Tag  = this;
                foreach (IScriptable line in choice.SubLines)
                {
                    line.Valid = line.IsScriptValid();
                    List <TreeNode> nodes = line.RenderInScriptManager((i - 1).ToString());
                    foreach (TreeNode node in nodes)
                    {
                        choiceNode.Nodes.Add(node);
                    }
                }
                choiceNode.Nodes.Add((i - 1).ToString(), "...");
                mainNode.Nodes.Add(choiceNode);
                i++;
            }

            list.Add(mainNode);
            return(list);
        }
コード例 #19
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list      = new List <TreeNode>();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TreeNode node = new TreeNode();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[Current player]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " direction: ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Direction.GetDescription());

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #20
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, "Player will move there: ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Coords.ToString());

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;

            list.Add(node);

            return(list);
        }
コード例 #21
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " player ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetPlayableCharacterById(CharacterId).Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " speed to ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Convert.ToString(Speed.IntValue) + "%");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #22
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            String MinValueStr = String.Empty;
            String MaxValueStr = String.Empty;

            if (MinValue.VariableValue == Guid.Empty)
            {
                MinValueStr = MinValue.IntValue.ToString();
            }
            else
            {
                MinValueStr = "[" + GameCore.Instance.GetVariableById(MinValue.VariableValue).Title + "]";
            }

            if (MaxValue.VariableValue == Guid.Empty)
            {
                MaxValueStr = MaxValue.IntValue.ToString();
            }
            else
            {
                MaxValueStr = "[" + GameCore.Instance.GetVariableById(MaxValue.VariableValue).Title + "]";
            }

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, GameCore.Instance.GetVariableById(Variable).Title);
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " will be Random between ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, MinValueStr);
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " and ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, MaxValueStr);

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;

            list.Add(node);

            return(list);
        }
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode>   list      = new List <TreeNode>();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            TreeNode node = new TreeNode();

            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, "Change");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Character ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetStageCharacter(Character).Title + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Animation ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + AnimationType.GetDescription() + "]");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Frequency to ");
            TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Frequency.IntValue + "%");

            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #24
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            String CurrentPlayer;

            if (Character == new Guid(GlobalConstants.CURRENT_PLAYER_ID))
            {
                CurrentPlayer = "Current Player";
            }
            else
            {
                CurrentPlayer = GameCore.Instance.GetPlayableCharacterById(Character).Title;
            }
            if (FreezeAll == true)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_RED, "Freeze");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " all Animations of Player ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + CurrentPlayer + "]");

                node.Text = TextColor.GetJsonisedObject();
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_RED, "Freeze");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Animation ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + AnimationType.GetDescription() + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " of Player ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + CurrentPlayer + "]");

                node.Text = TextColor.GetJsonisedObject();
            }
            node.Name = code;
            node.Tag  = this;
            list.Add(node);
            return(list);
        }
コード例 #25
0
        public List <TreeNode> RenderInScriptManager(string code)
        {
            List <TreeNode> list = new List <TreeNode>();

            TreeNode          node      = new TreeNode();
            TreeViewColorTool TextColor = new TreeViewColorTool();

            String PlayerName;

            if (CharacterId == new Guid(GlobalConstants.CURRENT_PLAYER_ID))
            {
                PlayerName = "Current Player";
            }
            else
            {
                PlayerName = GameCore.Instance.GetPlayableCharacterById(CharacterId).Title;
            }

            if (Value.VariableValue == Guid.Empty)
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Operator.GetDescription() + " ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, Convert.ToString(Value.IntValue));
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Max HP on ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + PlayerName + "]");
            }
            else
            {
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_ORANGE, Operator.GetDescription() + " ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + GameCore.Instance.GetVariableById(Value.VariableValue).Title + "]");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLACK, " Max HP on ");
                TextColor.AddNewColorAndText(GlobalConstants.TREEVIEW_BLUE, "[" + PlayerName + "]");
            }
            node.Text = TextColor.GetJsonisedObject();
            node.Name = code;
            node.Tag  = this;

            list.Add(node);

            return(list);
        }