Skip to content
Input library for MonoGame.
C#
Branch: master
Clone or download
Latest commit ed36c4b Apr 27, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Images Initial commit Feb 1, 2019
Source change ui to input tag Apr 27, 2019
docs Update docs Apr 27, 2019
.gitignore Added .gitignore Feb 1, 2019
LICENSE Initial commit Feb 1, 2019
README.md Readme corrections Apr 27, 2019

README.md

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 UpdateCleanup at the end.
    InputHelper.UpdateCleanup();
}
//Create a condition 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.
}
You can’t perform that action at this time.