tModLoader v2024.11
A mod to make and play Terraria mods
PlayerInput Class Reference

Classes

class  MiscSettingsTEMP
 
class  SettingsForUI
 

Static Public Member Functions

static string BuildCommand (string CommandText, bool Last, params List< string >[] Bindings)
 
static void CacheMousePositionForZoom ()
 
static void CacheOriginalScreenDimensions ()
 
static void CacheZoomableValues ()
 
static string ComposeInstructionsForGamepad ()
 
static void EnterBuildingMode ()
 
static void ExitBuildingMode ()
 
static string GenerateInputTag_ForCurrentGamemode (bool tagForGameplay, string triggerName)
 
static string GenerateInputTag_ForCurrentGamemode_WithHacks (bool tagForGameplay, string triggerName)
 
static string GenerateInputTags_Gamepad (string triggerName)
 
static string GenerateInputTags_GamepadUI (string triggerName)
 
static List< Keys > GetPressedKeys ()
 
static void Hook_OnEnterWorld (Player player)
 
static void Initialize ()
 
static bool IsGamepadButtonLockedFromUse (string keyName)
 
static void ListenFor (string triggerName, InputMode inputmode)
 
static void Load ()
 
static void LockGamepadButtons (string TriggerName)
 
static void LockOnCachePosition ()
 
static void LockOnUnCachePosition ()
 
static void LockVanillaMouseScroll (string myUI)
 Locks the vanilla scrollbar for the upcoming cycle when called. Autoclears in Player. Takes a string to denote that your UI has registered to lock vanilla scrolling. String does not need to be unique.
 
static void ManageVersion_1_3 ()
 
static void NavigatorCachePosition ()
 
static void NavigatorUnCachePosition ()
 
static void PrettyPrintProfiles (ref string text)
 
static void PrettyPrintProfilesOld (ref string text)
 
static void Reset (KeyConfiguration c, PresetProfiles style, InputMode mode)
 
static void ResetInputsOnActiveStateChange ()
 
static bool Save ()
 
static void SetDesiredZoomContext (ZoomContext context)
 
static void SetSelectedProfile (string name)
 
static void SetZoom_Context ()
 
static void SetZoom_MouseInWorld ()
 
static void SetZoom_Test ()
 
static void SetZoom_UI ()
 
static void SetZoom_Unscaled ()
 
static void SetZoom_World ()
 
static void TryEndingFastUse ()
 
static void TryEnteringFastUseModeForInventorySlot (int inventorySlot)
 
static void TryEnteringFastUseModeForMouseItem ()
 
static void UpdateInput ()
 
static void UpdateMainMouse ()
 
static void VerifyBuildingMode ()
 

Static Public Attributes

static bool AllowExecutionOfGamepadInstructions = true
 
static string BlockedKey = ""
 
static InputMode CurrentInputMode = InputMode.Keyboard
 
static bool GamepadAllowScrolling
 
static int GamepadScrollValue
 
static Vector2 GamepadThumbstickLeft = Vector2.Zero
 
static Vector2 GamepadThumbstickRight = Vector2.Zero
 
static bool GrappleAndInteractAreShared
 
static List< string > KnownTriggers
 
static bool LockGamepadTileUseButton = false
 
static MouseState MouseInfo
 
static MouseState MouseInfoOld
 
static List< string > MouseKeys = new List<string>()
 
static int MouseX
 
static int MouseY
 
static int NavigatorRebindingLock
 
static Dictionary< string, PlayerInputProfileOriginalProfiles = new Dictionary<string, PlayerInputProfile>()
 
static int PreLockOnX
 
static int PreLockOnY
 
static int PreUIX
 
static int PreUIY
 
static bool PreventCursorModeSwappingToGamepad = false
 
static bool PreventFirstMousePositionGrab = false
 
static Dictionary< string, PlayerInputProfileProfiles = new Dictionary<string, PlayerInputProfile>()
 
static Vector2 RawMouseScale = Vector2.One
 
static int ScrollWheelDelta
 
static int ScrollWheelDeltaForUI
 
static int ScrollWheelValue
 
static int ScrollWheelValueOld
 
static SmartSelectGamepadPointer smartSelectPointer = new SmartSelectGamepadPointer()
 
static TriggersPack Triggers = new TriggersPack()
 
static bool UseSteamDeckIfPossible
 
static bool WritingText
 

Properties

static bool CurrentlyRebinding [get]
 
static PlayerInputProfile CurrentProfile [get]
 
static bool CursorIsBusy [get]
 
static bool IgnoreMouseInterface [get]
 
static bool InBuildingMode [get]
 
static bool InvisibleGamepadInMenus [get]
 
static string ListeningTrigger [get]
 
static Vector2 OriginalScreenSize [get]
 
static KeyConfiguration ProfileGamepadUI [get]
 
static int RealScreenHeight [get]
 
static int RealScreenWidth [get]
 
static bool ShouldFastUseItem [get]
 
static bool SteamDeckIsUsed [get]
 
static bool UsingGamepad [get]
 
static bool UsingGamepadUI [get]
 

Events

static Action OnActionableInput
 
static Action OnBindingChange