1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/openmw/mwbase/inputmanager.hpp

57 lines
2.1 KiB
C++
Raw Normal View History

#ifndef GAME_MWBASE_INPUTMANAGER_H
#define GAME_MWBASE_INPUTMANAGER_H
#include <string>
#include <components/settings/settings.hpp>
namespace MWBase
{
/// \brief Interface for input manager (implemented in MWInput)
class InputManager
{
InputManager (const InputManager&);
///< not implemented
InputManager& operator= (const InputManager&);
///< not implemented
public:
InputManager() {}
/// Clear all savegame-specific data
virtual void clear() = 0;
virtual ~InputManager() {}
2014-03-27 19:51:48 +01:00
virtual void update(float dt, bool disableControls, bool disableEvents=false) = 0;
virtual void changeInputMode(bool guiMode) = 0;
virtual void processChangedSettings(const Settings::CategorySettingVector& changed) = 0;
virtual void setDragDrop(bool dragDrop) = 0;
virtual void toggleControlSwitch (const std::string& sw, bool value) = 0;
virtual bool getControlSwitch (const std::string& sw) = 0;
2012-08-13 01:26:15 +02:00
virtual std::string getActionDescription (int action) = 0;
2014-12-08 21:57:32 -06:00
virtual std::string getActionKeyBindingName (int action) = 0;
virtual std::string getActionControllerBindingName (int action) = 0;
virtual std::string sdlControllerAxisToString(int axis) = 0;
virtual std::string sdlControllerButtonToString(int button) = 0;
///Actions available for binding to keyboard buttons
virtual std::vector<int> getActionKeySorting() = 0;
///Actions available for binding to controller buttons
virtual std::vector<int> getActionControllerSorting() = 0;
2012-08-13 01:26:15 +02:00
virtual int getNumActions() = 0;
2014-12-08 21:57:32 -06:00
///If keyboard is true, only pay attention to keyboard events. If false, only pay attention to cntroller events (excluding esc)
virtual void enableDetectingBindingMode (int action, bool keyboard) = 0;
virtual void resetToDefaultKeyBindings() = 0;
virtual void resetToDefaultControllerBindings() = 0;
};
}
#endif