| 1773 | } |
| 1774 | |
| 1775 | bool DebuggerPlugin::onMouseDown( UICodeEditor* editor, const Vector2i& position, |
| 1776 | const Uint32& flags ) { |
| 1777 | if ( !( flags & ( EE_BUTTON_LMASK | EE_BUTTON_RMASK ) ) ) |
| 1778 | return false; |
| 1779 | Float offset = editor->getGutterLocalStartOffset( this ); |
| 1780 | Vector2f localPos( editor->convertToNodeSpace( position.asFloat() ) ); |
| 1781 | if ( localPos.x >= editor->getPixelsPadding().Left + offset && |
| 1782 | localPos.x < editor->getPixelsPadding().Left + offset + editor->getGutterSpace( this ) + |
| 1783 | editor->getLineNumberPaddingLeft() && |
| 1784 | localPos.y > editor->getPluginsTopSpace() ) { |
| 1785 | if ( editor->getUISceneNode()->getEventDispatcher()->isFirstPress() ) { |
| 1786 | auto cursorPos( editor->resolveScreenPosition( position.asFloat() ) ); |
| 1787 | if ( ( flags & EE_BUTTON_RMASK ) && |
| 1788 | hasBreakpoint( editor->getDocument().getFilePath(), cursorPos.line() + 1 ) ) { |
| 1789 | breakpointToggleEnabled( &editor->getDocument(), cursorPos.line() + 1 ); |
| 1790 | } else { |
| 1791 | setBreakpoint( editor, cursorPos.line() + 1 ); |
| 1792 | } |
| 1793 | } |
| 1794 | return true; |
| 1795 | } |
| 1796 | return false; |
| 1797 | } |
| 1798 | |
| 1799 | bool DebuggerPlugin::isSupportedByAnyDebugger( const std::string& language ) { |
| 1800 | for ( const auto& dap : mDaps ) { |
no test coverage detected