Add stereoscopy hotkeys.

This commit is contained in:
Jules Blok 2014-11-11 00:06:44 +01:00
parent 21eabc1b9d
commit 6e62dd3415
4 changed files with 35 additions and 0 deletions

View File

@ -81,6 +81,11 @@ static const struct
{ "FreelookZoomOut", 83 /* 'S' */, 4 /* wxMOD_SHIFT */ },
{ "FreelookReset", 82 /* 'R' */, 4 /* wxMOD_SHIFT */ },
{ "IncreaseSeparation", 0, 0 /* wxMOD_NONE */ },
{ "DecreaseSeparation", 0, 0 /* wxMOD_NONE */ },
{ "IncreaseConvergence", 0, 0 /* wxMOD_NONE */ },
{ "DecreaseConvergence", 0, 0 /* wxMOD_NONE */ },
{ "LoadStateSlot1", 340 /* WXK_F1 */, 0 /* wxMOD_NONE */ },
{ "LoadStateSlot2", 341 /* WXK_F2 */, 0 /* wxMOD_NONE */ },
{ "LoadStateSlot3", 342 /* WXK_F3 */, 0 /* wxMOD_NONE */ },

View File

@ -54,6 +54,11 @@ enum Hotkey
HK_FREELOOK_ZOOM_OUT,
HK_FREELOOK_RESET,
HK_INCREASE_SEPARATION,
HK_DECREASE_SEPARATION,
HK_INCREASE_CONVERGENCE,
HK_DECREASE_CONVERGENCE,
HK_LOAD_STATE_SLOT_1,
HK_LOAD_STATE_SLOT_2,
HK_LOAD_STATE_SLOT_3,

View File

@ -1123,6 +1123,26 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
{
State::Load(g_saveSlot);
}
else if (IsHotkey(event, HK_INCREASE_SEPARATION))
{
if (++g_Config.iStereoSeparation > 100)
g_Config.iStereoSeparation = 100;
}
else if (IsHotkey(event, HK_DECREASE_SEPARATION))
{
if (--g_Config.iStereoSeparation < 10)
g_Config.iStereoSeparation = 10;
}
else if (IsHotkey(event, HK_INCREASE_CONVERGENCE))
{
if (++g_Config.iStereoFocalLength > 200)
g_Config.iStereoFocalLength = 200;
}
else if (IsHotkey(event, HK_DECREASE_CONVERGENCE))
{
if (--g_Config.iStereoFocalLength < 10)
g_Config.iStereoFocalLength = 10;
}
else
{

View File

@ -238,6 +238,11 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls()
_("Freelook Zoom Out"),
_("Freelook Reset"),
_("Increase Stereocopy Separation"),
_("Decrease Stereocopy Separation"),
_("Increase Stereocopy Convergence"),
_("Decrease Stereocopy Convergence"),
_("Load State Slot 1"),
_("Load State Slot 2"),
_("Load State Slot 3"),