Beispiel #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);
        }
        /// <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;
        }
        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);
        }
        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);
        }
Beispiel #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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
Beispiel #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);
        }
        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);
            //}
        }
        /// <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);
        }
Beispiel #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);
        }
        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);
        }
        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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
        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);
        }
        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);
        }
        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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
        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);
        }