コード例 #1
0
ファイル: Menu.cs プロジェクト: Muph0/hunger-games-simulator
        public bool StringSetting(int index, ConsoleKeyInfo key, int length, ref string val)
        {
            string oldval = val;

            if (Selected == index)
            {
                if (key.Key == ConsoleKey.Enter)
                {
                    if (this.fillBackround)
                    {
                        buffer.BackgroundColor = this.SelectedColor;
                    }
                    buffer.SetCursorPosition(this.X + width + 2, this.Y + Selected);
                    //ConsoleBuffer.SendKeys(oldval.ToString());
                    val = buffer.ReadLineAlingRight(length, oldval);
                    buffer.ResetColor();
                }
            }

            return(val != oldval);
        }