Header menu logo Nu

WorldInputModule Module

HID input functions for the world.

Type extensions

Type extension Description

World.getDirection index world

Full Usage: World.getDirection index world

Parameters:
    index : int
    world : World

Returns: GamepadDirection

Get the given gamepad's current direction.

Extended Type: World

index : int
world : World
Returns: GamepadDirection

World.getGamepadCount world

Full Usage: World.getGamepadCount world

Parameters:
Returns: int

Get the number of open gamepad.

Extended Type: World

world : World
Returns: int

World.getMousePosition world

Full Usage: World.getMousePosition world

Parameters:
Returns: Vector2

Get the position of the mouse.

Extended Type: World

world : World
Returns: Vector2

World.getMousePosition2dScreen world

Full Usage: World.getMousePosition2dScreen world

Parameters:
Returns: Vector2

Get the 2d screen position of the mouse.

Extended Type: World

world : World
Returns: Vector2

World.getMousePosition3dScreen world

Full Usage: World.getMousePosition3dScreen world

Parameters:
Returns: Vector2

Get the 3d screen position of the mouse.

Extended Type: World

world : World
Returns: Vector2

World.getMousePostion2dWorld absolute world

Full Usage: World.getMousePostion2dWorld absolute world

Parameters:
    absolute : bool
    world : World

Returns: Vector2

Get the 2d world position of the mouse.

Extended Type: World

absolute : bool
world : World
Returns: Vector2

World.getMouseRay3dWorld world

Full Usage: World.getMouseRay3dWorld world

Parameters:
Returns: Ray3

Get the 3d world ray of the mouse.

Extended Type: World

world : World
Returns: Ray3

World.isButtonDown index button world

Full Usage: World.isButtonDown index button world

Parameters:
Returns: bool

Check that the given gamepad's button is down.

Extended Type: World

index : int
button : GamepadButton
world : World
Returns: bool

World.isKeyboardAltDown world

Full Usage: World.isKeyboardAltDown world

Parameters:
Returns: bool

Check that a keyboard alt key is down.

Extended Type: World

world : World
Returns: bool

World.isKeyboardAltUp world

Full Usage: World.isKeyboardAltUp world

Parameters:
Returns: bool

Check that a keyboard alt key is up.

Extended Type: World

world : World
Returns: bool

World.isKeyboardCtrlDown world

Full Usage: World.isKeyboardCtrlDown world

Parameters:
Returns: bool

Check that a keyboard ctrl key is down.

Extended Type: World

world : World
Returns: bool

World.isKeyboardCtrlUp world

Full Usage: World.isKeyboardCtrlUp world

Parameters:
Returns: bool

Check that a keyboard ctrl key is up.

Extended Type: World

world : World
Returns: bool

World.isKeyboardEnterDown world

Full Usage: World.isKeyboardEnterDown world

Parameters:
Returns: bool

Check that a keyboard enter key is down.

Extended Type: World

world : World
Returns: bool

World.isKeyboardEnterPressed world

Full Usage: World.isKeyboardEnterPressed world

Parameters:
Returns: bool

Check that a keyboard enter key was just pressed.

Extended Type: World

world : World
Returns: bool

World.isKeyboardEnterUp world

Full Usage: World.isKeyboardEnterUp world

Parameters:
Returns: bool

Check that a keyboard enter key is up.

Extended Type: World

world : World
Returns: bool

World.isKeyboardKeyDown key world

Full Usage: World.isKeyboardKeyDown key world

Parameters:
Returns: bool

Check that the given keyboard key is down.

Extended Type: World

key : KeyboardKey
world : World
Returns: bool

World.isKeyboardKeyPressed key world

Full Usage: World.isKeyboardKeyPressed key world

Parameters:
Returns: bool

Check that the given keyboard key was just pressed.

Extended Type: World

key : KeyboardKey
world : World
Returns: bool

World.isKeyboardKeyUp key world

Full Usage: World.isKeyboardKeyUp key world

Parameters:
Returns: bool

Check that the given keyboard key is up.

Extended Type: World

key : KeyboardKey
world : World
Returns: bool

World.isKeyboardShiftDown world

Full Usage: World.isKeyboardShiftDown world

Parameters:
Returns: bool

Check that a keyboard shift key is down.

Extended Type: World

world : World
Returns: bool

World.isKeyboardShiftUp world

Full Usage: World.isKeyboardShiftUp world

Parameters:
Returns: bool

Check that a keyboard shift key is up.

Extended Type: World

world : World
Returns: bool

World.isMouseButtonClicked mouseButton world

Full Usage: World.isMouseButtonClicked mouseButton world

Parameters:
Returns: bool

Check that the given mouse button was just clicked.

Extended Type: World

mouseButton : MouseButton
world : World
Returns: bool

World.isMouseButtonDown mouseButton world

Full Usage: World.isMouseButtonDown mouseButton world

Parameters:
Returns: bool

Check that the given mouse button is down.

Extended Type: World

mouseButton : MouseButton
world : World
Returns: bool

World.isMouseButtonPressed mouseButton world

Full Usage: World.isMouseButtonPressed mouseButton world

Parameters:
Returns: bool

Check that the given mouse button was just pressed.

Extended Type: World

mouseButton : MouseButton
world : World
Returns: bool

World.isMouseButtonUp mouseButton world

Full Usage: World.isMouseButtonUp mouseButton world

Parameters:
Returns: bool

Check that the given mouse button is up.

Extended Type: World

mouseButton : MouseButton
world : World
Returns: bool

World.isSdlButtonSupported button world

Full Usage: World.isSdlButtonSupported button world

Parameters:
    button : int
    world : World

Returns: bool

Check that an SDL gamepad button is supported.

Extended Type: World

button : int
world : World
Returns: bool

World.toNuButton gamepadButton world

Full Usage: World.toNuButton gamepadButton world

Parameters:
    gamepadButton : int
    world : World

Returns: GamepadButton

Convert SDL's representation of a joystick button to a GamepadButton.

Extended Type: World

gamepadButton : int
world : World
Returns: GamepadButton

World.toNuDirection gamepadDirection world

Full Usage: World.toNuDirection gamepadDirection world

Parameters:
    gamepadDirection : byte
    world : World

Returns: GamepadDirection

Convert SDL's representation of a hat direction to a GamepadDirection.

Extended Type: World

gamepadDirection : byte
world : World
Returns: GamepadDirection

World.toSdlButton gamepadButton world

Full Usage: World.toSdlButton gamepadButton world

Parameters:
Returns: int

Convert a GamepadButton to SDL's representation.

Extended Type: World

gamepadButton : GamepadButton
world : World
Returns: int

World.toSdlDirection gamepadDirection world

Full Usage: World.toSdlDirection gamepadDirection world

Parameters:
Returns: byte

Convert a GamepadDirection to SDL's representation.

Extended Type: World

gamepadDirection : GamepadDirection
world : World
Returns: byte

Type something to start searching.