类 GamepadManager
- java.lang.Object
-
- RelativeLayout
-
- com.tencent.tcrgamepad.GamepadManager
-
public class GamepadManager extends RelativeLayout
初始化
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interface
GamepadManager.OnEditListener
Edit event listener
-
构造器概要
构造器 构造器 说明 GamepadManager(Context context)
GamepadManager(Context context, AttributeSet attrs)
GamepadManager(Context context, AttributeSet attrs, int defStyleAttr)
GamepadManager(Context context, TcrSession session)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
editGamepad(java.lang.String jsonCfg)
Open and edit the virtual key viewboolean
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 delegatevoid
showGamepad(java.lang.String jsonCfg)
Show Virtual Keys viewstatic java.lang.String
version()
-
-
-
构造器详细资料
-
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()
-
setEditListener
public void setEditListener(GamepadManager.OnEditListener listener)
Set virtual key edit event listener,The edited config and saved state will be called back through this listener.- 参数:
listener
- Edit listenerGamepadManager.OnEditListener
-
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
-
-