Apos.Input 0.4.0

Input library for MonoGame.

Install-Package Apos.Input -Version 0.4.0
dotnet add package Apos.Input --version 0.4.0
<PackageReference Include="Apos.Input" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Apos.Input --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Apos.Gui

Input library for MonoGame.

Discord

Documentation

Build

NuGet NuGet NuGet

Features

  • Mouse, Keyboard, GamePad buttons

Usage samples

In your game's Initialize(), pass the game class to InputHelper.Game:

protected override void Initialize() {
    InputHelper.Game = this;
}

In your game's Update(GameTime gameTime), call the two functions:

protected override void Update(GameTime gametime) {
    //Call UpdateSetup at the start.
    InputHelper.UpdateSetup();

    //...

    //Call Update at the end.
    InputHelper.UpdateCleanup();
}
//Create a conditioCan to toggle fullscreen.
//It should work on both Alt keys and Enter.
var toggleFullScreen = new ConditionComposite();
toggleFullscreen.AddSet(Keys.Enter).AddNeed(Keys.LeftAlt);
toggleFullscreen.AddSet(Keys.Enter).AddNeed(Keys.RightAlt);

//To check if toggleFullscreen is triggered:
if (toggleFullscreen.Pressed()) {
    //Do the fullscreen change.
}

Apos.Gui

Input library for MonoGame.

Discord

Documentation

Build

NuGet NuGet NuGet

Features

  • Mouse, Keyboard, GamePad buttons

Usage samples

In your game's Initialize(), pass the game class to InputHelper.Game:

protected override void Initialize() {
    InputHelper.Game = this;
}

In your game's Update(GameTime gameTime), call the two functions:

protected override void Update(GameTime gametime) {
    //Call UpdateSetup at the start.
    InputHelper.UpdateSetup();

    //...

    //Call Update at the end.
    InputHelper.UpdateCleanup();
}
//Create a conditioCan to toggle fullscreen.
//It should work on both Alt keys and Enter.
var toggleFullScreen = new ConditionComposite();
toggleFullscreen.AddSet(Keys.Enter).AddNeed(Keys.LeftAlt);
toggleFullscreen.AddSet(Keys.Enter).AddNeed(Keys.RightAlt);

//To check if toggleFullscreen is triggered:
if (toggleFullscreen.Pressed()) {
    //Do the fullscreen change.
}

  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.4.0 89 4/27/2019
0.3.0 70 4/26/2019
0.2.2 117 3/5/2019
0.2.1 86 3/5/2019
0.2.0 99 2/28/2019
0.1.5 102 2/27/2019
0.1.4 98 2/9/2019
0.1.3 105 2/7/2019
0.1.2 96 2/7/2019
0.1.1 95 2/6/2019
0.1.0 104 2/1/2019