input: redesign pad profiles

This commit is contained in:
Megamouse 2021-08-10 21:45:26 +02:00
parent 41cfa6349a
commit cad96cef72
28 changed files with 781 additions and 629 deletions

View file

@ -36,6 +36,7 @@ namespace cfg
uint, // cfg::uint type
string, // cfg::string type
set, // cfg::set_entry type
map, // cfg::map_entry type
log,
};
@ -473,6 +474,29 @@ namespace cfg
}
};
class map_entry final : public _base
{
std::map<std::string, std::string> m_map{};
public:
map_entry(node* owner, const std::string& name)
: _base(type::map, owner, name, true)
{
}
const std::map<std::string, std::string>& get_map() const
{
return m_map;
}
std::string get_value(const std::string& key);
void set_value(const std::string& key, const std::string& value);
void set_map(std::map<std::string, std::string>&& map);
void from_default() override;
};
class log_entry final : public _base
{
std::map<std::string, logs::level> m_map{};