Skip to content

Instantly share code, notes, and snippets.

@DarkDrek
DarkDrek / macro.rs
Created July 10, 2019 22:42
Macro to generate Input combinations
macro_rules! create_input_tracker {
($name: ident, $( $element: ident: $ty: ty ; $text: tt ) , +) => {
/// A simple combination of input trackers.
///
/// You can use this as your [`Game::Input`] directly!
///
/// [`Game::Input`]: ../trait.Game.html#associatedtype.Input
pub struct $name {
$ (
$element: $ty,