ManicDigger.Hud.HudInventory.OnKeyPress C# (CSharp) Method

OnKeyPress() public method

public OnKeyPress ( KeyPressEventArgs e ) : void
e OpenTK.KeyPressEventArgs
return void
        public void OnKeyPress(KeyPressEventArgs e)
        {
            if (char.IsDigit(e.KeyChar))
            {
                ActiveMaterial.ActiveMaterial = int.Parse("" + e.KeyChar) - 1;
                if (ActiveMaterial.ActiveMaterial == -1) { ActiveMaterial.ActiveMaterial = 9; }
            }
        }