| 1361 | } |
| 1362 | |
| 1363 | bool AutoCompletePlugin::onMouseUp( UICodeEditor* editor, const Vector2i& position, |
| 1364 | const Uint32& flags ) { |
| 1365 | if ( mSuggestions.empty() || !mSuggestionsEditor || mSuggestionsEditor != editor ) |
| 1366 | return false; |
| 1367 | |
| 1368 | Vector2f localPos( editor->convertToNodeSpace( position.asFloat() ) ); |
| 1369 | if ( mBoxRect.contains( localPos ) ) { |
| 1370 | if ( flags & EE_BUTTON_WUMASK ) { |
| 1371 | mSuggestionsStartIndex = eemax( 0, mSuggestionsStartIndex - mSuggestionsMaxVisible ); |
| 1372 | editor->invalidateDraw(); |
| 1373 | return true; |
| 1374 | } else if ( flags & EE_BUTTON_WDMASK ) { |
| 1375 | mSuggestionsStartIndex = |
| 1376 | eemax( 0, eemin( (int)mSuggestions.size() - mSuggestionsMaxVisible, |
| 1377 | mSuggestionsStartIndex + mSuggestionsMaxVisible ) ); |
| 1378 | editor->invalidateDraw(); |
| 1379 | return true; |
| 1380 | } |
| 1381 | } |
| 1382 | return false; |
| 1383 | } |
| 1384 | |
| 1385 | bool AutoCompletePlugin::onMouseDoubleClick( UICodeEditor* editor, const Vector2i& position, |
| 1386 | const Uint32& flags ) { |
no test coverage detected