diff --git a/code/nel/include/nel/gui/action_handler.h b/code/nel/include/nel/gui/action_handler.h
index d7bda1bda..830139777 100644
--- a/code/nel/include/nel/gui/action_handler.h
+++ b/code/nel/include/nel/gui/action_handler.h
@@ -108,6 +108,9 @@ namespace NLGUI
void runActionHandler(const std::string &AHName, CCtrlBase *pCaller, const std::string &Params=std::string("") );
void runActionHandler(IActionHandler *ah, CCtrlBase *pCaller, const std::string &Params=std::string("") );
+ // Submit a generic event
+ void submitEvent( const std::string &evt );
+
private:
CAHManager(){}
static CAHManager *_GlobalInstance;
diff --git a/code/ryzom/client/src/interface_v3/ctrl_base_button.h b/code/nel/include/nel/gui/ctrl_base_button.h
similarity index 100%
rename from code/ryzom/client/src/interface_v3/ctrl_base_button.h
rename to code/nel/include/nel/gui/ctrl_base_button.h
diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h
index 9145f66c4..a5a7b45b8 100644
--- a/code/nel/include/nel/gui/widget_manager.h
+++ b/code/nel/include/nel/gui/widget_manager.h
@@ -291,7 +291,14 @@ namespace NLGUI
void addOptions( std::string name, CInterfaceOptions *options );
void removeOptions( std::string name );
void removeAllOptions();
-
+
+ // Enable mouse Events to interface. if false, release Captures.
+ void enableMouseHandling( bool handle );
+ bool isMouseHandlingEnabled() const{ return _MouseHandlingEnabled; }
+
+ // Get the User DblClick Delay (according to save...), in milisecond
+ uint getUserDblClickDelay();
+
static IParser *parser;
private:
@@ -333,6 +340,8 @@ namespace NLGUI
NLMISC::CCDBNodeLeaf *_GProp;
NLMISC::CCDBNodeLeaf *_BProp;
NLMISC::CCDBNodeLeaf *_AProp;
+
+ bool _MouseHandlingEnabled;
};
}
diff --git a/code/nel/src/gui/action_handler.cpp b/code/nel/src/gui/action_handler.cpp
index be14aa5c5..b25dbb0c5 100644
--- a/code/nel/src/gui/action_handler.cpp
+++ b/code/nel/src/gui/action_handler.cpp
@@ -275,8 +275,14 @@ namespace NLGUI
const std::string event = AHName + ":" + Params;
pAH->execute(NULL, event);
}
+
+ void CAHManager::submitEvent( const std::string &evt )
+ {
+ // Submit the event to the quick help system
+ runActionHandler( "submit_quick_help", NULL, evt );
+ }
-
+
// ------------------------------------------------------------------------------------------------
class CAHSet : public IActionHandler
{
diff --git a/code/ryzom/client/src/interface_v3/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp
similarity index 92%
rename from code/ryzom/client/src/interface_v3/ctrl_base_button.cpp
rename to code/nel/src/gui/ctrl_base_button.cpp
index 8babc835a..39e6f0d14 100644
--- a/code/ryzom/client/src/interface_v3/ctrl_base_button.cpp
+++ b/code/nel/src/gui/ctrl_base_button.cpp
@@ -15,15 +15,12 @@
// along with this program. If not, see .
-
-#include "stdpch.h"
-
-#include "ctrl_base_button.h"
-#include "interface_manager.h"
+#include "nel/gui/ctrl_base_button.h"
#include "nel/misc/xml_auto_ptr.h"
-#include "../time_client.h"
-
+#include "nel/gui/interface_group.h"
#include "nel/gui/lua_ihm.h"
+#include "nel/gui/widget_manager.h"
+#include "nel/gui/db_manager.h"
using namespace std;
@@ -205,9 +202,10 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
if (!_Active || _Frozen)
return false;
+ sint64 T1 = NLMISC::CTime::getLocalTime();
+
if (event.getType() == NLGUI::CEventDescriptor::mouse)
{
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event;
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup)
@@ -227,7 +225,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
{
if (_AHOnLeftDblClick)
{
- if ((CCtrlBaseButton *) _LastLeftClickButton == this && (T1 - _LastLeftClickDate) < pIM->getUserDblClickDelay())
+ if ((CCtrlBaseButton *) _LastLeftClickButton == this && (T1 - _LastLeftClickDate) < CWidgetManager::getInstance()->getUserDblClickDelay())
{
CAHManager::getInstance()->runActionHandler (_AHOnLeftDblClick, this, _AHLeftDblClickParams);
_LeftDblClickHandled = true;
@@ -308,7 +306,6 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
{
_LastLeftClickButton = NULL;
bool handled= false;
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
if (CWidgetManager::getInstance()->getCapturePointerRight() != this)
return false;
@@ -338,11 +335,9 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
{
if (_AHOnClockTick != NULL)
{
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
CAHManager::getInstance()->runActionHandler(_AHOnClockTick, this, _AHClockTickParams);
}
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
if (CWidgetManager::getInstance()->getCapturePointerLeft() == this)
{
if (!_LeftLongClickHandled)
@@ -445,8 +440,7 @@ void CCtrlBaseButton::unselect()
// ***************************************************************************
void CCtrlBaseButton::updateOver(bool &lastOver)
{
- CInterfaceManager *pIM= CInterfaceManager::getInstance();
- if (!pIM->isMouseHandlingEnabled())
+ if (!CWidgetManager::getInstance()->isMouseHandlingEnabled())
{
_Over = false;
return;
@@ -500,10 +494,9 @@ void CCtrlBaseButton::runLeftClickAction()
{
if(_AHOnLeftClick != NULL)
{
- CInterfaceManager *pIM = CInterfaceManager::getInstance();
//nlinfo("clicked on %s", _Id.c_str());
- pIM->submitEvent ("button_click:"+getId());//TEMP
+ CAHManager::getInstance()->submitEvent( "button_click:" + getId() );
CAHManager::getInstance()->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
//pIM->submitEvent ("button_click:"+getId());
}
diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp
index 14064ec40..76b0afcc7 100644
--- a/code/nel/src/gui/widget_manager.cpp
+++ b/code/nel/src/gui/widget_manager.cpp
@@ -25,6 +25,12 @@
#include "nel/gui/group_editbox_base.h"
#include "nel/gui/interface_options.h"
+namespace
+{
+ const uint DOUBLE_CLICK_MIN = 50;
+ const uint DOUBLE_CLICK_MAX = 750;
+}
+
namespace NLGUI
{
@@ -1378,6 +1384,43 @@ namespace NLGUI
{
_OptionsMap.clear();
}
+
+
+ // ***************************************************************************
+ void CWidgetManager::enableMouseHandling( bool handle )
+ {
+ _MouseHandlingEnabled = handle;
+ if(!handle)
+ {
+ if(!getPointer())
+ return;
+
+ // If Left captured, reset
+ if( getCapturePointerLeft() )
+ setCapturePointerLeft( NULL );
+
+ // Same for Right
+ if( getCapturePointerRight() )
+ setCapturePointerRight( NULL );
+
+ // Avoid any problem with modals
+ disableModalWindow();
+ }
+ }
+
+ // ***************************************************************************
+ uint CWidgetManager::getUserDblClickDelay()
+ {
+ uint nVal = 50;
+ NLMISC::CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:DOUBLE_CLICK_SPEED");
+ if( pNL != NULL )
+ nVal = pNL->getValue32();
+
+ uint dbclickDelay = (uint)(DOUBLE_CLICK_MIN + (DOUBLE_CLICK_MAX-DOUBLE_CLICK_MIN) * (float)nVal / 100.0f);
+ return dbclickDelay;
+ }
+
+
CWidgetManager::CWidgetManager()
{
@@ -1389,6 +1432,8 @@ namespace NLGUI
_GlobalColor = NLMISC::CRGBA(255,255,255,255);
_GlobalColorForContent = _GlobalColor;
_ContentAlpha = 255;
+
+ _MouseHandlingEnabled = true;
}
CWidgetManager::~CWidgetManager()
diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp
index 8e7fbf52f..e3e43b55e 100644
--- a/code/ryzom/client/src/commands.cpp
+++ b/code/ryzom/client/src/commands.cpp
@@ -88,7 +88,7 @@
#include "actions_client.h"
#include "attack_list.h"
#include "interface_v3/player_trade.h"
-#include "interface_v3/ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
#include "weather.h"
#include "forage_source_cl.h"
#include "connection.h"
diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp
index 0066dd948..c9d37f5fb 100644
--- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp
+++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp
@@ -40,7 +40,7 @@
#include "macrocmd_manager.h"
#include "inventory_manager.h"
-#include "ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
#include "../connection.h"
#include "view_bitmap.h"
diff --git a/code/ryzom/client/src/interface_v3/action_handler_move.cpp b/code/ryzom/client/src/interface_v3/action_handler_move.cpp
index 782617ac3..5efe2c18e 100644
--- a/code/ryzom/client/src/interface_v3/action_handler_move.cpp
+++ b/code/ryzom/client/src/interface_v3/action_handler_move.cpp
@@ -32,7 +32,7 @@ using namespace NLMISC;
#include "../entities.h"
#include "interface_manager.h"
#include "action_handler_tools.h"
-#include "ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
////////////
// GLOBAL //
diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp
index d702689dd..a4cefa3bb 100644
--- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp
+++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp
@@ -1152,7 +1152,7 @@ public:
// **** Cyclic Cast? (dblclick)
bool cyclic;
// Manage "DblHit"
- uint dbclickDelay = pIM->getUserDblClickDelay();
+ uint dbclickDelay = CWidgetManager::getInstance()->getUserDblClickDelay();
// if success to "dblclick"
if(LastIndex==(sint)memoryIndex && T1<=LastHitTime+dbclickDelay )
cyclic= true;
diff --git a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp
index d7fc952ed..92d4f4897 100644
--- a/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp
+++ b/code/ryzom/client/src/interface_v3/action_phrase_faber.cpp
@@ -24,7 +24,7 @@
#include "inventory_manager.h"
#include "nel/gui/action_handler.h"
#include "../client_cfg.h"
-#include "ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
#include "group_container.h"
#include "../string_manager_client.h"
#include "../net_manager.h"
diff --git a/code/ryzom/client/src/interface_v3/ctrl_button.h b/code/ryzom/client/src/interface_v3/ctrl_button.h
index 8ff9686af..64b8ecab0 100644
--- a/code/ryzom/client/src/interface_v3/ctrl_button.h
+++ b/code/ryzom/client/src/interface_v3/ctrl_button.h
@@ -19,7 +19,7 @@
#ifndef RZ_CTRL_BUTTON_H
#define RZ_CTRL_BUTTON_H
-#include "ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
#include "nel/gui/view_renderer.h"
namespace NLGUI
diff --git a/code/ryzom/client/src/interface_v3/ctrl_text_button.h b/code/ryzom/client/src/interface_v3/ctrl_text_button.h
index 965f3c42d..34a93520e 100644
--- a/code/ryzom/client/src/interface_v3/ctrl_text_button.h
+++ b/code/ryzom/client/src/interface_v3/ctrl_text_button.h
@@ -19,7 +19,7 @@
#ifndef NL_CTRL_TEXT_BUTTON_H
#define NL_CTRL_TEXT_BUTTON_H
-#include "ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
#include "nel/gui/view_renderer.h"
diff --git a/code/ryzom/client/src/interface_v3/group_container.cpp b/code/ryzom/client/src/interface_v3/group_container.cpp
index ce5499c11..907d08553 100644
--- a/code/ryzom/client/src/interface_v3/group_container.cpp
+++ b/code/ryzom/client/src/interface_v3/group_container.cpp
@@ -919,7 +919,7 @@ bool CCtrlMover::handleEvent (const NLGUI::CEventDescriptor &event)
{
if (_WaitToOpenClose)
{
- uint dbclickDelay = pIM->getUserDblClickDelay();
+ uint dbclickDelay = CWidgetManager::getInstance()->getUserDblClickDelay();
if ((T1 - _WaitToOpenCloseDate) > dbclickDelay)
{
CGroupContainer *gc = dynamic_cast(_Parent);
@@ -3203,7 +3203,7 @@ void CGroupContainer::setActive (bool state)
else
CWidgetManager::getInstance()->setBackWindow(this);
}
- pIM->submitEvent((state?"show:":"hide:")+getId());
+ CAHManager::getInstance()->submitEvent((state?"show:":"hide:")+getId());
CInterfaceGroup::setActive(state);
}
diff --git a/code/ryzom/client/src/interface_v3/group_tab.cpp b/code/ryzom/client/src/interface_v3/group_tab.cpp
index f5b05c5ed..e9fe48a2e 100644
--- a/code/ryzom/client/src/interface_v3/group_tab.cpp
+++ b/code/ryzom/client/src/interface_v3/group_tab.cpp
@@ -798,7 +798,7 @@ bool CCtrlTabButton::handleEvent (const NLGUI::CEventDescriptor &event)
if (_Blinking)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
- uint dbclickDelay = pIM->getUserDblClickDelay();
+ uint dbclickDelay = CWidgetManager::getInstance()->getUserDblClickDelay();
if ((T1 - _BlinkDate) > dbclickDelay)
{
if (_BlinkState)
diff --git a/code/ryzom/client/src/interface_v3/group_tree.cpp b/code/ryzom/client/src/interface_v3/group_tree.cpp
index 1d6282ffd..c739be7dd 100644
--- a/code/ryzom/client/src/interface_v3/group_tree.cpp
+++ b/code/ryzom/client/src/interface_v3/group_tree.cpp
@@ -566,7 +566,7 @@ void CGroupTree::draw()
// change the over
bool bDisplayOver = true;
- if (!pIM->isMouseHandlingEnabled())
+ if (!CWidgetManager::getInstance()->isMouseHandlingEnabled())
{
bDisplayOver = false;
}
diff --git a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp
index 6074f98e5..da2fddea9 100644
--- a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp
+++ b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp
@@ -258,7 +258,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
}
}
// **** Event Mouse
- else if(CWidgetManager::getInstance()->getPointer() && _Focus /* && pIM->isMouseHandlingEnabled() */ &&
+ else if(CWidgetManager::getInstance()->getPointer() && _Focus /* && CWidgetManager::getInstance()->isMouseHandlingEnabled() */ &&
( event == EventMouseMoveId ||
event == EventMouseDownId ||
event == EventMouseUpId ||
@@ -282,7 +282,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
// button down ?
static volatile bool doTest = false;
- if (!doTest || (doTest && pIM->isMouseHandlingEnabled()))
+ if (!doTest || (doTest && CWidgetManager::getInstance()->isMouseHandlingEnabled()))
{
if (event==EventMouseDownId)
{
diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp
index b473c29e3..067c946ea 100644
--- a/code/ryzom/client/src/interface_v3/interface_manager.cpp
+++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp
@@ -182,10 +182,6 @@ CChatDisplayer * ChatDisplayer = NULL;
void initActions();
void uninitActions();
-// ------------------------------------------------------------------------------------------------
-static const uint DOUBLE_CLICK_MIN = 50;
-static const uint DOUBLE_CLICK_MAX = 750;
-
///\todo nico: remove this dummy displayer
NLMISC::CLog g_log;
@@ -278,7 +274,6 @@ CInterfaceManager::CInterfaceManager( NL3D::UDriver *driver, NL3D::UTextContext
_GlobalRolloverFactorContent = 255;
_GlobalRolloverFactorContainer = 255;
_MouseOverWindow= false;
- _MouseHandlingEnabled= true;
_ConfigLoaded = false;
_LogState = false;
_KeysLoaded = false;
@@ -2610,7 +2605,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
eventDesc.setX( _Pointer->getX() );
eventDesc.setY( _Pointer->getY() );
- if( _MouseHandlingEnabled )
+ if( CWidgetManager::getInstance()->isMouseHandlingEnabled() )
{
// First thing to do : Capture handling
if ( CWidgetManager::getInstance()->getCapturePointerLeft() != NULL)
@@ -3493,32 +3488,6 @@ void CInterfaceManager::disableContextHelpForControl(CCtrlBase *pCtrl)
disableContextHelp();
}
-// ***************************************************************************
-void CInterfaceManager::enableMouseHandling(bool handle)
-{
- _MouseHandlingEnabled= handle;
- if(!handle)
- {
- if(!CWidgetManager::getInstance()->getPointer())
- return;
-
- // If Left captured, reset
- if( CWidgetManager::getInstance()->getCapturePointerLeft() )
- {
- CWidgetManager::getInstance()->setCapturePointerLeft(NULL);
- }
-
- // Same for Right
- if( CWidgetManager::getInstance()->getCapturePointerRight() )
- {
- CWidgetManager::getInstance()->setCapturePointerRight(NULL);
- }
-
- // Avoid any problem with modals
- CWidgetManager::getInstance()->disableModalWindow();
- }
-}
-
// ***************************************************************************
void CInterfaceManager::displayDebugInfo(const ucstring &str, TSystemInfoMode mode /*=InfoMsg*/)
@@ -4039,26 +4008,6 @@ void CInterfaceManager::restoreAllContainersBackupPosition()
}
}
-
-// ***************************************************************************
-
-uint CInterfaceManager::getUserDblClickDelay()
-{
- uint nVal = 50;
- CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:DOUBLE_CLICK_SPEED");
- if (pNL != NULL)
- nVal = pNL->getValue32();
- uint dbclickDelay = (uint)(DOUBLE_CLICK_MIN + (DOUBLE_CLICK_MAX-DOUBLE_CLICK_MIN) * (float)nVal / 100.0f);
- return dbclickDelay;
-}
-
-// ***************************************************************************
-void CInterfaceManager::submitEvent (const std::string &event)
-{
- // Submit the event to the quick help system
- CAHManager::getInstance()->runActionHandler("submit_quick_help", NULL, event);
-}
-
// ***************************************************************************
void CInterfaceManager::visit(CInterfaceElementVisitor *visitor)
{
diff --git a/code/ryzom/client/src/interface_v3/interface_manager.h b/code/ryzom/client/src/interface_v3/interface_manager.h
index 4413c5bec..2171ecb4c 100644
--- a/code/ryzom/client/src/interface_v3/interface_manager.h
+++ b/code/ryzom/client/src/interface_v3/interface_manager.h
@@ -387,10 +387,6 @@ public:
bool isMouseOverWindow() const {return _MouseOverWindow;}
- // Enable mouse Events to interface. if false, release Captures.
- void enableMouseHandling(bool handle);
- bool isMouseHandlingEnabled() const { return _MouseHandlingEnabled; }
-
// Modes
void setMode(uint8 newMode);
uint8 getMode() const { return _CurrentMode; }
@@ -414,12 +410,6 @@ public:
void displayUICtrlBBoxs(const std::string &uiFilter);
void displayUIGroupBBoxs(const std::string &uiFilter);
- // Get the User DblClick Delay (according to save...), in milisecond
- uint getUserDblClickDelay();
-
- // Submit a generic event
- void submitEvent (const std::string &event);
-
// visit all elements of the interface manager
void visit(CInterfaceElementVisitor *visitor);
@@ -743,9 +733,6 @@ private:
// System Options
CInterfaceOptionValue _SystemOptions[NumSystemOptions];
- bool _MouseHandlingEnabled;
-
-
// Modes
CInterfaceConfig::CDesktopImage _Modes[MAX_NUM_MODES];
uint8 _CurrentMode;
diff --git a/code/ryzom/client/src/interface_v3/view_pointer.cpp b/code/ryzom/client/src/interface_v3/view_pointer.cpp
index ebfdafe1b..ed0cdae23 100644
--- a/code/ryzom/client/src/interface_v3/view_pointer.cpp
+++ b/code/ryzom/client/src/interface_v3/view_pointer.cpp
@@ -199,7 +199,7 @@ void CViewPointer::draw ()
_LastHightLight = NULL;
}
- if ( CWidgetManager::getInstance()->getCapturePointerLeft() != NULL && pIM->isMouseHandlingEnabled())
+ if ( CWidgetManager::getInstance()->getCapturePointerLeft() != NULL && CWidgetManager::getInstance()->isMouseHandlingEnabled())
{
CCtrlMover *pCM = dynamic_cast( CWidgetManager::getInstance()->getCapturePointerLeft());
if ((pCM != NULL) && (pCM->canMove() == true))
@@ -308,7 +308,7 @@ void CViewPointer::draw ()
}
// Draw the cursor type that are under the pointer
- if (pIM->isMouseHandlingEnabled())
+ if (CWidgetManager::getInstance()->isMouseHandlingEnabled())
{
// Sorts the controls according to their depth, to approximate as best the CapturePointerLeft algo.
// Especially important so that Resizers controls get the precedence over the move control (else could randomly bug like in chat group)
@@ -363,7 +363,7 @@ void CViewPointer::draw ()
}
}
- if (pIM->isMouseHandlingEnabled())
+ if (CWidgetManager::getInstance()->isMouseHandlingEnabled())
{
if (rICL.empty())
{
@@ -381,7 +381,7 @@ void CViewPointer::draw ()
}
}
- if (_StringMode && pIM->isMouseHandlingEnabled())
+ if (_StringMode && CWidgetManager::getInstance()->isMouseHandlingEnabled())
{
CInterfaceGroup *stringCursor = IsMouseCursorHardware() ? _StringCursorHardware : _StringCursor;
if (stringCursor)
diff --git a/code/ryzom/client/src/motion/modes/ai_mode.cpp b/code/ryzom/client/src/motion/modes/ai_mode.cpp
index 1f5caafab..4c9db3511 100644
--- a/code/ryzom/client/src/motion/modes/ai_mode.cpp
+++ b/code/ryzom/client/src/motion/modes/ai_mode.cpp
@@ -99,7 +99,7 @@ void CUserControls::aiMode()
}
if( EventsListener.isMouseButtonReleased (leftButton) )
{
- if(T1 <= _LeftClickEnd+IM->getUserDblClickDelay())
+ if(T1 <= _LeftClickEnd + CWidgetManager::getInstance()->getUserDblClickDelay())
{
dblClickLeft = true;
}
@@ -114,7 +114,7 @@ void CUserControls::aiMode()
}
if( EventsListener.isMouseButtonReleased (rightButton) )
{
- if(T1 <= _RightClickEnd+IM->getUserDblClickDelay())
+ if(T1 <= _RightClickEnd + CWidgetManager::getInstance()->getUserDblClickDelay())
{
dblClickRight = true;
}
@@ -141,13 +141,13 @@ void CUserControls::aiMode()
}
// Give back the mouse handling to the interface.
- IM->enableMouseHandling(true);
+ CWidgetManager::getInstance()->enableMouseHandling(true);
}
else if (EventsListener.isMouseButtonDown (rightButton))
{
if((T1-_RightClickStart) > _TimeLongClick)
{
- IM->enableMouseHandling(false);
+ CWidgetManager::getInstance()->enableMouseHandling(false);
EventsListener.enableMouseSmoothing(true);
// Get the cursor instance and hide.
CViewPointer *cursor = static_cast< CViewPointer* >( CWidgetManager::getInstance()->getPointer() );
diff --git a/code/ryzom/client/src/motion/user_controls.cpp b/code/ryzom/client/src/motion/user_controls.cpp
index 6c7d5027a..cfa5c3254 100644
--- a/code/ryzom/client/src/motion/user_controls.cpp
+++ b/code/ryzom/client/src/motion/user_controls.cpp
@@ -505,7 +505,7 @@ void CUserControls::freeLook(bool fullMode)
// FREE LOOK : Hide the cursor
// disable interface mouse handling.
- IM->enableMouseHandling(false);
+ CWidgetManager::getInstance()->enableMouseHandling(false);
// Get the cursor instance
CViewPointer *cursor = static_cast< CViewPointer* >( CWidgetManager::getInstance()->getPointer() );
if(cursor)
@@ -588,7 +588,7 @@ void CUserControls::cameraLook(bool fullMode)
// CAMERA LOOK : Hide the cursor
// disable interface mouse handling.
- IM->enableMouseHandling(false);
+ CWidgetManager::getInstance()->enableMouseHandling(false);
// Get the cursor instance
CViewPointer *cursor = static_cast< CViewPointer* >( CWidgetManager::getInstance()->getPointer() );
if(cursor)
@@ -747,7 +747,7 @@ void CUserControls::commonMove()
}
if( EventsListener.isMouseButtonReleased (leftButton) )
{
- if(T1 <= _LeftClickEnd+IM->getUserDblClickDelay())
+ if(T1 <= _LeftClickEnd + CWidgetManager::getInstance()->getUserDblClickDelay())
{
dblClickLeft = true;
}
@@ -762,7 +762,7 @@ void CUserControls::commonMove()
}
if( EventsListener.isMouseButtonReleased (rightButton) )
{
- if(T1 <= _RightClickEnd+IM->getUserDblClickDelay())
+ if(T1 <= _RightClickEnd + CWidgetManager::getInstance()->getUserDblClickDelay())
{
dblClickRight = true;
}
@@ -814,7 +814,7 @@ void CUserControls::commonMove()
// Give back the mouse handling to the interface.
- IM->enableMouseHandling(true);
+ CWidgetManager::getInstance()->enableMouseHandling(true);
EventsListener.enableMouseSmoothing(false);
}
@@ -831,7 +831,7 @@ void CUserControls::commonMove()
}
// Give back the mouse handling to the interface.
- IM->enableMouseHandling(true);
+ CWidgetManager::getInstance()->enableMouseHandling(true);
EventsListener.enableMouseSmoothing(false);
}
@@ -1313,7 +1313,7 @@ void CUserControls::stopFreeLook()
// Cursor mode
SetMouseCursor ();
// Give back the mouse handling to the interface.
- CInterfaceManager::getInstance()->enableMouseHandling(true);
+ CWidgetManager::getInstance()->enableMouseHandling(true);
}
diff --git a/code/ryzom/client/src/r2/tool.cpp b/code/ryzom/client/src/r2/tool.cpp
index 9b80311f5..e5adc4913 100644
--- a/code/ryzom/client/src/r2/tool.cpp
+++ b/code/ryzom/client/src/r2/tool.cpp
@@ -93,7 +93,7 @@ bool CTool::checkDoubleClick()
{
//H_AUTO(R2_CTool_checkDoubleClick)
if (_DoubleClickStartTime == -1) return false;
- if (T0 - _DoubleClickStartTime >= getUI().getUserDblClickDelay()) return false;
+ if (T0 - _DoubleClickStartTime >= CWidgetManager::getInstance()->getUserDblClickDelay()) return false;
sint32 mx, my;
getMousePos(mx, my);
const sint32 moveThrehsold = 2;
@@ -725,7 +725,7 @@ void CTool::captureMouse()
else
{
UserControls.captureMouse();
- getUI().enableMouseHandling(false);
+ CWidgetManager::getInstance()->enableMouseHandling(false);
}
getUI().setContextHelpActive(false);
_MouseCaptured = true;
@@ -737,7 +737,7 @@ void CTool::releaseMouse()
//H_AUTO(R2_CTool_releaseMouse)
CWidgetManager::getInstance()->setCapturePointerLeft(NULL);
UserControls.releaseMouse();
- getUI().enableMouseHandling(true);
+ CWidgetManager::getInstance()->enableMouseHandling(true);
getUI().setContextHelpActive(true);
_MouseCaptured = false;
}
diff --git a/code/ryzom/client/src/r2/tool_create_entity.cpp b/code/ryzom/client/src/r2/tool_create_entity.cpp
index 8819dc24c..97e20a871 100644
--- a/code/ryzom/client/src/r2/tool_create_entity.cpp
+++ b/code/ryzom/client/src/r2/tool_create_entity.cpp
@@ -36,7 +36,7 @@
#include "verbose_clock.h"
#include "entity_sorter.h"
//
-#include "../interface_v3/ctrl_base_button.h"
+#include "nel/gui/ctrl_base_button.h"
//
#include "game_share/player_visual_properties.h"
#include "game_share/visual_slot_manager.h"