mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:23:51 +00:00
make a new action for 360 screenshot
This commit is contained in:
parent
f60840754f
commit
1b97a541f4
2 changed files with 19 additions and 6 deletions
|
@ -247,6 +247,9 @@ namespace MWInput
|
||||||
case A_Screenshot:
|
case A_Screenshot:
|
||||||
screenshot();
|
screenshot();
|
||||||
break;
|
break;
|
||||||
|
case A_Screenshot360:
|
||||||
|
screenshot360();
|
||||||
|
break;
|
||||||
case A_Inventory:
|
case A_Inventory:
|
||||||
toggleInventory ();
|
toggleInventory ();
|
||||||
break;
|
break;
|
||||||
|
@ -1015,7 +1018,13 @@ namespace MWInput
|
||||||
|
|
||||||
void InputManager::screenshot()
|
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;
|
int screenshotW = 1024;
|
||||||
osg::ref_ptr<osg::Image> screenshot (new osg::Image);
|
osg::ref_ptr<osg::Image> screenshot (new osg::Image);
|
||||||
MWBase::Environment::get().getWorld()->screenshot360(screenshot.get(), screenshotW);
|
MWBase::Environment::get().getWorld()->screenshot360(screenshot.get(), screenshotW);
|
||||||
|
@ -1040,11 +1049,6 @@ namespace MWInput
|
||||||
}
|
}
|
||||||
|
|
||||||
outfile.close();
|
outfile.close();
|
||||||
|
|
||||||
// mScreenCaptureHandler->setFramesToCapture(1);
|
|
||||||
// mScreenCaptureHandler->captureNextFrame(*mViewer);
|
|
||||||
|
|
||||||
// MWBase::Environment::get().getWindowManager()->messageBox ("Screenshot saved");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputManager::toggleInventory()
|
void InputManager::toggleInventory()
|
||||||
|
@ -1230,6 +1234,7 @@ namespace MWInput
|
||||||
defaultKeyBindings[A_QuickKey9] = SDL_SCANCODE_9;
|
defaultKeyBindings[A_QuickKey9] = SDL_SCANCODE_9;
|
||||||
defaultKeyBindings[A_QuickKey10] = SDL_SCANCODE_0;
|
defaultKeyBindings[A_QuickKey10] = SDL_SCANCODE_0;
|
||||||
defaultKeyBindings[A_Screenshot] = SDL_SCANCODE_F12;
|
defaultKeyBindings[A_Screenshot] = SDL_SCANCODE_F12;
|
||||||
|
defaultKeyBindings[A_Screenshot360] = SDL_SCANCODE_F8;
|
||||||
defaultKeyBindings[A_ToggleHUD] = SDL_SCANCODE_F11;
|
defaultKeyBindings[A_ToggleHUD] = SDL_SCANCODE_F11;
|
||||||
defaultKeyBindings[A_ToggleDebug] = SDL_SCANCODE_F10;
|
defaultKeyBindings[A_ToggleDebug] = SDL_SCANCODE_F10;
|
||||||
defaultKeyBindings[A_AlwaysRun] = SDL_SCANCODE_CAPSLOCK;
|
defaultKeyBindings[A_AlwaysRun] = SDL_SCANCODE_CAPSLOCK;
|
||||||
|
@ -1365,6 +1370,9 @@ namespace MWInput
|
||||||
if (action == A_Screenshot)
|
if (action == A_Screenshot)
|
||||||
return "Screenshot";
|
return "Screenshot";
|
||||||
|
|
||||||
|
if (action == A_Screenshot360)
|
||||||
|
return "Screenshot 360";
|
||||||
|
|
||||||
descriptions[A_Use] = "sUse";
|
descriptions[A_Use] = "sUse";
|
||||||
descriptions[A_Activate] = "sActivate";
|
descriptions[A_Activate] = "sActivate";
|
||||||
descriptions[A_MoveBackward] = "sBack";
|
descriptions[A_MoveBackward] = "sBack";
|
||||||
|
@ -1526,6 +1534,7 @@ namespace MWInput
|
||||||
ret.push_back(A_QuickSave);
|
ret.push_back(A_QuickSave);
|
||||||
ret.push_back(A_QuickLoad);
|
ret.push_back(A_QuickLoad);
|
||||||
ret.push_back(A_Screenshot);
|
ret.push_back(A_Screenshot);
|
||||||
|
ret.push_back(A_Screenshot360);
|
||||||
ret.push_back(A_QuickKeysMenu);
|
ret.push_back(A_QuickKeysMenu);
|
||||||
ret.push_back(A_QuickKey1);
|
ret.push_back(A_QuickKey1);
|
||||||
ret.push_back(A_QuickKey2);
|
ret.push_back(A_QuickKey2);
|
||||||
|
@ -1557,6 +1566,7 @@ namespace MWInput
|
||||||
ret.push_back(A_QuickSave);
|
ret.push_back(A_QuickSave);
|
||||||
ret.push_back(A_QuickLoad);
|
ret.push_back(A_QuickLoad);
|
||||||
ret.push_back(A_Screenshot);
|
ret.push_back(A_Screenshot);
|
||||||
|
ret.push_back(A_Screenshot360);
|
||||||
ret.push_back(A_QuickKeysMenu);
|
ret.push_back(A_QuickKeysMenu);
|
||||||
ret.push_back(A_QuickKey1);
|
ret.push_back(A_QuickKey1);
|
||||||
ret.push_back(A_QuickKey2);
|
ret.push_back(A_QuickKey2);
|
||||||
|
|
|
@ -227,6 +227,7 @@ namespace MWInput
|
||||||
void toggleInventory();
|
void toggleInventory();
|
||||||
void toggleConsole();
|
void toggleConsole();
|
||||||
void screenshot();
|
void screenshot();
|
||||||
|
void screenshot360();
|
||||||
void toggleJournal();
|
void toggleJournal();
|
||||||
void activate();
|
void activate();
|
||||||
void toggleWalking();
|
void toggleWalking();
|
||||||
|
@ -257,6 +258,8 @@ namespace MWInput
|
||||||
|
|
||||||
A_Screenshot, // Take a screenshot
|
A_Screenshot, // Take a screenshot
|
||||||
|
|
||||||
|
A_Screenshot360, // Take a 360 degree screenshot
|
||||||
|
|
||||||
A_Inventory, // Toggle inventory screen
|
A_Inventory, // Toggle inventory screen
|
||||||
|
|
||||||
A_Console, // Toggle console screen
|
A_Console, // Toggle console screen
|
||||||
|
|
Loading…
Reference in a new issue