Barotrauma Client Doc
Barotrauma.PlayerInput Class Reference

Static Public Member Functions

static bool MouseButtonsSwapped ()
 
static bool PrimaryMouseButtonHeld ()
 
static bool PrimaryMouseButtonDown ()
 
static bool PrimaryMouseButtonReleased ()
 
static bool PrimaryMouseButtonClicked ()
 
static bool SecondaryMouseButtonHeld ()
 
static bool SecondaryMouseButtonDown ()
 
static bool SecondaryMouseButtonReleased ()
 
static bool SecondaryMouseButtonClicked ()
 
static bool MidButtonClicked ()
 
static bool MidButtonHeld ()
 
static bool Mouse4ButtonClicked ()
 
static bool Mouse4ButtonHeld ()
 
static bool Mouse5ButtonClicked ()
 
static bool Mouse5ButtonHeld ()
 
static bool MouseWheelUpClicked ()
 
static bool MouseWheelDownClicked ()
 
static bool DoubleClicked ()
 
static bool KeyHit (InputType inputType)
 
static bool KeyDown (InputType inputType)
 
static bool KeyUp (InputType inputType)
 
static bool KeyHit (Keys button)
 
static bool InventoryKeyHit (int index)
 
static bool KeyDown (Keys button)
 
static bool KeyUp (Keys button)
 
static bool IsShiftDown ()
 
static bool IsCtrlDown ()
 
static bool IsAltDown ()
 
static void Update (double deltaTime)
 
static void UpdateVariable ()
 

Static Public Attributes

static readonly List< Keys > NumberKeys = new List<Keys> { Keys.D0, Keys.D1, Keys.D2, Keys.D3, Keys.D4, Keys.D5, Keys.D6, Keys.D7, Keys.D8, Keys.D9 }
 
static readonly LocalizedString PrimaryMouseLabel = TextManager.Get($"Input.{(!MouseButtonsSwapped() ? "Left" : "Right")}Mouse")
 
static readonly LocalizedString SecondaryMouseLabel = TextManager.Get($"Input.{(!MouseButtonsSwapped() ? "Right" : "Left")}Mouse")
 

Properties

static float MaxDoubleClickDistance [get]
 
static Vector2 MousePosition [get]
 
static Vector2 LatestMousePosition [get]
 
static bool MouseInsideWindow [get]
 
static Vector2? MouseSpeed [get]
 
static Vector2 MouseSpeedPerSecond [get]
 
static KeyboardState GetKeyboardState [get]
 
static KeyboardState GetOldKeyboardState [get]
 
static int? ScrollWheelSpeed [get]
 

Detailed Description

Member Function Documentation

◆ DoubleClicked()

static bool Barotrauma.PlayerInput.DoubleClicked ( )
static

◆ InventoryKeyHit()

static bool Barotrauma.PlayerInput.InventoryKeyHit ( int  index)
static

◆ IsAltDown()

static bool Barotrauma.PlayerInput.IsAltDown ( )
static

◆ IsCtrlDown()

static bool Barotrauma.PlayerInput.IsCtrlDown ( )
static

◆ IsShiftDown()

static bool Barotrauma.PlayerInput.IsShiftDown ( )
static

◆ KeyDown() [1/2]

static bool Barotrauma.PlayerInput.KeyDown ( InputType  inputType)
static

◆ KeyDown() [2/2]

static bool Barotrauma.PlayerInput.KeyDown ( Keys  button)
static

◆ KeyHit() [1/2]

static bool Barotrauma.PlayerInput.KeyHit ( InputType  inputType)
static

◆ KeyHit() [2/2]

static bool Barotrauma.PlayerInput.KeyHit ( Keys  button)
static

◆ KeyUp() [1/2]

static bool Barotrauma.PlayerInput.KeyUp ( InputType  inputType)
static

◆ KeyUp() [2/2]

static bool Barotrauma.PlayerInput.KeyUp ( Keys  button)
static

◆ MidButtonClicked()

static bool Barotrauma.PlayerInput.MidButtonClicked ( )
static

◆ MidButtonHeld()

static bool Barotrauma.PlayerInput.MidButtonHeld ( )
static

