类 GamepadManager


  • public class GamepadManager
    extends RelativeLayout
    初始化
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void editGamepad​(java.lang.String jsonCfg)
      Open and edit the virtual key view
      boolean needConnected()
      Determine whether to include the button of the gamepad.
      void onSend​(java.lang.String instruction)
      Handle mouse/keyboard/gamepad message and send to server.
      void setEditListener​(GamepadManager.OnEditListener listener)
      Set virtual key edit event listener,The edited config and saved state will be called back through this listener.
      void setGamePadTouchDelegate​(IGamepadTouchDelegate delegate)
      Set touch event delegate
      void showGamepad​(java.lang.String jsonCfg)
      Show Virtual Keys view
      static java.lang.String version()  
      • 从类继承的方法 java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • GamepadManager

        public GamepadManager​(Context context,
                              TcrSession session)
      • GamepadManager

        public GamepadManager​(Context context)
      • GamepadManager

        public GamepadManager​(Context context,
                              AttributeSet attrs)
      • GamepadManager

        public GamepadManager​(Context context,
                              AttributeSet attrs,
                              int defStyleAttr)
    • 方法详细资料

      • version

        public static java.lang.String version()
      • showGamepad

        public void showGamepad​(java.lang.String jsonCfg)
        Show Virtual Keys view
        参数:
        jsonCfg - configuration file string.
      • needConnected

        public boolean needConnected()
        Determine whether to include the button of the gamepad.
        返回:
        `true`:contain, need invoke Gamepad#connectGamepad()
        `false`: does not contain,do nothing
      • editGamepad

        public void editGamepad​(java.lang.String jsonCfg)
        Open and edit the virtual key view
        参数:
        jsonCfg - configuration file
      • setGamePadTouchDelegate

        public void setGamePadTouchDelegate​(IGamepadTouchDelegate delegate)
        Set touch event delegate
        参数:
        delegate - IGamepadTouchDelegate
      • onSend

        public void onSend​(java.lang.String instruction)
        Handle mouse/keyboard/gamepad message and send to server.
        参数:
        instruction - mouse/keyboard/gamepad message