1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 21:42:13 +00:00
OpenMW/apps/openmw/mwinput/controlswitch.hpp

40 lines
725 B
C++
Raw Normal View History

#ifndef MWINPUT_CONTROLSWITCH_H
#define MWINPUT_CONTROLSWITCH_H
#include <map>
2020-05-09 07:28:30 +00:00
#include <string>
2021-11-06 00:25:20 +00:00
#include <string_view>
namespace ESM
{
struct ControlsState;
class ESMReader;
class ESMWriter;
}
namespace Loading
{
class Listener;
}
namespace MWInput
{
class ControlSwitch
{
public:
ControlSwitch();
2021-11-06 00:25:20 +00:00
bool get(std::string_view key);
void set(std::string_view key, bool value);
void clear();
void write(ESM::ESMWriter& writer, Loading::Listener& progress);
void readRecord(ESM::ESMReader& reader, uint32_t type);
int countSavedGameRecords() const;
private:
2021-11-06 00:25:20 +00:00
std::map<std::string, bool, std::less<>> mSwitches;
};
}
#endif