+2008-09-19 Rudolf Polzer divVerent(at)alientrap.org
+ * radiant: add a "Strafe Mode" option
+ * radiant: ctrl-tab now focuses all XYZ views in the three-part view (as
+ that is what the user is likely to want there)
+
2008-09-18 Rudolf Polzer divVerent(at)alientrap.org
* radiant: handle missing anisotropy extension; fixes display bug on
Windows XP software renderer
bool m_bCamDiscrete;
bool m_bCubicClipping;
bool m_showStats;
+ int m_nStrafeMode;
camwindow_globals_private_t() :
m_nMoveSpeed(100),
m_bCamInverseMouse(false),
m_bCamDiscrete(true),
m_bCubicClipping(true),
- m_showStats(true)
+ m_showStats(true),
+ m_nStrafeMode(0)
{
}
camera_t* cam = reinterpret_cast<camera_t*>(data);
cam->m_mouseMove.motion_delta(x, y, state);
- cam->m_strafe = (state & GDK_CONTROL_MASK) != 0;
- if(cam->m_strafe)
- cam->m_strafe_forward = (state & GDK_SHIFT_MASK) != 0;
- else
- cam->m_strafe_forward = false;
+ switch(g_camwindow_globals_private.m_nStrafeMode)
+ {
+ case 0:
+ cam->m_strafe = (state & GDK_CONTROL_MASK) != 0;
+ if(cam->m_strafe)
+ cam->m_strafe_forward = (state & GDK_SHIFT_MASK) != 0;
+ else
+ cam->m_strafe_forward = false;
+ break;
+ case 1:
+ cam->m_strafe = (state & GDK_CONTROL_MASK) != 0 && (state & GDK_SHIFT_MASK) == 0;
+ cam->m_strafe_forward = false;
+ break;
+ case 2:
+ cam->m_strafe = (state & GDK_CONTROL_MASK) != 0 && (state & GDK_SHIFT_MASK) == 0;
+ cam->m_strafe_forward = cam->m_strafe;
+ break;
+ }
}
class CamWnd
IntExportCallback(RenderModeExportCaller())
);
}
+
+ const char* strafe_mode[] = { "Both", "Forward", "Up" };
+
+ page.appendCombo(
+ "Strafe Mode",
+ g_camwindow_globals_private.m_nStrafeMode,
+ STRING_ARRAY_RANGE(strafe_mode)
+ );
}
void Camera_constructPage(PreferenceGroup& group)
{
GlobalPreferenceSystem().registerPreference("SI_Colors4", Vector3ImportStringCaller(g_camwindow_globals.color_cameraback), Vector3ExportStringCaller(g_camwindow_globals.color_cameraback));
GlobalPreferenceSystem().registerPreference("SI_Colors12", Vector3ImportStringCaller(g_camwindow_globals.color_selbrushes3d), Vector3ExportStringCaller(g_camwindow_globals.color_selbrushes3d));
GlobalPreferenceSystem().registerPreference("CameraRenderMode", makeIntStringImportCallback(RenderModeImportCaller()), makeIntStringExportCallback(RenderModeExportCaller()));
+ GlobalPreferenceSystem().registerPreference("StrafeMode", IntImportStringCaller(g_camwindow_globals_private.m_nStrafeMode), IntExportStringCaller(g_camwindow_globals_private.m_nStrafeMode));
CamWnd_constructStatic();