GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class Input

    Provides utility methods for handling user input in the Genesis framework.

    Inheritance
    object
    Input
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Core
    Assembly: Genesis.dll
    Syntax
    public class Input

    Constructors

    Input()

    Declaration
    public Input()

    Methods

    GetAsyncKeyState(int)

    Gets the state of the specified key.

    Declaration
    public static extern short GetAsyncKeyState(int vKey)
    Parameters
    Type Name Description
    int vKey

    The virtual key code to check.

    Returns
    Type Description
    short

    True if the key is down; otherwise, false.

    GetAsyncKeyState(Keys)

    Gets the state of the specified key.

    Declaration
    public static extern short GetAsyncKeyState(Keys vKey)
    Parameters
    Type Name Description
    Keys vKey

    The virtual key code to check.

    Returns
    Type Description
    short

    True if the key is down; otherwise, false.

    GetMousePos()

    Gets the current mouse position.

    Declaration
    public static Vec3 GetMousePos()
    Returns
    Type Description
    Vec3

    A Vec3 representing the current mouse position.

    GetRefMousePos(Game)

    Gets the mouse position relative to the control associated with the specified game instance.

    Declaration
    public static Vec3 GetRefMousePos(Game game)
    Parameters
    Type Name Description
    Game game

    The game instance.

    Returns
    Type Description
    Vec3

    A Vec3 representing the mouse position relative to the control.

    GetRefMousePos(IntPtr)

    Gets the mouse position relative to the control associated with the specified handle.

    Declaration
    public static Vec3 GetRefMousePos(IntPtr handle)
    Parameters
    Type Name Description
    IntPtr handle

    The handle of the control.

    Returns
    Type Description
    Vec3

    A Vec3 representing the mouse position relative to the control.

    GetRefMousePos(Control)

    Gets the mouse position relative to the specified control.

    Declaration
    public static Vec3 GetRefMousePos(Control control)
    Parameters
    Type Name Description
    Control control

    The control relative to which the mouse position is obtained.

    Returns
    Type Description
    Vec3

    A Vec3 representing the mouse position relative to the control.

    HideCursor()

    Hides the cursor.

    Declaration
    public static void HideCursor()

    IsKeyDown(Keys)

    Checks if the specified key is currently pressed.

    Declaration
    public static bool IsKeyDown(Keys vKey)
    Parameters
    Type Name Description
    Keys vKey

    The virtual key to check.

    Returns
    Type Description
    bool

    True if the key is down; otherwise, false.

    SetCursorPos(Vec3, IntPtr)

    Sets the cursor position on the screen.

    Declaration
    public static void SetCursorPos(Vec3 pos, IntPtr handle)
    Parameters
    Type Name Description
    Vec3 pos

    The new position of the cursor.

    IntPtr handle

    The handle of the control where the cursor position will be set.

    SetCursorPos(int, int)

    Sets the cursor position on the screen.

    Declaration
    public static extern bool SetCursorPos(int X, int Y)
    Parameters
    Type Name Description
    int X

    The new x-coordinate of the cursor position.

    int Y

    The new y-coordinate of the cursor position.

    Returns
    Type Description
    bool

    SetCursorPos(int, int, IntPtr)

    Sets the cursor position on the screen.

    Declaration
    public static void SetCursorPos(int x, int y, IntPtr handle)
    Parameters
    Type Name Description
    int x
    int y
    IntPtr handle

    The handle of the control where the cursor position will be set.

    ShowCursor()

    Shows the cursor.

    Declaration
    public static void ShowCursor()
    In this article
    Back to top Generated by DocFX