mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
remove old bindings format support
This commit is contained in:
parent
27cb5f6e51
commit
14911aa30f
5 changed files with 0 additions and 39 deletions
|
|
@ -182,31 +182,6 @@ std::string Events::writeBindings() {
|
|||
return toml::stringify(obj);
|
||||
}
|
||||
|
||||
void Events::loadBindingsOld(const std::string& filename, const std::string& source) {
|
||||
auto obj = json::parse(filename, source);
|
||||
for (auto& entry : Events::bindings) {
|
||||
auto& binding = entry.second;
|
||||
|
||||
auto jentry = obj->map(entry.first);
|
||||
if (jentry == nullptr)
|
||||
continue;
|
||||
inputtype type;
|
||||
std::string typestr;
|
||||
jentry->str("type", typestr);
|
||||
|
||||
if (typestr == "keyboard") {
|
||||
type = inputtype::keyboard;
|
||||
} else if (typestr == "mouse") {
|
||||
type = inputtype::mouse;
|
||||
} else {
|
||||
logger.error() << "unknown input type '" << typestr << "'";
|
||||
continue;
|
||||
}
|
||||
binding.type = type;
|
||||
jentry->num("code", binding.code);
|
||||
}
|
||||
}
|
||||
|
||||
void Events::loadBindings(const std::string& filename, const std::string& source) {
|
||||
auto map = toml::parse(filename, source);
|
||||
for (auto& entry : map->values) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue