From c546ec97a82c403e3e1877e7c580c701559dcd12 Mon Sep 17 00:00:00 2001 From: Apostolique Date: Sat, 16 Dec 2023 16:32:44 +0000 Subject: [PATCH] deploy: c7ba77670a8fdccb1a120464da430a9511ae86f9 --- 404.html | 2 +- api/ICondition/index.html | 2 +- api/InputHelper/index.html | 2 +- api/MouseButton/index.html | 2 +- api/index.html | 2 +- changelog/index.html | 2 +- design-choices/index.html | 2 +- getting-started/index.html | 2 +- index.html | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/404.html b/404.html index 13117a6..b6eee6e 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404 - Page not found! - Apos.Input

404 - Page not found!

\ No newline at end of file +404 - Page not found! - Apos.Input

404 - Page not found!

\ No newline at end of file diff --git a/api/ICondition/index.html b/api/ICondition/index.html index 3f7e0c0..12e0ba4 100644 --- a/api/ICondition/index.html +++ b/api/ICondition/index.html @@ -1,4 +1,4 @@ -ICondition - Apos.Input

ICondition

An ICondition is an abstraction over button-based input. A button can pressed or not pressed which maps to on or off respectively. By comparing it’s previous and current states, we get the following cases.

In the following functions, when canConsume is true, it means that the Consume() function gets called implicitly if the condition is part of the tracking system.

Source code

Read the source code.

Pressed

bool Pressed(bool canConsume = true);
+ICondition - Apos.Input

ICondition

An ICondition is an abstraction over button-based input. A button can pressed or not pressed which maps to on or off respectively. By comparing it’s previous and current states, we get the following cases.

In the following functions, when canConsume is true, it means that the Consume() function gets called implicitly if the condition is part of the tracking system.

Source code

Read the source code.

Pressed

bool Pressed(bool canConsume = true);
 

Previous state is off, current state is on. Triggers only on the first frame that the current state becomes on.

Held

bool Held(bool canConsume = true);
 

Previous state ignored, current state is on. Triggers every frame for as long as the current state stays on.

HeldOnly

bool HeldOnly(bool canConsume = true);
 

Previous state is on, current state is on. Since HeldOnly doesn’t get triggered on the same frame as Pressed it’s useful as a way to break an action into multiple steps.

Released

bool Released(bool canConsume = true);
diff --git a/api/InputHelper/index.html b/api/InputHelper/index.html
index 85e30de..1e4a555 100644
--- a/api/InputHelper/index.html
+++ b/api/InputHelper/index.html
@@ -1,4 +1,4 @@
-InputHelper - Apos.Input

InputHelper

This static class holds all the data required to handle inputs. It takes care of saving the previous and new input states.

Source code

Read the source code.

Game

