Exemplo n.º 1
0
        public override string ToString()
        {
            string outString = " " + Name;

            for (; outString.Length < 11;)
            {
                outString += " ";
            }

            string boolsString = "| " + IsDown.ToString();

            for (; boolsString.Length < 12;)
            {
                boolsString += " ";
            }
            outString += boolsString;

            boolsString = "| " + IsUp.ToString();
            for (; boolsString.Length < 12;)
            {
                boolsString += " ";
            }
            outString += boolsString;

            boolsString = "| " + IsPressed.ToString();
            for (; boolsString.Length < 12;)
            {
                boolsString += " ";
            }
            outString += boolsString;


            outString += $"| {IsToggled}";
            return(outString);
        }
Exemplo n.º 2
0
        public override void Draw()
        {
            var position = GetComponent <PositionComponent>();

            Resources.Sprites.Default.Button.Draw(
                IsDown.ToInt(),
                position.Position,
                Resources.Sprites.Default.Button.Origin,
                Vector2.One,
                _rotation,
                Color.White
                );
        }