Merge branch '164-crash-on-patching-and-possibly-right-after-login' into main/gingo...
[ryzomcore.git] / ryzom / client / src / actions_client.cpp
blob0f9eabad163b0e7e757c372c38d9d60628c16940
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "stdpch.h"
22 /////////////
23 // INCLUDE //
24 /////////////
25 // 3D Interface.
26 #include "nel/3d/u_driver.h"
27 // Client.
28 #include "actions_client.h"
29 #include "interface_v3/input_handler_manager.h"
31 #ifdef DEBUG_NEW
32 #define new DEBUG_NEW
33 #endif
35 ///////////
36 // USING //
37 ///////////
38 using namespace NLMISC;
39 using namespace NL3D;
42 ////////////
43 // EXTERN //
44 ////////////
45 extern UDriver *Driver;
48 ////////////
49 // GLOBAL //
50 ////////////
51 CActionsContext ActionsContext; // Register action managers
52 CActionsManager Actions; // Default actions Manager
53 CEventsListener EventsListener; // Inputs Manager
55 //-----------------------------------------------
56 // initActions :
57 // Initialize Actions.
58 //-----------------------------------------------
59 void initActions()
61 /* Add the Actions listener to the Interface Manager Events Server, NOT TO THE DRIVER
62 This is because the interfaceManager filter the events
64 CInputHandlerManager *pIH= CInputHandlerManager::getInstance();
65 EventsListener.addToServer(pIH->FilteredEventServer);
66 }// initActions //
68 void uninitActions()
70 /* Add the Actions listener to the Interface Manager Events Server, NOT TO THE DRIVER
71 This is because the interfaceManager filter the events
73 CInputHandlerManager *pIH= CInputHandlerManager::getInstance();
74 EventsListener.removeFromServer(pIH->FilteredEventServer);
75 Actions.clear();
76 EditActions.clear();
77 }// initActions //