/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #pragma once #include "BaseInputAction.hpp" #include "InputKey.hpp" namespace OpenVulkano::Input { class InputAction final : public BaseInputAction { std::vector keys; std::vector> axisButtons; public: InputAction(const std::string& name) : BaseInputAction(name) {} [[nodiscard]] const std::vector& GetKeys() const { return keys; } [[nodiscard]] const std::vector>& GetAxisButtons() const { return axisButtons; } void BindKey(InputKey key) { keys.push_back(key); } void BindAxisButtons(InputKey keyPositive, InputKey keyNegative) { axisButtons.emplace_back(keyPositive, keyNegative); } }; }