M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.InputSystem.InputState Class Reference

Public Member Functions

 InputState ()
 
bool UpdateMousePosition (float mousePositionX, float mousePositionY)
 
bool UpdateMouseScroll (float mouseScrollValue)
 

Properties

Vec2 NativeResolution [get]
 Base resolution for all widgets. Widget system not depended on game's real resolution. So every contribution must be made according to native resolution.
 
Vec2 MousePositionRanged [get, set]
 Represents mouse position value in range [0,1] for game window. If game is not full screen and mouse is outside receiving values like -0.322 or 1.34 possible. Values will be still true according to game screen's width and height.
 
Vec2 OldMousePositionRanged [get]
 
bool MousePositionChanged [get]
 "Is mouse in a different position than the last tick call?" This value returns true if mousePositionRanged and oldMousePositionRanged are different.
 
Vec2 MousePositionPixel [get, set]
 Represents mouse position value in pixel coordinates according to nativeResolution. This value result of (mousePositionRanged * NativeResolution) which gives pixel based position.
 
Vec2 OldMousePositionPixel [get]
 
float MouseScrollValue [get]
 Represents mouse scroll value in range [?,?].
 
bool MouseScrollChanged [get]
 This value returns true if mouseScrollValue is different than the value of previous tick.
 

Constructor & Destructor Documentation

◆ InputState()

TaleWorlds.InputSystem.InputState.InputState ( )

Member Function Documentation

◆ UpdateMousePosition()

bool TaleWorlds.InputSystem.InputState.UpdateMousePosition ( float  mousePositionX,
float  mousePositionY 
)

◆ UpdateMouseScroll()

bool TaleWorlds.InputSystem.InputState.UpdateMouseScroll ( float  mouseScrollValue)

Property Documentation

◆ NativeResolution

Vec2 TaleWorlds.InputSystem.InputState.NativeResolution
get

◆ MousePositionRanged

Vec2 TaleWorlds.InputSystem.InputState.MousePositionRanged
getset

◆ OldMousePositionRanged

Vec2 TaleWorlds.InputSystem.InputState.OldMousePositionRanged
get

◆ MousePositionChanged

bool TaleWorlds.InputSystem.InputState.MousePositionChanged
get

◆ MousePositionPixel

Vec2 TaleWorlds.InputSystem.InputState.MousePositionPixel
getset

◆ OldMousePositionPixel

Vec2 TaleWorlds.InputSystem.InputState.OldMousePositionPixel
get

◆ MouseScrollValue

float TaleWorlds.InputSystem.InputState.MouseScrollValue
get

◆ MouseScrollChanged

bool TaleWorlds.InputSystem.InputState.MouseScrollChanged
get