◆ Mouse4ButtonClicked()

static bool Barotrauma.PlayerInput.Mouse4ButtonClicked ( )
static

◆ Mouse4ButtonHeld()

static bool Barotrauma.PlayerInput.Mouse4ButtonHeld ( )
static

◆ Mouse5ButtonClicked()

static bool Barotrauma.PlayerInput.Mouse5ButtonClicked ( )
static

◆ Mouse5ButtonHeld()

static bool Barotrauma.PlayerInput.Mouse5ButtonHeld ( )
static

◆ MouseButtonsSwapped()

static bool Barotrauma.PlayerInput.MouseButtonsSwapped ( )
static

◆ MouseWheelDownClicked()

static bool Barotrauma.PlayerInput.MouseWheelDownClicked ( )
static

◆ MouseWheelUpClicked()

static bool Barotrauma.PlayerInput.MouseWheelUpClicked ( )
static

◆ PrimaryMouseButtonClicked()

static bool Barotrauma.PlayerInput.PrimaryMouseButtonClicked ( )
static

◆ PrimaryMouseButtonDown()

static bool Barotrauma.PlayerInput.PrimaryMouseButtonDown ( )
static

◆ PrimaryMouseButtonHeld()

static bool Barotrauma.PlayerInput.PrimaryMouseButtonHeld ( )
static

◆ PrimaryMouseButtonReleased()

static bool Barotrauma.PlayerInput.PrimaryMouseButtonReleased ( )
static

◆ SecondaryMouseButtonClicked()

static bool Barotrauma.PlayerInput.SecondaryMouseButtonClicked ( )
static

◆ SecondaryMouseButtonDown()

static bool Barotrauma.PlayerInput.SecondaryMouseButtonDown ( )
static

◆ SecondaryMouseButtonHeld()

static bool Barotrauma.PlayerInput.SecondaryMouseButtonHeld ( )
static

◆ SecondaryMouseButtonReleased()

static bool Barotrauma.PlayerInput.SecondaryMouseButtonReleased ( )
static

◆ Update()

static void Barotrauma.PlayerInput.Update ( double  deltaTime)
static

◆ UpdateVariable()

static void Barotrauma.PlayerInput.UpdateVariable ( )
static

Member Data Documentation

◆ NumberKeys

readonly List<Keys> Barotrauma.PlayerInput.NumberKeys = new List<Keys> { Keys.D0, Keys.D1, Keys.D2, Keys.D3, Keys.D4, Keys.D5, Keys.D6, Keys.D7, Keys.D8, Keys.D9 }
static

◆ PrimaryMouseLabel

readonly LocalizedString Barotrauma.PlayerInput.PrimaryMouseLabel = TextManager.Get($"Input.{(!MouseButtonsSwapped() ? "Left" : "Right")}Mouse")
static

◆ SecondaryMouseLabel

readonly LocalizedString Barotrauma.PlayerInput.SecondaryMouseLabel = TextManager.Get($"Input.{(!MouseButtonsSwapped() ? "Right" : "Left")}Mouse")
static

Property Documentation

◆ GetKeyboardState

KeyboardState Barotrauma.PlayerInput.GetKeyboardState
staticget

◆ GetOldKeyboardState

KeyboardState Barotrauma.PlayerInput.GetOldKeyboardState
staticget

◆ LatestMousePosition

Vector2 Barotrauma.PlayerInput.LatestMousePosition
staticget

◆ MaxDoubleClickDistance

float Barotrauma.PlayerInput.MaxDoubleClickDistance
staticget

◆ MouseInsideWindow

bool Barotrauma.PlayerInput.MouseInsideWindow
staticget

◆ MousePosition

Vector2 Barotrauma.PlayerInput.MousePosition
staticget

◆ MouseSpeed

Vector2? Barotrauma.PlayerInput.MouseSpeed
staticget

◆ MouseSpeedPerSecond

Vector2 Barotrauma.PlayerInput.MouseSpeedPerSecond
staticget

◆ ScrollWheelSpeed

int? Barotrauma.PlayerInput.ScrollWheelSpeed
staticget