func (c *gamepadConfig) ButtonName(b virtualGamepadButton) string {
	if !c.gamepadIDInitialized {
		panic("not reached")
	}

	c.initializeIfNeeded()

	bb, ok := c.buttons[b]
	if ok {
		return fmt.Sprintf("Button %d", bb)
	}

	a, ok := c.axes[b]
	if ok {
		if a.positive {
			return fmt.Sprintf("Axis %d+", a.id)
		} else {
			return fmt.Sprintf("Axis %d-", a.id)
		}
	}

	return ""
}
func (c *gamepadConfig) ButtonName(b virtualGamepadButton) string {
	if !c.gamepadIDInitialized {
		panic("not reached")
	}

	c.initializeIfNeeded()

	bb, ok := c.buttons[b]
	if ok {
		return fmt.Sprintf("Button %d", bb)
	}

	a, ok := c.axes[b]
	if ok {
		if a.positive {
			return fmt.Sprintf("Axis %d+", a.id)
		} else {
			return fmt.Sprintf("Axis %d-", a.id)
		}
	}

	return ""
}
func ( c * gamepadConfig ) ButtonName ( b virtualGamepadButton ) string { if ! c . gamepadIDInitialized { panic ( " " ) } c . initializeIfNeeded ( ) bb , ok := c . buttons [ b ] if ok { return fmt . Sprintf ( " " , bb ) } a , ok := c . axes [ b ] if ok { if a . positive { return fmt . Sprintf ( " " , a . id ) } else { return fmt . Sprintf ( " " , a . id ) } } return " " }
// Name returns the pysical button's name for the given virtual button.
Name returns the pysical button s name for the given virtual button .