mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-16 17:00:59 -06:00
Rearranged profile initializations and verified that all init correctly
This commit is contained in:
@@ -142,23 +142,6 @@ std::string KeybindingManager::generateJson() const {
|
||||
return json.str();
|
||||
}
|
||||
|
||||
void KeybindingManager::setFromProfile_keybindings(const Profile& p)
|
||||
{
|
||||
for (Profile::Keybinding k : p.keybindings) {
|
||||
if (k.action.empty()) {
|
||||
LERROR("Action must not be empty");
|
||||
}
|
||||
if (!global::actionManager->hasAction(k.action)) {
|
||||
LERROR(fmt::format("Action '{}' does not exist", k.action));
|
||||
}
|
||||
if (k.key.key == openspace::Key::Unknown) {
|
||||
LERROR(fmt::format("Could not find key '{}'",
|
||||
std::to_string(static_cast<uint16_t>(k.key.key))));
|
||||
}
|
||||
bindKey(k.key.key, k.key.modifier, k.action);
|
||||
}
|
||||
}
|
||||
|
||||
scripting::LuaLibrary KeybindingManager::luaLibrary() {
|
||||
return {
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user