public static Game Game {
+InputHelper - Apos.Input

InputHelper

This static class holds all the data required to handle inputs. It takes care of saving the previous and new input states.

Source code

Read the source code.

Game

public static Game Game {
     get;
     set;
 }
diff --git a/api/MouseButton/index.html b/api/MouseButton/index.html
index c16c6fe..6d974b7 100644
--- a/api/MouseButton/index.html
+++ b/api/MouseButton/index.html
@@ -1,4 +1,4 @@
-MouseButton - Apos.Input

MouseButton

An enum with all the available mouse buttons.

Source code

Read the source code.

LeftButton

MouseButton.LeftButton
+MouseButton - Apos.Input

MouseButton

An enum with all the available mouse buttons.

Source code

Read the source code.

LeftButton

MouseButton.LeftButton
 

Left mouse button.

MiddleButton

MouseButton.MiddleButton
 

Middle mouse button.

RightButton

MouseButton.RightButton
 

Right mouse button.

XButton1

MouseButton.XButton1
diff --git a/api/index.html b/api/index.html
index 288e359..d48765a 100644
--- a/api/index.html
+++ b/api/index.html
@@ -1 +1 @@
-API - Apos.Input

API

  • InputHelper
  • ICondition
  • AllCondition
  • AnyCondition
  • KeyboardCondition
  • MouseCondition
  • GamePadCondition
  • AnyGamePadCondition
  • Track
    • KeyboardCondition
    • MouseCondition
    • GamePadCondition
  • MouseButton
  • GamePadButton
Edit this page on GitHub
\ No newline at end of file +API - Apos.Input

API

  • InputHelper
  • ICondition
  • AllCondition
  • AnyCondition
  • KeyboardCondition
  • MouseCondition
  • GamePadCondition
  • AnyGamePadCondition
  • Track
    • KeyboardCondition
    • MouseCondition
    • GamePadCondition
  • MouseButton
  • GamePadButton
Edit this page on GitHub
\ No newline at end of file diff --git a/changelog/index.html b/changelog/index.html index b51720a..08471b4 100644 --- a/changelog/index.html +++ b/changelog/index.html @@ -1 +1 @@ -Changelog - Apos.Input

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

Nothing yet!

2.4.2 - 2022-01-29

Changed

  • Now gets the window width and height from the back buffer instead of the window client bounds.

2.4.1 - 2021-06-26

Fixed

  • MouseCondition focus fix for the tracking system

2.4.0 - 2021-06-26

Added

  • OldIsActive to InputHelper, it can be used to check if the window just got focused

Fixed

  • MouseCondition when the window just got focused by clicking on it. It was possible for Pressed to not trigger while HeldOnly would trigger

2.3.3 - 2021-03-21

Added

  • PointerMoved API to MouseCondition
  • PointerDelta API to MouseCondition

2.3.2 - 2021-02-20

Fixed

  • MonoGame package reference so that the library can be used in any MonoGame platform

2.3.1 - 2021-01-27

Fixed

  • MonoGame package reference so that the library can be used with local MonoGame builds

2.3.0 - 2021-01-27

Fixed

  • AllCondition when empty

2.2.0 - 2021-01-24

Added

  • MouseSensor enum
  • GamePadSensor enum
  • Scrolled API to MouseCondition
  • ScrollDelta API to MouseCondition
  • Ability to consume Mouse or GamePad sensors

2.1.0 - 2021-01-19

Added

  • Static methods for the tracking system

2.0.1 - 2021-01-17

Fixed

  • AllCondition and AnyCondition were consuming the conditions during their checks

2.0.0 - 2021-01-12

Added

  • AnyGamePadCondition, it combines every gamepad as a single input condition
  • Input tracking system

Changed

  • ICondition to accommodate the tracking system
  • TextEvents are now TextInputEventArgs

1.0.1 - 2020-10-20

Added

  • Everything!
Edit this page on GitHub
\ No newline at end of file +Changelog - Apos.Input

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

Nothing yet!

2.4.2 - 2022-01-29

Changed

  • Now gets the window width and height from the back buffer instead of the window client bounds.

2.4.1 - 2021-06-26

Fixed

  • MouseCondition focus fix for the tracking system

2.4.0 - 2021-06-26

Added

  • OldIsActive to InputHelper, it can be used to check if the window just got focused

Fixed

  • MouseCondition when the window just got focused by clicking on it. It was possible for Pressed to not trigger while HeldOnly would trigger

2.3.3 - 2021-03-21

Added

  • PointerMoved API to MouseCondition
  • PointerDelta API to MouseCondition

2.3.2 - 2021-02-20

Fixed

  • MonoGame package reference so that the library can be used in any MonoGame platform

2.3.1 - 2021-01-27

Fixed

  • MonoGame package reference so that the library can be used with local MonoGame builds

2.3.0 - 2021-01-27

Fixed

  • AllCondition when empty

2.2.0 - 2021-01-24

Added

  • MouseSensor enum
  • GamePadSensor enum
  • Scrolled API to MouseCondition
  • ScrollDelta API to MouseCondition
  • Ability to consume Mouse or GamePad sensors

2.1.0 - 2021-01-19

Added

  • Static methods for the tracking system

2.0.1 - 2021-01-17

Fixed

  • AllCondition and AnyCondition were consuming the conditions during their checks

2.0.0 - 2021-01-12

Added

  • AnyGamePadCondition, it combines every gamepad as a single input condition
  • Input tracking system

Changed

  • ICondition to accommodate the tracking system
  • TextEvents are now TextInputEventArgs

1.0.1 - 2020-10-20

Added

  • Everything!
Edit this page on GitHub
\ No newline at end of file diff --git a/design-choices/index.html b/design-choices/index.html index 58ffc71..91d2bfc 100644 --- a/design-choices/index.html +++ b/design-choices/index.html @@ -1 +1 @@ -Design choices - Apos.Input

Design choices

Design and ideas behind this library.

Polling

This library’s goal is to enable a polling-based paradigm on input handling. Inputs come from mouse, keyboard, gamepad, touch screen, etc. Polling means that you can check for an input’s current state anywhere that feels natural in your game code instead of managing them through events and callbacks.

Abstraction

For an input button, the state can either be on or off. It’s useful to know when the state becomes on and when the state becomes off. This library defines the moment a state becomes on as Pressed and the moment the state becomes off as Released. It also defines the exclusive state in between those as HeldOnly. When either Pressed or HeldOnly are true, this is defined as Held. These are included in the ICondition interface.

Tracking

This library comes with a built-in tracking system. This allows you to resolve conflicts between different ICondition instances that reuse the same keys or buttons. The tracking system is opt-in and separated into it’s own namespace at Apos.Input.Track. To accommodate it, ICondition offers an optional parameter canConsume in Pressed(canConsume = true), Held(canConsume = true), HeldOnly(canConsume = true), and Released(canConsume = true). This optional parameter allows you to handle the tracking yourself by setting canConsume to false and calling Consume() manually.

Edit this page on GitHub
\ No newline at end of file +Design choices - Apos.Input

Design choices

Design and ideas behind this library.

Polling

This library’s goal is to enable a polling-based paradigm on input handling. Inputs come from mouse, keyboard, gamepad, touch screen, etc. Polling means that you can check for an input’s current state anywhere that feels natural in your game code instead of managing them through events and callbacks.

Abstraction

For an input button, the state can either be on or off. It’s useful to know when the state becomes on and when the state becomes off. This library defines the moment a state becomes on as Pressed and the moment the state becomes off as Released. It also defines the exclusive state in between those as HeldOnly. When either Pressed or HeldOnly are true, this is defined as Held. These are included in the ICondition interface.

Tracking

This library comes with a built-in tracking system. This allows you to resolve conflicts between different ICondition instances that reuse the same keys or buttons. The tracking system is opt-in and separated into it’s own namespace at Apos.Input.Track. To accommodate it, ICondition offers an optional parameter canConsume in Pressed(canConsume = true), Held(canConsume = true), HeldOnly(canConsume = true), and Released(canConsume = true). This optional parameter allows you to handle the tracking yourself by setting canConsume to false and calling Consume() manually.

Edit this page on GitHub
\ No newline at end of file diff --git a/getting-started/index.html b/getting-started/index.html index 053cf25..8d2caf9 100644 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -1,4 +1,4 @@ -Getting started - Apos.Input

Getting started

This guide will show you how to get started with this library.

Install

Install using the following dotnet command:

dotnet add package Apos.Input
+Getting started - Apos.Input

Getting started

This guide will show you how to get started with this library.

Install

Install using the following dotnet command:

dotnet add package Apos.Input
 

Setup

Import the library with:

using Apos.Input;
 using Track = Apos.Input.Track;
 

In your game’s LoadContent(), pass the game class to InputHelper.Setup():

protected override void LoadContent() {
diff --git a/index.html b/index.html
index bc91e87..6ce8e81 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-Apos.Input

Apos.Input

Polling input library for MonoGame.

Discord

Documentation

Build

NuGetNuGet

Features

  • Manages the input states for you every frame
  • Mouse, Keyboard, and GamePad buttons abstractions
  • Tracking mode so that you don’t accidentally consume the same input multiple times
  • Static or instanced usage

Usage samples

In your game’s LoadContent(), pass the game class to InputHelper.Setup():

protected override void LoadContent() {
+Apos.Input

Apos.Input

Polling input library for MonoGame.

Discord

Documentation

Build

NuGetNuGet

Features

  • Manages the input states for you every frame
  • Mouse, Keyboard, and GamePad buttons abstractions
  • Tracking mode so that you don’t accidentally consume the same input multiple times
  • Static or instanced usage

Usage samples

In your game’s LoadContent(), pass the game class to InputHelper.Setup():

protected override void LoadContent() {
     InputHelper.Setup(this);
 }
 

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

protected override void Update(GameTime gametime) {