void GuiDirectoryFileListCtrl::onMouseDown(const GuiEvent &event)
{
   Parent::onMouseDown( event );

   if( event.mouseClickCount == 2 )
      onDoubleClick_callback();
}
void GuiButtonBaseCtrl::onMouseDown(const GuiEvent &event)
{
   if (! mActive)
      return;

   if (mProfile->mCanKeyFocus)
      setFirstResponder();

   if (mProfile->mSoundButtonDown)
      SFX->playOnce(mProfile->mSoundButtonDown);
      
   mMouseDownPoint = event.mousePoint;
   mMouseDragged = false;

   if( mUseMouseEvents )
	  onMouseDown_callback();

   //lock the mouse
   mouseLock();
   mDepressed = true;

   // If we have a double click then execute the alt command.
   if ( event.mouseClickCount == 2 )
   {
      onDoubleClick_callback();
      execAltConsoleCallback();
   }

   //update
   setUpdate();
}
Example #3
0
void GuiGradientSwatchCtrl::onMouseDown(const GuiEvent &event)
{
   if (! mActive)
      return;

   if (mProfile->mCanKeyFocus)
      setFirstResponder();
	
	//capture current bounds and mouse down position
	mOrigBounds = getBounds();
	mMouseDownPosition = event.mousePoint;

   if(mUseMouseEvents)
      onMouseDown_callback();

   //lock the mouse
   mouseLock();
   mDepressed = true;

   // If we have a double click then execute the alt command.
   if ( event.mouseClickCount == 2 )
   {
      onDoubleClick_callback();

      execAltConsoleCallback();
   }

   setUpdate();
}