diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 61434521e..5d1c236ca 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -247,6 +247,9 @@ namespace MWInput case A_Screenshot: screenshot(); break; + case A_Screenshot360: + screenshot360(); + break; case A_Inventory: toggleInventory (); break; @@ -1015,7 +1018,13 @@ namespace MWInput void InputManager::screenshot() { - // MOVE THIS ELSEWHERE LATER! + mScreenCaptureHandler->setFramesToCapture(1); + mScreenCaptureHandler->captureNextFrame(*mViewer); + MWBase::Environment::get().getWindowManager()->messageBox ("Screenshot saved"); + } + + void InputManager::screenshot360() + { int screenshotW = 1024; osg::ref_ptr screenshot (new osg::Image); MWBase::Environment::get().getWorld()->screenshot360(screenshot.get(), screenshotW); @@ -1040,11 +1049,6 @@ namespace MWInput } outfile.close(); - -// mScreenCaptureHandler->setFramesToCapture(1); -// mScreenCaptureHandler->captureNextFrame(*mViewer); - -// MWBase::Environment::get().getWindowManager()->messageBox ("Screenshot saved"); } void InputManager::toggleInventory() @@ -1230,6 +1234,7 @@ namespace MWInput defaultKeyBindings[A_QuickKey9] = SDL_SCANCODE_9; defaultKeyBindings[A_QuickKey10] = SDL_SCANCODE_0; defaultKeyBindings[A_Screenshot] = SDL_SCANCODE_F12; + defaultKeyBindings[A_Screenshot360] = SDL_SCANCODE_F8; defaultKeyBindings[A_ToggleHUD] = SDL_SCANCODE_F11; defaultKeyBindings[A_ToggleDebug] = SDL_SCANCODE_F10; defaultKeyBindings[A_AlwaysRun] = SDL_SCANCODE_CAPSLOCK; @@ -1365,6 +1370,9 @@ namespace MWInput if (action == A_Screenshot) return "Screenshot"; + if (action == A_Screenshot360) + return "Screenshot 360"; + descriptions[A_Use] = "sUse"; descriptions[A_Activate] = "sActivate"; descriptions[A_MoveBackward] = "sBack"; @@ -1526,6 +1534,7 @@ namespace MWInput ret.push_back(A_QuickSave); ret.push_back(A_QuickLoad); ret.push_back(A_Screenshot); + ret.push_back(A_Screenshot360); ret.push_back(A_QuickKeysMenu); ret.push_back(A_QuickKey1); ret.push_back(A_QuickKey2); @@ -1557,6 +1566,7 @@ namespace MWInput ret.push_back(A_QuickSave); ret.push_back(A_QuickLoad); ret.push_back(A_Screenshot); + ret.push_back(A_Screenshot360); ret.push_back(A_QuickKeysMenu); ret.push_back(A_QuickKey1); ret.push_back(A_QuickKey2); diff --git a/apps/openmw/mwinput/inputmanagerimp.hpp b/apps/openmw/mwinput/inputmanagerimp.hpp index cba7fc743..07b43d0ac 100644 --- a/apps/openmw/mwinput/inputmanagerimp.hpp +++ b/apps/openmw/mwinput/inputmanagerimp.hpp @@ -227,6 +227,7 @@ namespace MWInput void toggleInventory(); void toggleConsole(); void screenshot(); + void screenshot360(); void toggleJournal(); void activate(); void toggleWalking(); @@ -257,6 +258,8 @@ namespace MWInput A_Screenshot, // Take a screenshot + A_Screenshot360, // Take a 360 degree screenshot + A_Inventory, // Toggle inventory screen A_Console, // Toggle console screen