mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 10:13:42 +00:00
added InputAction struct
This commit is contained in:
parent
3d2028137d
commit
e71fcbf9e5
18
include/InputAction.h
Normal file
18
include/InputAction.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "Key.h"
|
||||
|
||||
struct InputAction
|
||||
{
|
||||
std::string name;
|
||||
std::vector<Key> keys;
|
||||
std::function<void()> callback;
|
||||
|
||||
InputAction() = default;
|
||||
InputAction(const std::string& actionName, std::function<void()> actionCallback)
|
||||
: name(actionName), callback(actionCallback) {}
|
||||
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user