Disable Inputs
Hierarchy
-
Feature
↳
DisableInputs
Methods
areInputsEnabled
▸ areInputsEnabled(): boolean
Helper function to check if the ISCFeature.DISABLE_INPUTS
feature is turned on in some
capacity.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Returns
boolean
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:123
enableAllInputs
▸ enableAllInputs(key
): void
Helper function to enable all inputs. Use this function to set things back to normal after having used one of the other helper functions to disable inputs.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:144
disableInputs
▸ disableInputs(key
, ...buttonActions
): void
Helper function to disable specific inputs, like opening the console.
This function is variadic, meaning that you can specify as many inputs as you want to disable.
(To disable all inputs, see the disableAllInputs
function.
Use the enableAllInputs
helper function to set things back to normal.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
...buttonActions | readonly ButtonAction [] | An array of the actions to action. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:167
disableAllInputs
▸ disableAllInputs(key
): void
Helper function to disable all inputs. This is useful because EntityPlayer.ControlsEnabled
can be changed by the game under certain conditions.
Use the enableAllInputs
helper function to set things back to normal.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:190
enableAllInputsExceptFor
▸ enableAllInputsExceptFor(key
, blacklist
): void
Helper function to enable all inputs besides the ones provided. This is useful because
EntityPlayer.ControlsEnabled
can be changed by the game under certain conditions.
Use the enableAllInputs
helper function to set things back to normal.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
blacklist | ReadonlySet <ButtonAction > | A set of ButtonActions to disallow. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:211
disableAllInputsExceptFor
▸ disableAllInputsExceptFor(key
, whitelist
): void
Helper function to disable all inputs besides the ones provided. This is useful because
EntityPlayer.ControlsEnabled
can be changed by the game under certain conditions.
Use the enableAllInputs
helper function to set things back to normal.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
whitelist | ReadonlySet <ButtonAction > | A set of ButtonActions to allow. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:235
disableMovementInputs
▸ disableMovementInputs(key
): void
Helper function to disable only the inputs used for moving the character (or moving the cursor
in the UI). This is useful because EntityPlayer.ControlsEnabled
can be changed by the game
under certain conditions.
Use the enableAllInputs
helper function to set things back to normal.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:259
disableShootingInputs
▸ disableShootingInputs(key
): void
Helper function to disable only the inputs used for shooting tears. This is useful because
EntityPlayer.ControlsEnabled
can be changed by the game under certain conditions.
Use the enableAllInputs
helper function to set things back to normal.
In order to use this function, you must upgrade your mod with ISCFeature.DISABLE_INPUTS
.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the mod feature that is requesting the enable/disable. For example, if this was part of the code for a custom enemy called "Super Gaper", then you could use a key of "SuperGaper". The name is necessary so that multiple mod features can work in tandem. |
Returns
void
Defined in
packages/isaacscript-common/src/classes/features/other/DisableInputs.ts:278