Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Static Public Member Functions | Static Public Attributes | Properties | List of all members
Mouse Class Reference
Inheritance diagram for Mouse:

Classes

class  MouseButton
 

Public Types

enum  Buttons {
  Buttons.None = 0, Buttons.Left = 1, Buttons.Right = 2, Buttons.Middle = 4,
  Buttons.Btn4 = 8, Buttons.Btn5 = 16, Buttons.Any = ~None
}
 

Static Public Member Functions

static bool CheckButtons (Buttons buttons, Buttons buttonsToTest, bool strict=true)
 Tests the given Buttons bitfield against the specified button indices. More...
 
static Buttons GetAllMouseButtons ()
 Retuns a bitfield containing all the buttons currently being held down. More...
 
static Buttons GetAllMouseButtonsDown ()
 
static Buttons GetAllMouseButtonsUp ()
 

Static Public Attributes

static Vector2 delta
 The amount (in GUI coords) the mouse has moved in the last frame More...
 
static Part HoveredPart = null
 
static MouseButton Left
 
static MouseButton Middle
 
static PartPointer partPointer
 Part pointer reference of the part being hovered. This one can return the actual Part being referenced. More...
 
static MouseButton Right
 
static Vector2 screenPos
 The mouse position (in GUI coordinates) More...
 

Properties

static bool IsMoving [get]
 

Member Enumeration Documentation

Enumerator
None 
Left 
Right 
Middle 
Btn4 
Btn5 
Any 

Member Function Documentation

static bool Mouse.CheckButtons ( Buttons  buttons,
Buttons  buttonsToTest,
bool  strict = true 
)
inlinestatic

Tests the given Buttons bitfield against the specified button indices.

Parameters
buttonsThe Buttons bitfield to test. For the currenly held buttons, use GetAllMouseButtons()
buttonsToTestThe bitfield to compare against.
strictstrict testing returns false if anything but the exact combination of buttons is held. Non-strict will return true if any of the test buttons match
Returns
static Buttons Mouse.GetAllMouseButtons ( )
inlinestatic

Retuns a bitfield containing all the buttons currently being held down.

Returns
static Buttons Mouse.GetAllMouseButtonsDown ( )
inlinestatic
static Buttons Mouse.GetAllMouseButtonsUp ( )
inlinestatic

Member Data Documentation

Vector2 Mouse.delta
static

The amount (in GUI coords) the mouse has moved in the last frame

Part Mouse.HoveredPart = null
static
MouseButton Mouse.Left
static
MouseButton Mouse.Middle
static
PartPointer Mouse.partPointer
static

Part pointer reference of the part being hovered. This one can return the actual Part being referenced.

MouseButton Mouse.Right
static
Vector2 Mouse.screenPos
static

The mouse position (in GUI coordinates)

Property Documentation

bool Mouse.IsMoving
staticget

The documentation for this class was generated from the following file: