Add toggle_free_look action handler

add-toggle-free-look-ah
nimetu 3 years ago
parent 7df9b2f255
commit 3a3cad6176

@ -844,6 +844,20 @@ protected:
}; };
REGISTER_ACTION_HANDLER( CHandlerContextFreeLook, "context_free_look"); REGISTER_ACTION_HANDLER( CHandlerContextFreeLook, "context_free_look");
// ***************************************************************************
class CHandlerToggleFreeLook : public IActionHandler
{
public:
void execute(CCtrlBase * /* pCaller */, const std::string & /* sParams */)
{
if (UserControls.getFreeLook())
UserControls.stopFreeLook();
else
UserControls.startFreeLook();
}
};
REGISTER_ACTION_HANDLER( CHandlerToggleFreeLook, "toggle_free_look");
// *************************************************************************** // ***************************************************************************
// GCM Move // GCM Move
// *************************************************************************** // ***************************************************************************

Loading…
Cancel
Save