diff --git a/Data/Scripts/cam.as b/Data/Scripts/cam.as index 4e04145b0..4b9e541b9 100644 --- a/Data/Scripts/cam.as +++ b/Data/Scripts/cam.as @@ -209,7 +209,7 @@ void Update() { } co.velocity = co.velocity * inertia + target_velocity * (1.0f - inertia); position += co.velocity * time_step; - if(GetInputDown(controller_id, "mouse0") && !co.ignore_mouse_input){ + if((GetInputDown(controller_id, "mouse0") || GetInputDown(controller_id, "g")) && !co.ignore_mouse_input){ target_rotation -= GetLookXAxis(controller_id); target_rotation2 -= GetLookYAxis(controller_id); } diff --git a/Source/Editors/map_editor.cpp b/Source/Editors/map_editor.cpp index 0641bf46c..feed75e00 100644 --- a/Source/Editors/map_editor.cpp +++ b/Source/Editors/map_editor.cpp @@ -1657,6 +1657,12 @@ void MapEditor::HandleShortcuts(const LineSegment& mouseray) { if (KeyCommand::CheckPressed(keyboard, KeyCommand::kToggleHotspotEditing, KIMF_LEVEL_EDITOR_GENERAL)) { SetTypeEnabled(_hotspot_object, !IsTypeEnabled(_hotspot_object)); } + if (KeyCommand::CheckPressed(keyboard, KeyCommand::kToggleLightEditing, KIMF_LEVEL_EDITOR_GENERAL)) { + bool lights_enabled = !IsTypeEnabled(_dynamic_light_object); + SetTypeEnabled(_dynamic_light_object, lights_enabled); + SetTypeEnabled(_reflection_capture_object, lights_enabled); + SetTypeEnabled(_light_volume_object, lights_enabled); + } // Handle saves // This bool is needed because the new default keybind for "save level as" // is the old "save selected items", so to keep backward/forward compatibility diff --git a/Source/UserInput/keycommands.cpp b/Source/UserInput/keycommands.cpp index 1bc6fcbb5..3dfd2fa9f 100644 --- a/Source/UserInput/keycommands.cpp +++ b/Source/UserInput/keycommands.cpp @@ -298,6 +298,7 @@ void KeyCommand::Initialize() { AddPairToHash("toggle_decal_editing", kToggleDecalEditing); AddPairToHash("toggle_object_editing", kToggleObjectEditing); AddPairToHash("toggle_hotspot_editing", kToggleHotspotEditing); + AddPairToHash("toggle_light_editing", kToggleLightEditing); AddPairToHash("open_spawner", kOpenSpawner); AddPairToHash("save_selected_items", kSaveSelectedItems); AddPairToHash("save_level", kSaveLevel); diff --git a/Source/UserInput/keycommands.h b/Source/UserInput/keycommands.h index 5994b6ff6..807d96845 100644 --- a/Source/UserInput/keycommands.h +++ b/Source/UserInput/keycommands.h @@ -89,6 +89,7 @@ enum Label { kToggleDecalEditing, kToggleObjectEditing, kToggleHotspotEditing, + kToggleLightEditing, kOpenSpawner, kSaveSelectedItems, kSaveLevel,