Method | Description | |
---|---|---|
AddPressedElement ( MouseKeyCode keyCode ) : void |
Adds the specified mouse keycode to the list of pressed keys.
|
|
AddScrollDirection ( MouseScrollKeyCode keyCode ) : void |
Adds the specified scroll direction to the list of scroll keys. Resets its timer if it is already pressed.
|
|
CheckKeys ( ) : void |
Checks the state of all keys and removes the ones that are no longer pressed from the list of pressed keys.
|
|
CheckScrollAndMovement ( ) : void |
Checks the scroll keys and movement. Call this method to remove the scroll buttons from state after they have been added. Also adds zero movement items to the history to return the movement counter to 0 gradually.
|
|
RegisterLocation ( Point location, int time ) : void |
Registers a new location for the mouse.
|
|
RemovePressedElement ( MouseKeyCode keyCode ) : void |
Removes the specified keycode from the list of pressed keys.
|
|
SetMouseFromCenter ( bool activate ) : void |
Sets a value indicating whether to calculate the mouse speed from the center or not. This method also recalculates the screen centers. So if a screen is added or removed while NohBoard is running, calling this method with |
Method | Description | |
---|---|---|
GetScreenCenterForPoint ( Point point ) : Point? |
Gets the coordinates of the center of the screen that contains point. The screen centers are pre-calculated whenever SetMouseFromCenter is set to |
|
GetSpeed ( Point target, Point source, int dt ) : |
Calculates the speed given two points and a time difference.
|
|
KeyIsUp ( MouseKeyCode key ) : bool |
Checks whether the specified key is up.
|
public static AddPressedElement ( MouseKeyCode keyCode ) : void | ||
keyCode | MouseKeyCode | The keycode to add. |
return | void |
public static AddScrollDirection ( MouseScrollKeyCode keyCode ) : void | ||
keyCode | MouseScrollKeyCode | The keycode of the scroll direction. |
return | void |
public static CheckScrollAndMovement ( ) : void | ||
return | void |
public static RegisterLocation ( Point location, int time ) : void | ||
location | Point | The new location. |
time | int | The time at which the location was registered. |
return | void |
public static RemovePressedElement ( MouseKeyCode keyCode ) : void | ||
keyCode | MouseKeyCode | The keycode to remove. |
return | void |
public static SetMouseFromCenter ( bool activate ) : void | ||
activate | bool | True if distance should be caculated relative to the screen center, /// false if distance should be calculated relative to the previous mouse position. |
return | void |