Ejemplo n.º 1
0
        private void AddAbilities()
        {
            var textButtonStyle = new ImageButtonStyle
            {
                Up             = new PrimitiveDrawable(Color.DarkGray, 6, 2),
                Over           = new PrimitiveDrawable(Color.DarkGray),
                Down           = new PrimitiveDrawable(Color.DarkGray),
                PressedOffsetX = 0,
                PressedOffsetY = 0
            };

            foreach (var keybinds in KeyBindContainer.KeyBinds)
            {
                ImageButton button = new ImageButton(textButtonStyle);
                button.SetTouchable(Touchable.Enabled);
                button.Add(new Label(keybinds.BindedKey.ToString()).SetPosition(24 / 2, 24 / 2));
                button.Row();
                button.Add(new Label(keybinds.GetAbility().AbilityName).SetPosition(24 / 2, 24));
                Add(button).Size(24, 24).Pad(5);
            }
        }