Class: DewInput
- Namespace:
Global - Assembly:
Dew.Core.dll
public static class DewInputFields
| Name | Declaration | Description |
|---|---|---|
ModifierKeys | public static readonly List<Key> ModifierKeys | |
NameToMouseButton | public static readonly IReadOnlyDictionary<string, MouseButton> NameToMouseButton | |
onCurrentModeChanged | public static SafeAction<InputMode, InputMode> onCurrentModeChanged |
Properties
| Name | Declaration | Description |
|---|---|---|
controllerButtonType | public static ControllerButtonType controllerButtonType { get; } | |
currentMode | public static InputMode currentMode { get; } |
Methods
GetButton(DewBinding, bool)
public static bool GetButton(DewBinding b, bool checkGameAreaForMouse)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
checkGameAreaForMouse | bool |
Returns: bool
GetButton(MouseButton, bool)
public static bool GetButton(MouseButton m, bool checkGameArea)Parameters:
| Name | Type | Description |
|---|---|---|
m | MouseButton | |
checkGameArea | bool |
Returns: bool
GetButton(GamepadButtonEx?)
public static bool GetButton(GamepadButtonEx? g)Parameters:
| Name | Type | Description |
|---|---|---|
g | GamepadButtonEx? |
Returns: bool
GetButton(Key)
public static bool GetButton(Key k)Parameters:
| Name | Type | Description |
|---|---|---|
k | UnityEngine.InputSystem.Key |
Returns: bool
GetButtonDown(DewBinding, bool)
public static bool GetButtonDown(DewBinding b, bool checkGameAreaForMouse)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
checkGameAreaForMouse | bool |
Returns: bool
GetButtonDown(MouseButton, bool)
public static bool GetButtonDown(MouseButton m, bool checkGameArea)Parameters:
| Name | Type | Description |
|---|---|---|
m | MouseButton | |
checkGameArea | bool |
Returns: bool
GetButtonDown(GamepadButtonEx?)
public static bool GetButtonDown(GamepadButtonEx? g)Parameters:
| Name | Type | Description |
|---|---|---|
g | GamepadButtonEx? |
Returns: bool
GetButtonDown(Key)
public static bool GetButtonDown(Key k)Parameters:
| Name | Type | Description |
|---|---|---|
k | UnityEngine.InputSystem.Key |
Returns: bool
GetButtonDownAnyGamepad()
public static bool GetButtonDownAnyGamepad()Returns: bool
GetButtonDownAnyKey()
public static bool GetButtonDownAnyKey()Returns: bool
GetButtonDownAnyMouse()
public static bool GetButtonDownAnyMouse()Returns: bool
GetButtonUp(DewBinding, bool)
public static bool GetButtonUp(DewBinding b, bool checkGameAreaForMouse)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
checkGameAreaForMouse | bool |
Returns: bool
GetButtonUp(MouseButton, bool)
public static bool GetButtonUp(MouseButton m, bool checkGameArea)Parameters:
| Name | Type | Description |
|---|---|---|
m | MouseButton | |
checkGameArea | bool |
Returns: bool
GetButtonUp(GamepadButtonEx?)
public static bool GetButtonUp(GamepadButtonEx? g)Parameters:
| Name | Type | Description |
|---|---|---|
g | GamepadButtonEx? |
Returns: bool
GetButtonUp(Key)
public static bool GetButtonUp(Key k)Parameters:
| Name | Type | Description |
|---|---|---|
k | UnityEngine.InputSystem.Key |
Returns: bool
GetLeftJoystick()
Magnitude will be full range of 0 ~ 1 regardless of dead zone settings. Returns Vector2.zero if under dead zone.
public static Vector2 GetLeftJoystick()Returns: UnityEngine.Vector2
GetReadableTextForCurrentMode(DewBinding, out BindingType)
public static string GetReadableTextForCurrentMode(DewBinding b, out BindingType type)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
type | BindingType |
Returns: string
GetReadableTextForCurrentMode(DewBinding)
public static string GetReadableTextForCurrentMode(DewBinding b)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding |
Returns: string
GetReadableTextOfGamepad(DewBinding, out BindingType)
public static string GetReadableTextOfGamepad(DewBinding b, out BindingType type)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
type | BindingType |
Returns: string
GetReadableTextOfGamepad(DewBinding)
public static string GetReadableTextOfGamepad(DewBinding b)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding |
Returns: string
GetReadableTextOfPC(DewBinding, out BindingType, int)
public static string GetReadableTextOfPC(DewBinding b, out BindingType type, int i = 0)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
type | BindingType | |
i | int |
Returns: string
GetReadableTextOfPC(DewBinding, int)
public static string GetReadableTextOfPC(DewBinding b, int i = 0)Parameters:
| Name | Type | Description |
|---|---|---|
b | DewBinding | |
i | int |
Returns: string
GetRightJoystick()
Magnitude will be full range of 0 ~ 1 regardless of dead zone settings. Returns Vector2.zero if under dead zone.
public static Vector2 GetRightJoystick()Returns: UnityEngine.Vector2
IsGameRelatedMouseInputValid(MouseButton)
public static bool IsGameRelatedMouseInputValid(MouseButton button)Parameters:
| Name | Type | Description |
|---|---|---|
button | MouseButton |
Returns: bool
ListenAnyButtonRaw(Object, Func<InputControl, bool>)
Return true in callback to stop listening.
public static void ListenAnyButtonRaw(Object caller, Func<InputControl, bool> callback)Parameters:
| Name | Type | Description |
|---|---|---|
caller | UnityEngine.Object | |
callback | System.Func<T, TResult><InputControl,bool> |
SetInputMode(InputMode)
public static void SetInputMode(InputMode mode)Parameters:
| Name | Type | Description |
|---|---|---|
mode | InputMode |
StopListenAnyButton()
public static void StopListenAnyButton()