Package net.openosrs.api.input
Class InputSettings
- java.lang.Object
-
- net.openosrs.api.input.InputSettings
-
@Singleton public class InputSettings extends java.lang.ObjectRuntime input preferences, shared by the router and the settings panel.Held as atomics rather than plain fields because the settings panel writes from the Swing thread while the router reads from the client thread. Nothing here is persisted: the panel owns persistence and pushes values in on load.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SPEEDstatic intMAX_SPEEDstatic intMIN_SPEEDSlowest through fastest.
-
Constructor Summary
Constructors Constructor Description InputSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAfkChance()InputModegetDefaultMode()Mode used when noInputScopeis pinned on the calling thread.doublegetMissClickChance()java.lang.StringgetProfileName()intgetSpeed()booleanisBlockRealInput()Consume real mouse and keyboard events so they cannot disturb a plan in flight.booleanisCameraAssistEnabled()booleanisFallbackToPackets()Whether a cursor request that cannot be served should fall back to the native pipeline.booleanisFocusSimulationEnabled()booleanisHumanMouseEnabled()booleanisIdleBehaviourEnabled()booleanisLearnMode()booleanisPreHoverEnabled()booleanisShowDashboard()booleanisZoomAssistEnabled()voidsetAfkChance(int percent)voidsetBlockRealInput(boolean blocked)voidsetCameraAssistEnabled(boolean enabled)voidsetDefaultMode(InputMode mode)voidsetFallbackToPackets(boolean fallback)voidsetFocusSimulationEnabled(boolean enabled)voidsetHumanMouseEnabled(boolean enabled)voidsetIdleBehaviourEnabled(boolean enabled)voidsetLearnMode(boolean enabled)voidsetMissClickChance(int tenthsOfPercent)voidsetPreHoverEnabled(boolean enabled)voidsetProfileName(java.lang.String name)voidsetShowDashboard(boolean enabled)voidsetSpeed(int value)voidsetZoomAssistEnabled(boolean enabled)
-
-
-
Field Detail
-
MIN_SPEED
public static final int MIN_SPEED
Slowest through fastest. Scales movement duration, not accuracy.- See Also:
- Constant Field Values
-
MAX_SPEED
public static final int MAX_SPEED
- See Also:
- Constant Field Values
-
DEFAULT_SPEED
public static final int DEFAULT_SPEED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultMode
public InputMode getDefaultMode()
Mode used when noInputScopeis pinned on the calling thread.
-
setDefaultMode
public void setDefaultMode(InputMode mode)
-
isHumanMouseEnabled
public boolean isHumanMouseEnabled()
-
setHumanMouseEnabled
public void setHumanMouseEnabled(boolean enabled)
-
isFallbackToPackets
public boolean isFallbackToPackets()
Whether a cursor request that cannot be served should fall back to the native pipeline. Turning this off makes failures visible instead of silently producing a different kind of interaction, which is what you want while tuning a profile.
-
setFallbackToPackets
public void setFallbackToPackets(boolean fallback)
-
isIdleBehaviourEnabled
public boolean isIdleBehaviourEnabled()
-
setIdleBehaviourEnabled
public void setIdleBehaviourEnabled(boolean enabled)
-
isFocusSimulationEnabled
public boolean isFocusSimulationEnabled()
-
setFocusSimulationEnabled
public void setFocusSimulationEnabled(boolean enabled)
-
isBlockRealInput
public boolean isBlockRealInput()
Consume real mouse and keyboard events so they cannot disturb a plan in flight.
-
setBlockRealInput
public void setBlockRealInput(boolean blocked)
-
isCameraAssistEnabled
public boolean isCameraAssistEnabled()
-
setCameraAssistEnabled
public void setCameraAssistEnabled(boolean enabled)
-
isZoomAssistEnabled
public boolean isZoomAssistEnabled()
-
setZoomAssistEnabled
public void setZoomAssistEnabled(boolean enabled)
-
getSpeed
public int getSpeed()
-
setSpeed
public void setSpeed(int value)
-
getProfileName
public java.lang.String getProfileName()
-
setProfileName
public void setProfileName(java.lang.String name)
-
isLearnMode
public boolean isLearnMode()
-
setLearnMode
public void setLearnMode(boolean enabled)
-
isShowDashboard
public boolean isShowDashboard()
-
setShowDashboard
public void setShowDashboard(boolean enabled)
-
getMissClickChance
public double getMissClickChance()
-
setMissClickChance
public void setMissClickChance(int tenthsOfPercent)
-
getAfkChance
public int getAfkChance()
-
setAfkChance
public void setAfkChance(int percent)
-
isPreHoverEnabled
public boolean isPreHoverEnabled()
-
setPreHoverEnabled
public void setPreHoverEnabled(boolean enabled)
-
-