Example #1
0
        public Dialog()
        {
            Acts qwe = new Acts("", del = () => { });

            nullList.Insert(0, qwe);
            TabAction = new Acts("-----Show more-----", del = () => { Next = Next == GlobalProperties.GetInfoHeight() - 4 ? 0 : GlobalProperties.GetInfoHeight() - 4; });
        }
Example #2
0
        public void DrawDialog(string Text) //Вывод диалога
        {
            if (Program.mainDialog.Actions != null && Program.mainDialog.Actions != Program.mainDialog.prevActions)
            {
                int Next = Program.mainDialog.Next;
                ClearInfoField();
                Console.SetCursorPosition(0, 2);
                Console.WriteLine(Text);

                if (Program.mainDialog.Actions.Count() < 5)
                {
                    Next = 0;
                }

                if (Program.mainDialog.Actions.Count() > 0)
                {
                    for (int i = 1 + Next; i <= Math.Min(Program.mainDialog.Actions.Count(), Next + GlobalProperties.GetInfoHeight() - 4); i++)
                    {
                        if (Program.mainDialog.Actions[i - 1].ActInfo != "")
                        {
                            Console.WriteLine("" + i + ". " + Program.mainDialog.Actions[i - 1].ActInfo);
                        }
                    }
                    if (Program.mainDialog.Actions.Count() >= 5)
                    {
                        Console.WriteLine("Tab. " + Program.mainDialog.TabAction.ActInfo);
                    }

                    Program.mainDialog.prevActions = Program.mainDialog.Actions;
                }
            }
        }